[−][src]Struct snarkos_dpc::base_dpc::record::record_serializer::RecordSerializer
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]
record: &Self::Record
) -> Result<(Vec<Self::Group>, bool), DPCError>
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]
serialized_record: Vec<Self::Group>,
final_sign_high: bool
) -> Result<Self::DeserializedRecord, DPCError>
Deserialize and return the record components
const SCALAR_FIELD_BITSIZE: usize
[src]
const INNER_FIELD_BITSIZE: usize
[src]
const OUTER_FIELD_BITSIZE: usize
[src]
const DATA_ELEMENT_BITSIZE: usize
[src]
const PAYLOAD_ELEMENT_BITSIZE: usize
[src]
Auto Trait Implementations
impl<C, P, G> RefUnwindSafe for RecordSerializer<C, P, G> where
C: RefUnwindSafe,
G: RefUnwindSafe,
P: RefUnwindSafe,
C: RefUnwindSafe,
G: RefUnwindSafe,
P: RefUnwindSafe,
impl<C, P, G> Send for RecordSerializer<C, P, G> where
C: Send,
C: Send,
impl<C, P, G> Sync for RecordSerializer<C, P, G> where
C: Sync,
C: Sync,
impl<C, P, G> Unpin for RecordSerializer<C, P, G> where
C: Unpin,
G: Unpin,
P: Unpin,
C: Unpin,
G: Unpin,
P: Unpin,
impl<C, P, G> UnwindSafe for RecordSerializer<C, P, G> where
C: UnwindSafe,
G: UnwindSafe,
P: UnwindSafe,
C: UnwindSafe,
G: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,