pub trait Serial {
// Required method
fn serial<B>(&self, out: &mut B)
where B: Buffer;
}Expand description
Trait implemented by types which can be encoded into byte arrays. The intention is that the encoding is binary and not human readable.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Serial for SocketAddr
impl Serial for SocketAddr
Source§impl Serial for String
Serialize a string by encoding its length as a u64 in big endian and then
the utf8 encoding of the content.
impl Serial for String
Serialize a string by encoding its length as a u64 in big endian and then the utf8 encoding of the content.
Source§impl Serial for QuadExtField<Fp12ConfigWrapper<Fq12Config>>
This implementation is ad-hoc, using the fact that Fq12 is defined
via that specific tower of extensions (of degrees) 2 -> 3 -> 2,
and the specific representation of those fields.
We use big-endian representation all the way down to the field Fq.
impl Serial for QuadExtField<Fp12ConfigWrapper<Fq12Config>>
This implementation is ad-hoc, using the fact that Fq12 is defined via that specific tower of extensions (of degrees) 2 -> 3 -> 2, and the specific representation of those fields. We use big-endian representation all the way down to the field Fq.
Source§impl<K, V> Serial for BTreeMap<K, V>
Serialize a map by encoding its size as a u64 in big endian and then
the list of key-value pairs in increasing order of keys.
impl<K, V> Serial for BTreeMap<K, V>
Serialize a map by encoding its size as a u64 in big endian and then the list of key-value pairs in increasing order of keys.
Source§impl<T> Serial for &[T]where
T: Serial,
Serialize a slice by encoding its length as a u64 in big endian and then
the list of elements in sequence.
impl<T> Serial for &[T]where
T: Serial,
Serialize a slice by encoding its length as a u64 in big endian and then the list of elements in sequence.
Source§impl<T> Serial for Option<T>where
T: Serial,
None is serialized as 0u8, Some(v) is serialized by prepending 1u8
to the serialization of v.
impl<T> Serial for Option<T>where
T: Serial,
None is serialized as 0u8, Some(v) is serialized by prepending 1u8
to the serialization of v.
Source§impl<T> Serial for Vec<T>where
T: Serial,
Serialize a vector by encoding its length as a u64 in big endian and then
the list of elements in sequence.
impl<T> Serial for Vec<T>where
T: Serial,
Serialize a vector by encoding its length as a u64 in big endian and then the list of elements in sequence.
Source§impl<V> Serial for BTreeSet<V>where
V: Serial,
Serialize a set by encoding its size as a u64 in big endian and then
the list of elements in increasing order.
impl<V> Serial for BTreeSet<V>where
V: Serial,
Serialize a set by encoding its size as a u64 in big endian and then the list of elements in increasing order.
Implementors§
impl Serial for SchemeId
Serialization of relevant types.
impl Serial for VerifyKey
impl Serial for Address
impl Serial for DelegationTarget
impl Serial for Level1Update
impl Serial for OpenStatus
impl Serial for ProtocolVersion
impl Serial for RootUpdate
impl Serial for UpdatePayload
impl Serial for WasmVersion
impl Serial for Payload
impl Serial for Network
impl Serial for Web3IdAttribute
impl Serial for Keypair
impl Serial for concordium_rust_sdk::ecvrf::Proof
Implements step 8 of https://tools.ietf.org/html/draft-irtf-cfrg-vrf-07.html#section-5.1 i.e. transforms a proof to a byte string
impl Serial for concordium_rust_sdk::ecvrf::PublicKey
impl Serial for concordium_rust_sdk::ecvrf::SecretKey
impl Serial for Ed25519DlogProof
impl Serial for EncryptedAmountAggIndex
impl Serial for EncryptedAmountIndex
impl Serial for AttributeKind
impl Serial for Threshold
impl Serial for AccountOwnershipProof
impl Serial for AccountOwnershipSignature
impl Serial for ArIdentity
impl Serial for AttributeTag
impl Serial for ChoiceArParameters
impl Serial for CredentialPublicKeys
impl Serial for Description
impl Serial for IpCdiSignature
impl Serial for IpIdentity
impl Serial for IpMetadata
impl Serial for YearMonth
impl Serial for RawCbor
impl Serial for TokenId
impl Serial for BlockSignature
impl Serial for FinalizerIndex
impl Serial for QuorumSignature
impl Serial for TimeoutSignature
impl Serial for Duration
impl Serial for Parameter<'_>
impl Serial for ContractName<'_>
impl Serial for ModuleSource
impl Serial for OwnedContractName
impl Serial for OwnedParameter
impl Serial for OwnedReceiveName
impl Serial for ReceiveName<'_>
impl Serial for WasmModule
impl Serial for AbsoluteBlockHeight
impl Serial for AccessStructure
impl Serial for AccountIndex
impl Serial for AmountFraction
impl Serial for AuthorizationsV0
impl Serial for AuthorizationsV1
impl Serial for BakerAggregationSignKey
impl Serial for BakerAggregationVerifyKey
impl Serial for BakerElectionSignKey
impl Serial for BakerElectionVerifyKey
impl Serial for BakerId
impl Serial for BakerKeyPairs
impl Serial for BakerParameters
impl Serial for BakerSignatureSignKey
impl Serial for BakerSignatureVerifyKey
impl Serial for BlockHeight
impl Serial for CapitalBound
impl Serial for CommissionRanges
impl Serial for CommissionRates
impl Serial for ContractAddress
impl Serial for CooldownParameters
impl Serial for CreatePlt
impl Serial for CredentialRegistrationID
impl Serial for CredentialsPerBlockLimit
impl Serial for DelegatorId
impl Serial for DurationSeconds
impl Serial for ElectionDifficulty
impl Serial for Energy
impl Serial for Epoch
impl Serial for ExchangeRate
impl Serial for FinalizationCommitteeParameters
impl Serial for FinalizationIndex
impl Serial for GASRewards
impl Serial for GASRewardsV1
impl Serial for GenesisIndex
impl Serial for LeverageFactor
impl Serial for Memo
impl Serial for MintDistributionV0
impl Serial for MintDistributionV1
impl Serial for MintRate
impl Serial for Nonce
impl Serial for PartsPerHundredThousands
impl Serial for PoolParameters
impl Serial for ProtocolUpdate
impl Serial for RegisteredData
impl Serial for RewardPeriodLength
impl Serial for Round
impl Serial for Slot
impl Serial for SlotDuration
impl Serial for TimeParameters
impl Serial for TimeoutParameters
impl Serial for TransactionFeeDistribution
impl Serial for TransactionIndex
impl Serial for UpdateHeader
impl Serial for UpdateInstruction
impl Serial for UpdateInstructionSignature
impl Serial for UpdateKeysIndex
impl Serial for UpdateKeysThreshold
impl Serial for UpdatePublicKey
impl Serial for UpdateSequenceNumber
impl Serial for UrlText
impl Serial for ValidatorScoreParameters
impl Serial for PreAccountTransaction
Serialize only the header and payload, so that this can be deserialized as a transaction body.
impl Serial for AccountAccessStructure
impl Serial for AddBakerPayload
impl Serial for EncodedPayload
This serial instance does not have an inverse. It needs a context with the length.
impl Serial for InitContractPayload
impl Serial for PayloadSize
impl Serial for TransactionHeader
impl Serial for UpdateContractPayload
impl Serial for LinkingProof
impl Serial for Challenge
impl Serial for Encoded<UpdatePayload>
impl Serial for Version
impl Serial for AccountAddress
impl Serial for Amount
impl Serial for CredentialIndex
impl Serial for KeyIndex
impl Serial for concordium_rust_sdk::common::types::Ratio
impl Serial for concordium_rust_sdk::common::types::Signature
impl Serial for Timestamp
impl Serial for TransactionSignature
impl Serial for TransactionTime
impl<C1, C2> Serial for concordium_base::sigma_protocols::com_eq_different_groups::Response<C1, C2>
impl<C> Serial for AggregatedDecryptedAmount<C>where
C: Curve,
impl<C> Serial for EncryptedAmount<C>where
C: Curve,
impl<C> Serial for EncryptedAmountTransferData<C>where
C: Curve,
impl<C> Serial for EncryptedAmountTransferProof<C>where
C: Curve,
impl<C> Serial for IndexedEncryptedAmount<C>where
C: Curve,
impl<C> Serial for SecToPubAmountTransferData<C>where
C: Curve,
impl<C> Serial for SecToPubAmountTransferProof<C>where
C: Curve,
impl<C> Serial for concordium_rust_sdk::id::dodis_yampolskiy_prf::SecretKey<C>where
C: Curve,
impl<C> Serial for BabyStepGiantStep<C>where
C: Curve,
impl<C> Serial for Cipher<C>where
C: Curve,
impl<C> Serial for Message<C>where
C: Curve,
impl<C> Serial for concordium_rust_sdk::id::elgamal::PublicKey<C>where
C: Curve,
impl<C> Serial for concordium_rust_sdk::id::elgamal::Randomness<C>where
C: Curve,
impl<C> Serial for concordium_rust_sdk::id::elgamal::SecretKey<C>where
C: Curve,
impl<C> Serial for Commitment<C>where
C: Curve,
impl<C> Serial for CommitmentKey<C>where
C: Curve,
impl<C> Serial for concordium_rust_sdk::id::pedersen_commitment::Randomness<C>where
C: Curve,
impl<C> Serial for Value<C>where
C: Curve,
impl<C> Serial for VecCommitmentKey<C>where
C: Curve,
impl<C> Serial for KnownMessage<C>where
C: Pairing,
impl<C> Serial for concordium_rust_sdk::id::ps_sig::PublicKey<C>where
C: Pairing,
impl<C> Serial for concordium_rust_sdk::id::ps_sig::SecretKey<C>where
C: Pairing,
impl<C> Serial for concordium_rust_sdk::id::ps_sig::Signature<C>where
C: Pairing,
impl<C> Serial for UnknownMessage<C>where
C: Pairing,
impl<C> Serial for Generators<C>where
C: Curve,
impl<C> Serial for RangeProof<C>where
C: Curve,
impl<C> Serial for AccCredentialInfo<C>where
C: Curve,
impl<C> Serial for ArData<C>where
C: Curve,
impl<C> Serial for ArInfo<C>where
C: Curve,
impl<C> Serial for ChainArData<C>where
C: Curve,
impl<C> Serial for ChainArDecryptedData<C>where
C: Curve,
impl<C> Serial for CredentialDeploymentCommitments<C>where
C: Curve,
impl<C> Serial for CredentialHolderInfo<C>where
C: Curve,
impl<C> Serial for GlobalContext<C>where
C: Curve,
impl<C> Serial for IdCredentials<C>where
C: Curve,
impl<C> Serial for IpAnonymityRevokers<C>where
C: Curve,
impl<C> Serial for IpArData<C>where
C: Curve,
impl<C> Serial for IpArDecryptedData<C>where
C: Curve,
impl<C> Serial for PublicInformationForIp<C>where
C: Curve,
impl<C> Serial for SignedCommitments<C>where
C: Curve,
impl<C> Serial for InnerProductProof<C>where
C: Curve,
impl<C> Serial for SetMembershipProof<C>where
C: Curve,
impl<C> Serial for SetNonMembershipProof<C>where
C: Curve,
impl<C> Serial for concordium_base::sigma_protocols::aggregate_dlog::Response<C>where
C: Curve,
impl<C> Serial for concordium_base::sigma_protocols::com_ineq::Response<C>where
C: Curve,
impl<C> Serial for concordium_base::sigma_protocols::com_lin::Response<C>where
C: Curve,
impl<C> Serial for concordium_base::sigma_protocols::com_mult::Response<C>where
C: Curve,
impl<C> Serial for concordium_base::sigma_protocols::dlog::Response<C>where
C: Curve,
impl<C> Serial for EncTransCommit<C>where
C: Curve,
impl<C> Serial for EncTransResponse<C>where
C: Curve,
impl<C> Serial for EncTransState<C>where
C: Curve,
impl<C> Serial for concordium_base::sigma_protocols::vcom_eq::Response<C>where
C: Curve,
impl<C> Serial for VecComEq<C>where
C: Curve,
impl<C, AttributeType> Serial for AtomicProof<C, AttributeType>
impl<C, AttributeType> Serial for AccountCredentialWithoutProofs<C, AttributeType>
impl<C, AttributeType> Serial for CredentialProof<C, AttributeType>
impl<C, AttributeType> Serial for concordium_rust_sdk::id::id_proof_types::Proof<C, AttributeType>
impl<C, AttributeType> Serial for Statement<C, AttributeType>
impl<C, AttributeType> Serial for StatementWithContext<C, AttributeType>
impl<C, AttributeType> Serial for CredentialDeploymentValues<C, AttributeType>
impl<C, AttributeType> Serial for InitialCredentialDeploymentInfo<C, AttributeType>
impl<C, AttributeType> Serial for InitialCredentialDeploymentValues<C, AttributeType>
impl<C, AttributeType> Serial for Policy<C, AttributeType>
impl<C, AttributeType> Serial for Presentation<C, AttributeType>
impl<C, D> Serial for CommittedMessages<C, D>
impl<C, TagType, AttributeType> Serial for AtomicStatement<C, TagType, AttributeType>
impl<C, TagType, AttributeType> Serial for AttributeInRangeStatement<C, TagType, AttributeType>
impl<C, TagType, AttributeType> Serial for AttributeInSetStatement<C, TagType, AttributeType>
impl<C, TagType, AttributeType> Serial for AttributeNotInSetStatement<C, TagType, AttributeType>
impl<F> Serial for ArkField<F>where
F: Serial,
Serialization is implemented by delegating the functionality to the wrapped type.
impl<F, AttributeType> Serial for AttributeList<F, AttributeType>
impl<G> Serial for ArkGroup<G>where
G: CurveGroup,
Serialization is implemented by delegating the functionality to the
compressed affine representation of ark_ec:CurveGroup.