pub struct Def<T: Token> {
pub protected: bool,
pub long: bool,
pub outer: bool,
pub endswithbrace: bool,
pub arity: u8,
pub signature: Vec<ParamToken<T>>,
pub replacement: Vec<ExpToken<T>>,
}
Expand description
A macro defined via \def
, \edef
, \xdef
or \gdef
Fields§
§protected: bool
§long: bool
§outer: bool
§endswithbrace: bool
§arity: u8
§signature: Vec<ParamToken<T>>
§replacement: Vec<ExpToken<T>>
Implementations§
Source§impl<T: Token> Def<T>
impl<T: Token> Def<T>
Sourcepub fn expand<M: Mouth<T>, S: State<T>>(
&self,
state: &S,
mouth: &mut M,
cmd: Ptr<Command<T>>,
cause: Ptr<T>,
) -> Result<Vec<T>, Box<dyn TeXError<T>>>
pub fn expand<M: Mouth<T>, S: State<T>>( &self, state: &S, mouth: &mut M, cmd: Ptr<Command<T>>, cause: Ptr<T>, ) -> Result<Vec<T>, Box<dyn TeXError<T>>>
Expands the Def
into a Vec
of Token
s. cmd
and cause
are the command and
token that triggered the expansion, used for constructing the
SourceReference
s of the returned Token
s and
error messages.
Trait Implementations§
impl<T: Token> StructuralPartialEq for Def<T>
Auto Trait Implementations§
impl<T> Freeze for Def<T>
impl<T> RefUnwindSafe for Def<T>where
T: RefUnwindSafe,
impl<T> Send for Def<T>where
T: Send,
impl<T> Sync for Def<T>where
T: Sync,
impl<T> Unpin for Def<T>where
T: Unpin,
impl<T> UnwindSafe for Def<T>where
T: UnwindSafe,
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