Type Alias SerdeTransaction

Source
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>

Source

pub fn try_into_inner( &self, modules: &ModuleDecoderRegistry, ) -> Result<T, DecodeError>

Source

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>

Source§

fn clone(&self) -> SerdeModuleEncoding<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for SerdeModuleEncoding<T>
where T: Encodable + Decodable,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T: Encodable + Decodable> Deserialize<'de> for SerdeModuleEncoding<T>

Source§

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<T: Encodable + Decodable> From<&T> for SerdeModuleEncoding<T>

Source§

fn from(value: &T) -> Self

Converts to this type from the input type.
Source§

impl<T: Hash + Encodable + Decodable> Hash for SerdeModuleEncoding<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: PartialEq + Encodable + Decodable> PartialEq for SerdeModuleEncoding<T>

Source§

fn eq(&self, other: &SerdeModuleEncoding<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Encodable + Decodable> Serialize for SerdeModuleEncoding<T>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Eq + Encodable + Decodable> Eq for SerdeModuleEncoding<T>

Source§

impl<T: Encodable + Decodable> StructuralPartialEq for SerdeModuleEncoding<T>