[][src]Struct snarkos_dpc::base_dpc::record::record_serializer::RecordSerializer

pub struct RecordSerializer<C: BaseDPCComponents, P: MontgomeryModelParameters + TEModelParameters, G: Group + ProjectiveCurve>(_, _, _);

Trait Implementations

impl<C: BaseDPCComponents, P: MontgomeryModelParameters + TEModelParameters, G: Group + ProjectiveCurve> RecordSerializerScheme for RecordSerializer<C, P, G>[src]

type DeserializedRecord = DeserializedRecord<C>

type Group = G

The group is composed of base field elements in Self::InnerField.

type InnerField = <C as DPCComponents>::InnerField

The inner field is equivalent to the base field in Self::Group.

type OuterField = <C as DPCComponents>::OuterField

The outer field is unrelated to Self::Group and Self::InnerField.

type Parameters = P

type Record = DPCRecord<C>

fn serialize(
    record: &Self::Record
) -> Result<(Vec<Self::Group>, bool), DPCError>
[src]

Records are serialized in a specialized format to be space-saving.

Serialized element 1 - [ Serial number nonce ] Serialized element 2 - [ Commitment randomness ] Serialized element 3 - [ Birth program id (part 1) ] Serialized element 4 - [ Death program id (part 1) ] Serialized element 5 - [ Birth program id (part 2) || Death program id (part 2) ] Serialized element 6 - [ Payload (part 1) || 1 ] Serialized element 7 - [ 1 || Sign high bits (7 bits) || Value || Payload (part 2) ]

fn deserialize(
    serialized_record: Vec<Self::Group>,
    final_sign_high: bool
) -> Result<Self::DeserializedRecord, DPCError>
[src]

Deserialize and return the record components

Auto Trait Implementations

impl<C, P, G> RefUnwindSafe for RecordSerializer<C, P, G> where
    C: RefUnwindSafe,
    G: RefUnwindSafe,
    P: RefUnwindSafe

impl<C, P, G> Send for RecordSerializer<C, P, G> where
    C: Send

impl<C, P, G> Sync for RecordSerializer<C, P, G> where
    C: Sync

impl<C, P, G> Unpin for RecordSerializer<C, P, G> where
    C: Unpin,
    G: Unpin,
    P: Unpin

impl<C, P, G> UnwindSafe for RecordSerializer<C, P, G> where
    C: UnwindSafe,
    G: UnwindSafe,
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,