pub type SerdeTransaction = SerdeModuleEncoding<Transaction>;
Aliased Type§
struct SerdeTransaction(Vec<u8>, PhantomData<Transaction>);
Fields§
§0: Vec<u8>
§1: PhantomData<Transaction>
Implementations
Source§impl<T: Encodable + Decodable + 'static> SerdeModuleEncoding<T>
impl<T: Encodable + Decodable + 'static> SerdeModuleEncoding<T>
pub fn try_into_inner( &self, modules: &ModuleDecoderRegistry, ) -> Result<T, DecodeError>
Sourcepub fn try_into_inner_known_module_kind(
&self,
decoder: &Decoder,
) -> Result<T, DecodeError>
pub fn try_into_inner_known_module_kind( &self, decoder: &Decoder, ) -> Result<T, DecodeError>
In cases where we know exactly which module kind we expect but don’t have access to all decoders this function can be used instead.
Note that it just assumes the decoded module instance id to be valid since it cannot validate against the decoder registry. The lack of access to a decoder registry also makes decoding structs impossible that themselves contain module dyn-types (e.g. a module output containing a fedimint transaction).
Trait Implementations
Source§impl<T: Clone + Encodable + Decodable> Clone for SerdeModuleEncoding<T>
impl<T: Clone + Encodable + Decodable> Clone for SerdeModuleEncoding<T>
Source§fn clone(&self) -> SerdeModuleEncoding<T>
fn clone(&self) -> SerdeModuleEncoding<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for SerdeModuleEncoding<T>
impl<T> Debug for SerdeModuleEncoding<T>
Source§impl<'de, T: Encodable + Decodable> Deserialize<'de> for SerdeModuleEncoding<T>
impl<'de, T: Encodable + Decodable> Deserialize<'de> for SerdeModuleEncoding<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