pub struct ValueCodecDescriptor { /* private fields */ }Expand description
An immutable, safely erased bidirectional string codec for one value type.
Implementations§
Source§impl ValueCodecDescriptor
impl ValueCodecDescriptor
Sourcepub const fn of<C, V>() -> Selfwhere
C: Default + ValueEncoder<V, Output = String> + ValueDecoder<str, Output = V> + 'static,
<C as ValueEncoder<V>>::Error: Error + 'static,
<C as ValueDecoder<str>>::Error: Error + 'static,
V: 'static,
pub const fn of<C, V>() -> Selfwhere
C: Default + ValueEncoder<V, Output = String> + ValueDecoder<str, Output = V> + 'static,
<C as ValueEncoder<V>>::Error: Error + 'static,
<C as ValueDecoder<str>>::Error: Error + 'static,
V: 'static,
Creates a descriptor for codec C and value type V.
Sourcepub fn codec_type_id(&self) -> TypeId
pub fn codec_type_id(&self) -> TypeId
Returns the process-local codec type identity.
Sourcepub fn codec_type_name(&self) -> &'static str
pub fn codec_type_name(&self) -> &'static str
Returns the diagnostic codec type name.
Sourcepub fn value_type_id(&self) -> TypeId
pub fn value_type_id(&self) -> TypeId
Returns the process-local value type identity.
Sourcepub fn value_type_name(&self) -> &'static str
pub fn value_type_name(&self) -> &'static str
Returns the diagnostic value type name.
Trait Implementations§
Source§impl Clone for ValueCodecDescriptor
impl Clone for ValueCodecDescriptor
Source§fn clone(&self) -> ValueCodecDescriptor
fn clone(&self) -> ValueCodecDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ValueCodecDescriptor
Auto Trait Implementations§
impl Freeze for ValueCodecDescriptor
impl RefUnwindSafe for ValueCodecDescriptor
impl Send for ValueCodecDescriptor
impl Sync for ValueCodecDescriptor
impl Unpin for ValueCodecDescriptor
impl UnsafeUnpin for ValueCodecDescriptor
impl UnwindSafe for ValueCodecDescriptor
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