pub trait StaticPairSerializable {
    type SA: Serializable;
    type SB: Serializable;

    // Required methods
    fn elements(&self) -> (&Self::SA, &Self::SB);
    fn into_elements(self) -> (Self::SA, Self::SB);
}
Expand description

Trait to represent serialisation of object’s data. Due to serialisation being Context-free in RADN, this functionality is in a separate trait.

Required Associated Types§

source

type SA: Serializable

First element’s type. Must equal StaticPair::A.

source

type SB: Serializable

Second element’s type. Must equal StaticPair::B.

Required Methods§

source

fn elements(&self) -> (&Self::SA, &Self::SB)

Borrow both elements.

source

fn into_elements(self) -> (Self::SA, Self::SB)

Separate into elements.

Implementations on Foreign Types§

source§

impl<A: Serializable, B: Serializable> StaticPairSerializable for (A, B)

§

type SA = A

§

type SB = B

source§

fn elements(&self) -> (&Self::SA, &Self::SB)

source§

fn into_elements(self) -> (Self::SA, Self::SB)

Implementors§