pub struct StaticCodecConfig<'a, T: StaticCodec> {
pub config: T::Config<'a>,
/* private fields */
}
Expand description
Utility struct to serialize a StaticCodec
’s StaticCodec::Config
together with its StaticCodec::CODEC_ID
Fields§
§config: T::Config<'a>
The configuration parameters
Implementations§
Source§impl<'a, T: StaticCodec> StaticCodecConfig<'a, T>
impl<'a, T: StaticCodec> StaticCodecConfig<'a, T>
Sourcepub const fn new(config: T::Config<'a>) -> Self
pub const fn new(config: T::Config<'a>) -> Self
Wraps the config
so that it can be serialized together with its
StaticCodec::CODEC_ID
Trait Implementations§
Source§impl<'de: 'a, 'a, T: StaticCodec> Deserialize<'de> for StaticCodecConfig<'a, T>
impl<'de: 'a, 'a, T: StaticCodec> Deserialize<'de> for StaticCodecConfig<'a, T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, T: StaticCodec> From<&<T as StaticCodec>::Config<'a>> for StaticCodecConfig<'a, T>
impl<'a, T: StaticCodec> From<&<T as StaticCodec>::Config<'a>> for StaticCodecConfig<'a, T>
Source§impl<'a, T: StaticCodec> Serialize for StaticCodecConfig<'a, T>
impl<'a, T: StaticCodec> Serialize for StaticCodecConfig<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for StaticCodecConfig<'a, T>
impl<'a, T> RefUnwindSafe for StaticCodecConfig<'a, T>
impl<'a, T> Send for StaticCodecConfig<'a, T>
impl<'a, T> Sync for StaticCodecConfig<'a, T>
impl<'a, T> Unpin for StaticCodecConfig<'a, T>
impl<'a, T> UnwindSafe for StaticCodecConfig<'a, T>
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