Struct serde_reflection::Named [−][src]
pub struct Named<T> { pub name: String, pub value: T, }
Expand description
A named value. Used for named parameters or variants.
Fields
name: String
value: T
Trait Implementations
impl<'de, T> Deserialize<'de> for Named<T> where
T: Deserialize<'de>,
[src]
impl<'de, T> Deserialize<'de> for Named<T> where
T: Deserialize<'de>,
[src]fn deserialize<D>(deserializer: D) -> Result<Named<T>, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Named<T>, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<T> FormatHolder for Named<T> where
T: FormatHolder + Debug,
[src]
impl<T> FormatHolder for Named<T> where
T: FormatHolder + Debug,
[src]fn visit<'a>(
&'a self,
f: &mut dyn FnMut(&'a Format) -> Result<()>
) -> Result<()>
[src]
fn visit<'a>(
&'a self,
f: &mut dyn FnMut(&'a Format) -> Result<()>
) -> Result<()>
[src]Visit all the formats in self
in a depth-first way.
Variables are not supported and will cause an error. Read more
fn visit_mut(
&mut self,
f: &mut dyn FnMut(&mut Format) -> Result<()>
) -> Result<()>
[src]
fn visit_mut(
&mut self,
f: &mut dyn FnMut(&mut Format) -> Result<()>
) -> Result<()>
[src]Mutably visit all the formats in self
in a depth-first way. Read more
fn unify(&mut self, other: Named<T>) -> Result<()>
[src]
fn unify(&mut self, other: Named<T>) -> Result<()>
[src]Update variables and add missing enum variants so that the terms match. This is a special case of term unification: Read more
fn is_unknown(&self) -> bool
[src]
fn is_unknown(&self) -> bool
[src]Whether this format is a variable with no known value yet.
impl<T: Eq> Eq for Named<T>
[src]
impl<T> StructuralEq for Named<T>
[src]
impl<T> StructuralPartialEq for Named<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Named<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Named<T> where
T: Send,
T: Send,
impl<T> Sync for Named<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Named<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Named<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,