pub struct TableProjection<'a> { /* private fields */ }Expand description
The context through which a table projects itself: a Projector and the
trees (TreeSource) in which the table’s node references are resolved.
This is the implementation of ProjectCx the library uses, so that every
table’s project renders node addresses and tree ids in
the projection’s vocabulary. Create one with
Projector::table_projection, or let Projector::table create it.
Trait Implementations§
Source§impl ProjectCx for TableProjection<'_>
impl ProjectCx for TableProjection<'_>
Source§fn node_ref(&self, addr: NodeAddr) -> SerialValue
fn node_ref(&self, addr: NodeAddr) -> SerialValue
Renders the address as elem@line:col, looking the node up in the tree
the address designates. An address whose tree is not in the
TreeSource renders as ?@<tree>/<node index>. This happens when a
table stores the address of a node in a synthesized value, which
crate::model::addr forbids, or of a tree the source does not hold;
the projection then shows the error instead of hiding it.
Source§fn tree(&self, tree: &NodeTree<Flm>) -> SerialValue
fn tree(&self, tree: &NodeTree<Flm>) -> SerialValue
Projects the tree inline, as Projector::tree does.
Source§fn tree_ref(&self, id: TreeId) -> SerialValue
fn tree_ref(&self, id: TreeId) -> SerialValue
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TableProjection<'a>
impl<'a> !Send for TableProjection<'a>
impl<'a> !Sync for TableProjection<'a>
impl<'a> !UnwindSafe for TableProjection<'a>
impl<'a> Forget for TableProjection<'a>
impl<'a> Freeze for TableProjection<'a>
impl<'a> Move for TableProjection<'a>
impl<'a> Unpin for TableProjection<'a>
impl<'a> UnsafeUnpin for TableProjection<'a>
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
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>,
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>
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> ⓘ
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> ⓘ
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 more