pub struct ExternalIndex {
pub targets: BTreeMap<Label, ExternalTarget>,
}Expand description
The external index, flm.refs.external-index (EXTERNAL_INDEX): from
a label of another document to its target.
An embedding program that processes several documents installs it when it
constructs a run (Externals); no stage
writes it. The resolve stage (RESOLVE) reads it when the caller
has installed it and looks a
label up there only when no point of the document carries it; a run
without it has no external labels.
To install one, build it with ExternalIndex::new and
with, one ExternalTarget per label, and pass
it as Externals::none().install_unstamped(EXTERNAL_INDEX, index)
(Externals::install_unstamped)
when the run is constructed.
Fields§
§targets: BTreeMap<Label, ExternalTarget>From a label to its target.
Implementations§
Source§impl ExternalIndex
impl ExternalIndex
Sourcepub fn new() -> ExternalIndex
pub fn new() -> ExternalIndex
An empty index.
Sourcepub fn with(self, label: Label, target: ExternalTarget) -> ExternalIndex
pub fn with(self, label: Label, target: ExternalTarget) -> ExternalIndex
Builder: adds a target, replacing any target already held for that label.
Trait Implementations§
Source§impl Clone for ExternalIndex
impl Clone for ExternalIndex
Source§impl Debug for ExternalIndex
impl Debug for ExternalIndex
Source§impl Default for ExternalIndex
impl Default for ExternalIndex
Source§impl SingletonTable for ExternalIndex
impl SingletonTable for ExternalIndex
Source§impl Table for ExternalIndex
impl Table for ExternalIndex
Source§fn absorb(&mut self, piece: ExternalIndex)
fn absorb(&mut self, piece: ExternalIndex)
Source§fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
fn project(&self, _cx: &dyn ProjectCx) -> SerialValue
crate::dump) and tests. Read moreSource§fn piece_class(&self) -> PieceClass
fn piece_class(&self) -> PieceClass
Auto Trait Implementations§
impl !RefUnwindSafe for ExternalIndex
impl !UnwindSafe for ExternalIndex
impl Forget for ExternalIndex
impl Freeze for ExternalIndexwhere
*const LeafNode<Label, ExternalTarget> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(Label, ExternalTarget)>>: Freeze,
impl Move for ExternalIndex
impl Send for ExternalIndexwhere
NodeRef<Owned, Label, ExternalTarget, LeafOrInternal>: Send,
BoxRaw<(Label, ExternalTarget)>: Send,
impl Sync for ExternalIndexwhere
NodeRef<Owned, Label, ExternalTarget, LeafOrInternal>: Sync,
BoxRaw<(Label, ExternalTarget)>: Sync,
impl Unpin for ExternalIndex
impl UnsafeUnpin for ExternalIndexwhere
*const LeafNode<Label, ExternalTarget> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(Label, ExternalTarget)>>: UnsafeUnpin,
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