pub struct Labels {
pub by_label: BTreeMap<Label, PointId>,
pub duplicates: Vec<DuplicateLabel>,
pub refused: Vec<RefusedLabel>,
}Expand description
The label table, flm.labels (LABELS): for every label, the first
point that wrote it; the labels written more than once; and the labels
refused because the point they were written for does not accept their
type.
The points themselves (their kinds, their labels as written, their anchor
policies) are held in the table of the
refpoints feature,
REFPOINTS, which the
label scan (SCAN) reads; this table holds what the labels make of them.
Fields§
§by_label: BTreeMap<Label, PointId>From a label to the point that keeps it.
duplicates: Vec<DuplicateLabel>The labels written more than once, in document order of the later point.
refused: Vec<RefusedLabel>The labels whose type the point they were written for does not accept, in document order of that point.
Implementations§
Source§impl Labels
impl Labels
Sourcepub fn insert(&mut self, record: &RefPointRecord)
pub fn insert(&mut self, record: &RefPointRecord)
Records the labels of a point: each label joins the index unless it is a written label whose type the point does not accept (a refusal is then recorded; the point’s computed labels are not checked) or an earlier point already keeps it (a duplicate is then recorded). The label scan records the points in document order, so that the first point to write a label keeps it.
Trait Implementations§
Source§impl SingletonTable for Labels
impl SingletonTable for Labels
Source§impl Table for Labels
impl Table for Labels
Source§fn absorb(&mut self, piece: Labels)
fn absorb(&mut self, piece: Labels)
The label scan runs once for the document and writes one table piece; a table piece absorbed after another keeps the labels of the earlier one, as a later point would.
Source§fn project(&self, cx: &dyn ProjectCx) -> SerialValue
fn project(&self, cx: &dyn ProjectCx) -> SerialValue
Projects the table as {labels: {<label>: <point>}, duplicates: […], refused: […]}.
Source§fn piece_class(&self) -> PieceClass
fn piece_class(&self) -> PieceClass
A label states a fact about the document, which a synthesized value (a small tree a stage builds during a run) may never state.
Auto Trait Implementations§
impl Forget for Labels
impl Freeze for Labels
impl Move for Labels
impl RefUnwindSafe for Labels
impl Send for Labels
impl Sync for Labels
impl Unpin for Labels
impl UnsafeUnpin for Labels
impl UnwindSafe for Labels
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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