pub struct BoxTarget<ET: EngineTypes>(/* private fields */);Expand description
Once a box is closed, something is supposed to happen to it; most commonly, it is just added to the parent
node list; but occasionally, something else should happen to it - e.g. \setbox5\hbox{...} implies that
after the node list of the box is closed, it should be put into the box register with index 5 instead.
This struct abstracts over that by carrying a continuation function to be called when the box is closed.
TODO: rethink this in light of ListTarget.
Implementations§
Source§impl<ET: EngineTypes> BoxTarget<ET>
impl<ET: EngineTypes> BoxTarget<ET>
Sourcepub fn new<F: FnOnce(&mut EngineReferences<'_, ET>, TeXBox<ET>) -> TeXResult<(), ET> + 'static>(
f: F,
) -> Self
pub fn new<F: FnOnce(&mut EngineReferences<'_, ET>, TeXBox<ET>) -> TeXResult<(), ET> + 'static>( f: F, ) -> Self
Create a new box target from the given continuation function.
Trait Implementations§
Source§impl<ET: EngineTypes> Clone for BoxTarget<ET>
impl<ET: EngineTypes> Clone for BoxTarget<ET>
Auto Trait Implementations§
impl<ET> Freeze for BoxTarget<ET>
impl<ET> !RefUnwindSafe for BoxTarget<ET>
impl<ET> !Send for BoxTarget<ET>
impl<ET> !Sync for BoxTarget<ET>
impl<ET> Unpin for BoxTarget<ET>
impl<ET> UnsafeUnpin for BoxTarget<ET>
impl<ET> !UnwindSafe for BoxTarget<ET>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more