Struct serde_reflection::Variable
source · [−]pub struct Variable<T>(_);
Expand description
A mutable holder for an initially unknown value.
Implementations
Trait Implementations
sourceimpl<T> FormatHolder for Variable<T> where
T: FormatHolder + Debug + Clone,
impl<T> FormatHolder for Variable<T> where
T: FormatHolder + Debug + Clone,
sourcefn 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. Read more
sourcefn 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 more
sourcefn 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
sourcefn 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> StructuralEq for Variable<T>
impl<T> StructuralPartialEq for Variable<T>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more