Struct quantmath::core::factories::Registry [−][src]
pub struct Registry<V> { /* fields omitted */ }
A registry of methods to deserialize objects given a tag to identify the type of object, using TypeId.
Methods
impl<V> Registry<V>
[src]
impl<V> Registry<V>
pub fn new() -> Registry<V>
[src]
pub fn new() -> Registry<V>
Creates an empty registry
pub fn insert(&mut self, key: &'static str, value: V)
[src]
pub fn insert(&mut self, key: &'static str, value: V)
Adds a creation method to the registry
Trait Implementations
impl<'r, 'de, V, S> SeedFactory<'de, TagString<'de>> for &'r Registry<S> where
&'r S: DeserializeSeed<'de, Value = V>,
[src]
impl<'r, 'de, V, S> SeedFactory<'de, TagString<'de>> for &'r Registry<S> where
&'r S: DeserializeSeed<'de, Value = V>,
type Value = V
The type of the value that will be produced by the DeserializeSeed
implementation. Read more
type Seed = &'r S
The type of the DeserializeSeed
implementation that will be returned by this factory. Read more
fn seed<E>(self, tag: TagString<'de>) -> Result<Self::Seed, E> where
E: Error,
[src]
fn seed<E>(self, tag: TagString<'de>) -> Result<Self::Seed, E> where
E: Error,
Returns the seed that should be used to deserialize a value tagged with the given tag. Read more