pub struct FragmentSerdeDriver;Expand description
Writes and reads the entries of the fragments table (FRAGMENTS_TABLE),
which holds one kind of object, fragments (FRAGMENT_IDENTIFIER).
writer and reader register it on every FLM session. A fragment’s
entry is {source, tree, diagnostics: {items, limit, suppressed, error_count}, layout}:
source: the position of the fragment’s source in the sources table;tree: the position of its tree in the trees table (the tree written by itsArc, as a tree with techy’s unit annotation, that is, with no per-node annotation value);diagnostics: the positions of its retained diagnostics in the diagnostics table, in the order they were recorded, with the collection’s retention limit, its number of suppressed diagnostics and its number of errors;layout: the fragment’s region layout (FragmentLayout),blocks,inlineorinline-or-blocks.
Reading rebuilds the fragment from the shared source, the rebuilt tree and a diagnostics collection rebuilt from the retained items, the limit and the counts after techy checks that the counts are consistent. An entry whose tree was parsed from another source than the entry’s source is refused. The module documentation says what a round trip preserves.
Trait Implementations§
Source§impl Debug for FragmentSerdeDriver
impl Debug for FragmentSerdeDriver
Source§impl Default for FragmentSerdeDriver
impl Default for FragmentSerdeDriver
Source§impl ObjectSerdeDriver<Flm> for FragmentSerdeDriver
impl ObjectSerdeDriver<Flm> for FragmentSerdeDriver
Source§type Object = Fragment
type Object = Fragment
The kind of object the table holds — a concrete type, or a trait object type
(
dyn …) for a heterogeneous table. Objects are shared with the session as
Arc<Self::Object>.Source§type Index = FragmentIndex
type Index = FragmentIndex
The typed table position of this table — a type defined with
serial_index!.Source§fn table_name(&self) -> &'static str
fn table_name(&self) -> &'static str
The table’s name: how a segment identifies the table, so that a reading session
with a different registration order finds it. Read more
Source§fn homogeneous_identifier(&self) -> Option<&'static str>
fn homogeneous_identifier(&self) -> Option<&'static str>
Source§fn serialize_object(
&self,
fragment: &Arc<Fragment>,
cx: &mut SerializeContext<'_, Flm>,
) -> Result<SerialEntry, SerializeError>
fn serialize_object( &self, fragment: &Arc<Fragment>, cx: &mut SerializeContext<'_, Flm>, ) -> Result<SerialEntry, SerializeError>
Produces the entry for
object. Read moreSource§fn deserialize_object(
&self,
entry: &SerialEntry,
cx: &mut DeserializeContext<'_, Flm>,
) -> Result<Arc<Fragment>, DeserializeError>
fn deserialize_object( &self, entry: &SerialEntry, cx: &mut DeserializeContext<'_, Flm>, ) -> Result<Arc<Fragment>, DeserializeError>
Rebuilds the object of
entry. Read moreAuto Trait Implementations§
impl Forget for FragmentSerdeDriver
impl Freeze for FragmentSerdeDriver
impl Move for FragmentSerdeDriver
impl RefUnwindSafe for FragmentSerdeDriver
impl Send for FragmentSerdeDriver
impl Sync for FragmentSerdeDriver
impl Unpin for FragmentSerdeDriver
impl UnsafeUnpin for FragmentSerdeDriver
impl UnwindSafe for FragmentSerdeDriver
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> 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.