pub struct Term<K> {
pub blocks: Vec<K>,
pub term: Arc<dyn Fn(&[String]) -> String>,
}Fields§
§blocks: Vec<K>§term: Arc<dyn Fn(&[String]) -> String>Implementations§
Source§impl<K> Term<K>
impl<K> Term<K>
pub fn raw(a: String) -> Self
pub fn core(k: K) -> Self
pub fn prepend_stmt(self, a: String) -> Self
pub fn if(self, cond: String, else: Term<K>) -> Self
pub fn map<U, E>(self, f: impl FnMut(K) -> Result<U, E>) -> Result<Term<U>, E>
pub fn as_ref(&self) -> Term<&K>
pub fn as_mut(&mut self) -> Term<&mut K>
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for Term<K>
impl<K> !RefUnwindSafe for Term<K>
impl<K> !Send for Term<K>
impl<K> !Sync for Term<K>
impl<K> Unpin for Term<K>where
K: Unpin,
impl<K> !UnwindSafe for Term<K>
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