Struct Term
pub struct Term<T> { /* private fields */ }
Expand description
A partially generated term.
Implementations§
§impl<T> Term<T>
impl<T> Term<T>
pub fn simple(data: T) -> Self
pub fn simple(data: T) -> Self
Create a new term which is just the expression data
.
pub fn new(data: T, num_bits: usize, operations: Vec<TermOp>) -> Self
pub fn new(data: T, num_bits: usize, operations: Vec<TermOp>) -> Self
Create a new term with a set of operations.
pub fn unwrap<C: CodeGenerator<T = T>>(self, g: &mut C) -> T
pub fn unwrap<C: CodeGenerator<T = T>>(self, g: &mut C) -> T
Apply all pending operations to the term, then return it.
pub fn unwrap_if_applied(self) -> T
pub fn unwrap_if_applied(self) -> T
Return the term, if there are no pending operations. Otherwise, panic.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Term<T>where
T: Freeze,
impl<T> RefUnwindSafe for Term<T>where
T: RefUnwindSafe,
impl<T> Send for Term<T>where
T: Send,
impl<T> Sync for Term<T>where
T: Sync,
impl<T> Unpin for Term<T>where
T: Unpin,
impl<T> UnwindSafe for Term<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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