Struct TextInputState
pub struct TextInputState {
pub revision: u32,
pub text: String,
pub selection: TextSelection,
pub composing: TextRange,
}
Expand description
The current text, selection, and composing state for editing a run of text.
Fields§
§revision: u32
Current state revision to avoid race conditions.
text: String
The current text being edited.
selection: TextSelection
The range of text that is currently selected.
composing: TextRange
The range of text that is still being composed.
Trait Implementations§
§impl Clone for TextInputState
impl Clone for TextInputState
§fn clone(&self) -> TextInputState
fn clone(&self) -> TextInputState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for TextInputState
impl Debug for TextInputState
§impl<D> Decode<TextInputState, D> for TextInputStatewhere
D: ResourceDialect,
impl<D> Decode<TextInputState, D> for TextInputStatewhere
D: ResourceDialect,
§fn new_empty() -> TextInputState
fn new_empty() -> TextInputState
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<TextInputState, D> for &TextInputStatewhere
D: ResourceDialect,
impl<D> Encode<TextInputState, D> for &TextInputStatewhere
D: ResourceDialect,
§impl Hash for TextInputState
impl Hash for TextInputState
§impl Ord for TextInputState
impl Ord for TextInputState
§impl PartialEq for TextInputState
impl PartialEq for TextInputState
§impl PartialOrd for TextInputState
impl PartialOrd for TextInputState
§impl TypeMarker for TextInputState
impl TypeMarker for TextInputState
§type Owned = TextInputState
type Owned = TextInputState
The owned Rust type which this FIDL type decodes into.
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for TextInputState
impl ValueTypeMarker for TextInputState
§type Borrowed<'a> = &'a TextInputState
type Borrowed<'a> = &'a TextInputState
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<TextInputState as TypeMarker>::Owned,
) -> <TextInputState as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<TextInputState as TypeMarker>::Owned, ) -> <TextInputState as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Eq for TextInputState
impl Persistable for TextInputState
impl StructuralPartialEq for TextInputState
Auto Trait Implementations§
impl Freeze for TextInputState
impl RefUnwindSafe for TextInputState
impl Send for TextInputState
impl Sync for TextInputState
impl Unpin for TextInputState
impl UnwindSafe for TextInputState
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more