Enum serde_reflection::Format [−][src]
pub enum Format {}Show variants
Variable(Variable<Format>), TypeName(String), Unit, Bool, I8, I16, I32, I64, I128, U8, U16, U32, U64, U128, F32, F64, Char, Str, Bytes, Option(Box<Format>), Seq(Box<Format>), Map { key: Box<Format>, value: Box<Format>, }, Tuple(Vec<Format>), TupleArray { content: Box<Format>, size: usize, },
Expand description
Serde-based serialization format for anonymous “value” types.
Variants
A format whose value is initially unknown. Used internally for tracing. Not (de)serializable.
TypeName(String)
The name of a container.
The format of Option<T>
.
A sequence, e.g. the format of Vec<Foo>
.
A map, e.g. the format of BTreeMap<K, V>
.
A tuple, e.g. the format of (Foo, Bar)
.
Alias for (Foo, ... Foo)
.
E.g. the format of [Foo; N]
.
Implementations
Trait Implementations
impl<'de> Deserialize<'de> for Format
[src]
impl<'de> Deserialize<'de> for Format
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl FormatHolder for Format
[src]
impl FormatHolder for Format
[src]fn unify(&mut self, format: Format) -> Result<()>
[src]
fn unify(&mut self, format: Format) -> Result<()>
[src]Unify the newly “traced” value format
into the current format.
Note that there should be no TupleArray
s at this point.
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 is_unknown(&self) -> bool
[src]
fn is_unknown(&self) -> bool
[src]Whether this format is a variable with no known value yet.
impl Eq for Format
[src]
impl StructuralEq for Format
[src]
impl StructuralPartialEq for Format
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Format
impl !Send for Format
impl !Sync for Format
impl Unpin for Format
impl !UnwindSafe for Format
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>,