pub struct TextSourcePiece {
pub out_len: u32,
pub span: FlmSpan,
}Expand description
One text source piece of a TextSourceMap: the next
out_len bytes of the node’s text come from the source
bytes that span covers.
Serialized form: {len, span}, the span in techy’s own form, which records
the source it belongs to.
Fields§
§out_len: u32How many bytes of the node’s text this piece covers.
span: FlmSpanThe source bytes those text bytes come from. The span carries its own source, so the pieces of one map may come from different sources.
Trait Implementations§
Source§impl Clone for TextSourcePiece
impl Clone for TextSourcePiece
Source§impl Debug for TextSourcePiece
impl Debug for TextSourcePiece
Source§impl DeserializableValue<Flm> for TextSourcePiece
impl DeserializableValue<Flm> for TextSourcePiece
Source§fn deserialize_value(
__value: &SerialValue,
__cx: &mut DeserializeContext<'_, Flm>,
) -> Result<Self, DeserializeError>
fn deserialize_value( __value: &SerialValue, __cx: &mut DeserializeContext<'_, Flm>, ) -> Result<Self, DeserializeError>
Rebuild the value from its serialized form.
cx gives the call access to the
state of the deserialization in progress. Read moreSource§fn deserialize_field(
name: &'static str,
value: Option<&SerialValue>,
cx: &mut DeserializeContext<'_, L>,
) -> Result<Self, DeserializeError>where
L: SerializableLang,
fn deserialize_field(
name: &'static str,
value: Option<&SerialValue>,
cx: &mut DeserializeContext<'_, L>,
) -> Result<Self, DeserializeError>where
L: SerializableLang,
Rebuild this value as the field
name of a structure whose fields are read by
name (a type with #[derive(DeserializableValue)]): value is the field’s
value, or None when the key is missing from the map. The default requires
the key and reads its value with deserialize_value;
Option<T> reads a missing key as None. The counterpart of
SerializableValue::is_absent_field: a type overriding one overrides both. Read moreimpl Eq for TextSourcePiece
Source§impl PartialEq for TextSourcePiece
impl PartialEq for TextSourcePiece
Source§impl SerializableValue<Flm> for TextSourcePiece
impl SerializableValue<Flm> for TextSourcePiece
Source§fn serialize_value(
&self,
__cx: &mut SerializeContext<'_, Flm>,
) -> Result<SerialValue, SerializeError>
fn serialize_value( &self, __cx: &mut SerializeContext<'_, Flm>, ) -> Result<SerialValue, SerializeError>
Produce this value’s serialized form.
cx gives the call access to the state
of the serialization in progress — a value that refers to a table object
(a span’s source, say) interns it through cx and embeds the position. Read moreSource§fn is_absent_field(&self) -> boolwhere
L: SerializableLang,
fn is_absent_field(&self) -> boolwhere
L: SerializableLang,
Whether this value, as a field of a structure whose fields are written by name
(a type with
#[derive(SerializableValue)]), is left out of the structure’s map
entirely — no key at all, rather than a key with a null value. The default is
false; Option<T> is absent when it is None. Read moreimpl StructuralPartialEq for TextSourcePiece
Auto Trait Implementations§
impl Forget for TextSourcePiece
impl Freeze for TextSourcePiece
impl Move for TextSourcePiece
impl RefUnwindSafe for TextSourcePiece
impl Send for TextSourcePiece
impl Sync for TextSourcePiece
impl Unpin for TextSourcePiece
impl UnsafeUnpin for TextSourcePiecewhere
*const ArcInner<Source<FlmOrigin>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Source<FlmOrigin>>>: UnsafeUnpin,
impl UnwindSafe for TextSourcePiece
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.