pub struct TextMacro {
pub source: Arc<Vec<u8>>,
pub description: Arc<String>,
pub name: Arc<Vec<u8>>,
}Expand description
A macro defined using text.
Fields§
§source: Arc<Vec<u8>>The source backing the macro.
description: Arc<String>The macro’s description.
name: Arc<Vec<u8>>The macro’s name.
Trait Implementations§
Source§impl Macro for TextMacro
impl Macro for TextMacro
Source§fn description(&self) -> &str
fn description(&self) -> &str
The macro’s description.
Source§fn eval<'arg, 'reg: 'arg, 'exec: 'reg>(
&self,
exec: &'exec Executor,
_vars: &'reg mut VariableRegistry,
_rng: &mut Xoshiro128PlusPlus,
args: &mut dyn Iterator<Item = &'arg [u8]>,
) -> Result<Cow<'static, [u8]>, MacroError>
fn eval<'arg, 'reg: 'arg, 'exec: 'reg>( &self, exec: &'exec Executor, _vars: &'reg mut VariableRegistry, _rng: &mut Xoshiro128PlusPlus, args: &mut dyn Iterator<Item = &'arg [u8]>, ) -> Result<Cow<'static, [u8]>, MacroError>
Evaluates the macro.
impl StructuralPartialEq for TextMacro
Auto Trait Implementations§
impl Freeze for TextMacro
impl RefUnwindSafe for TextMacro
impl Send for TextMacro
impl Sync for TextMacro
impl Unpin for TextMacro
impl UnwindSafe for TextMacro
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,
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