pub struct TextRange {
pub pos: u32,
pub end: u32,
}Expand description
A text range with start and end positions. All positions are character indices (not byte indices).
Fields§
§pos: u32§end: u32Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextRange
impl<'de> Deserialize<'de> for TextRange
Source§fn deserialize<D>(
deserializer: D,
) -> Result<TextRange, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TextRange, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromWasmAbi for TextRange
impl FromWasmAbi for TextRange
Source§impl IntoWasmAbi for TextRange
impl IntoWasmAbi for TextRange
Source§impl LongRefFromWasmAbi for TextRange
impl LongRefFromWasmAbi for TextRange
Source§impl OptionFromWasmAbi for TextRange
impl OptionFromWasmAbi for TextRange
Source§impl OptionIntoWasmAbi for TextRange
impl OptionIntoWasmAbi for TextRange
Source§impl RefFromWasmAbi for TextRange
impl RefFromWasmAbi for TextRange
Source§type Anchor = RcRef<TextRange>
type Anchor = RcRef<TextRange>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§unsafe fn ref_from_abi(
js: <TextRange as RefFromWasmAbi>::Abi,
) -> <TextRange as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <TextRange as RefFromWasmAbi>::Abi, ) -> <TextRange as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for TextRange
impl RefMutFromWasmAbi for TextRange
Source§impl Serialize for TextRange
impl Serialize for TextRange
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFromJsValue for TextRange
impl TryFromJsValue for TextRange
Source§impl VectorFromWasmAbi for TextRange
impl VectorFromWasmAbi for TextRange
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <TextRange as VectorFromWasmAbi>::Abi, ) -> Box<[TextRange]>
Source§impl VectorIntoWasmAbi for TextRange
impl VectorIntoWasmAbi for TextRange
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[TextRange]>, ) -> <TextRange as VectorIntoWasmAbi>::Abi
impl Copy for TextRange
Auto Trait Implementations§
impl Freeze for TextRange
impl RefUnwindSafe for TextRange
impl Send for TextRange
impl Sync for TextRange
impl Unpin for TextRange
impl UnsafeUnpin for TextRange
impl UnwindSafe for TextRange
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.