pub struct ListTarget<ET: EngineTypes, N>(/* private fields */);Expand description
Once a node list is closed, something is supposed to happen to it; most commonly, it is a box-list;
but occasionally, something else should happen to it - e.g. \vadjust{...} adds the list’s contents
as a vertical adjustment, a^{...} adds it to the superscript-field of the a.character etc.
This struct abstracts over that by carrying a continuation function to be called when the list is closed.
TODO: rethink this in light of BoxTarget.
Implementations§
Source§impl<ET: EngineTypes, N> ListTarget<ET, N>
impl<ET: EngineTypes, N> ListTarget<ET, N>
Sourcepub fn new<F: FnOnce(&mut EngineReferences<'_, ET>, Vec<N>, SourceRef<ET>) -> TeXResult<(), ET> + 'static>(
f: F,
) -> Self
pub fn new<F: FnOnce(&mut EngineReferences<'_, ET>, Vec<N>, SourceRef<ET>) -> TeXResult<(), ET> + 'static>( f: F, ) -> Self
Create a new list target from the given continuation function.
Trait Implementations§
Source§impl<ET: EngineTypes, N> Clone for ListTarget<ET, N>
impl<ET: EngineTypes, N> Clone for ListTarget<ET, N>
Auto Trait Implementations§
impl<ET, N> Freeze for ListTarget<ET, N>
impl<ET, N> !RefUnwindSafe for ListTarget<ET, N>
impl<ET, N> !Send for ListTarget<ET, N>
impl<ET, N> !Sync for ListTarget<ET, N>
impl<ET, N> Unpin for ListTarget<ET, N>
impl<ET, N> UnsafeUnpin for ListTarget<ET, N>
impl<ET, N> !UnwindSafe for ListTarget<ET, N>
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