pub struct RefPointRecord {
pub id: PointId,
pub point: RefPoint,
pub span: FlmSpan,
}Expand description
A RefPointRecord is one entry of the table REFPOINTS. It contains a
reference point as the Referenceable aspect of its node returned it,
together with the identifier of the reference point and the span of the
node.
Fields§
§id: PointIdThe identifier of the reference point: the address of its node and the index of the reference point among the reference points of that node.
point: RefPointThe reference point, as the Referenceable aspect of the node
returned it.
span: FlmSpanThe span of the node that has the reference point. The stages that report a diagnostic about the reference point report it at this span.
Implementations§
Source§impl RefPointRecord
impl RefPointRecord
Sourcepub fn mentions(&self) -> Vec<(String, Option<&Label>)>
pub fn mentions(&self) -> Vec<(String, Option<&Label>)>
Returns the labels of this reference point and the texts that were
written as labels but are not of the form type:label, in one list.
Each item contains the text of a label and the parsed label, or a
malformed text and None. The labels that the element computed come
first. The labels written in the document and the malformed texts
follow, in the order in which the document wrote them.
A RefPoint stores its labels (RefPoint::labels) and its
malformed texts (RefPoint::malformed) in two separate lists. This
method merges the two lists by the
position of each
malformed text. Call it when you need the order in which the document
mentions the labels. For instance, the safe labels stage of the refs
feature (SafeLabelsStage)
numbers the labels in this order.
Trait Implementations§
Source§impl Clone for RefPointRecord
impl Clone for RefPointRecord
Auto Trait Implementations§
impl !RefUnwindSafe for RefPointRecord
impl !UnwindSafe for RefPointRecord
impl Forget for RefPointRecord
impl Freeze for RefPointRecord
impl Move for RefPointRecord
impl Send for RefPointRecord
impl Sync for RefPointRecord
impl Unpin for RefPointRecord
impl UnsafeUnpin for RefPointRecord
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