pub struct Variable<T>(/* private fields */);
Expand description
A mutable holder for an initially unknown value.
Implementations§
Trait Implementations§
Source§impl<T> FormatHolder for Variable<T>
impl<T> FormatHolder for Variable<T>
Source§fn visit<'a>(
&'a self,
_f: &mut dyn FnMut(&'a Format) -> Result<()>,
) -> Result<()>
fn visit<'a>( &'a self, _f: &mut dyn FnMut(&'a Format) -> Result<()>, ) -> Result<()>
Visit all the formats in
self
in a depth-first way.
Variables are not supported and will cause an error.Source§fn visit_mut(
&mut self,
f: &mut dyn FnMut(&mut Format) -> Result<()>,
) -> Result<()>
fn visit_mut( &mut self, f: &mut dyn FnMut(&mut Format) -> Result<()>, ) -> Result<()>
Mutably visit all the formats in
self
in a depth-first way. Read moreSource§fn unify(&mut self, _other: Variable<T>) -> Result<()>
fn unify(&mut self, _other: Variable<T>) -> Result<()>
Update variables and add missing enum variants so that the terms match.
This is a special case of term unification: Read more
Source§fn is_unknown(&self) -> bool
fn is_unknown(&self) -> bool
Whether this format is a variable with no known value yet.
impl<T: Eq> Eq for Variable<T>
impl<T> StructuralPartialEq for Variable<T>
Auto Trait Implementations§
impl<T> Freeze for Variable<T>
impl<T> !RefUnwindSafe for Variable<T>
impl<T> !Send for Variable<T>
impl<T> !Sync for Variable<T>
impl<T> Unpin for Variable<T>
impl<T> !UnwindSafe for Variable<T>
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