pub trait FromBytes: Sized {
// Required method
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>;
// Provided method
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error> { ... }
}Expand description
A type which can be deserialized from a Vec<u8>.
Required Methods§
Provided 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<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes> FromBytes for (T1, T2, T3, T4)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes> FromBytes for (T1, T2, T3, T4)
Source§impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes> FromBytes for (T1, T2, T3, T4, T5)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes> FromBytes for (T1, T2, T3, T4, T5)
Source§impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6)
Source§impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7)
Source§impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes, T8: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7, T8)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes, T8: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7, T8)
Source§impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes, T8: FromBytes, T9: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes, T8: FromBytes, T9: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7, T8, T9)
Source§impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes, T8: FromBytes, T9: FromBytes, T10: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<T1: FromBytes, T2: FromBytes, T3: FromBytes, T4: FromBytes, T5: FromBytes, T6: FromBytes, T7: FromBytes, T8: FromBytes, T9: FromBytes, T10: FromBytes> FromBytes for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Implementors§
impl FromBytes for EntityKindTag
impl FromBytes for MessagePayload
impl FromBytes for MessageTopicOperation
impl FromBytes for ContractPackageStatus
impl FromBytes for PublicKey
impl FromBytes for Signature
impl FromBytes for ActivationPoint
Available on crate feature
std only.impl FromBytes for AddressableEntityIdentifier
impl FromBytes for Block
impl FromBytes for BlockBody
impl FromBytes for BlockGlobalAddr
impl FromBytes for BlockGlobalAddrTag
impl FromBytes for BlockHeader
impl FromBytes for BlockIdentifier
impl FromBytes for BlockSignatures
impl FromBytes for ByteCodeAddr
impl FromBytes for ByteCodeKind
impl FromBytes for CLType
impl FromBytes for ConsensusProtocolName
Available on crate feature
std only.impl FromBytes for ContractRuntimeTag
impl FromBytes for EntityAddr
impl FromBytes for EntityKind
impl FromBytes for EntryPointAccess
impl FromBytes for EntryPointAddr
impl FromBytes for EntryPointPayment
impl FromBytes for EntryPointType
impl FromBytes for EntryPointValue
impl FromBytes for EraEnd
impl FromBytes for ExecutableDeployItem
impl FromBytes for FeeHandling
Available on crate feature
std only.impl FromBytes for GenesisAccount
Available on crate feature
std only.impl FromBytes for GlobalStateIdentifier
impl FromBytes for HoldBalanceHandling
Available on crate feature
std only.impl FromBytes for InitiatorAddr
impl FromBytes for Key
impl FromBytes for KeyTag
impl FromBytes for LegacyRequiredFinality
Available on crate feature
std only.impl FromBytes for PackageIdentifier
impl FromBytes for PackageStatus
impl FromBytes for Phase
impl FromBytes for PricingHandling
Available on crate feature
std only.impl FromBytes for PricingMode
impl FromBytes for RefundHandling
Available on crate feature
std only.impl FromBytes for StoredValue
impl FromBytes for Transaction
impl FromBytes for TransactionArgs
impl FromBytes for TransactionEntryPoint
impl FromBytes for TransactionHash
impl FromBytes for TransactionInvocationTarget
impl FromBytes for TransactionRuntimeParams
impl FromBytes for TransactionScheduling
impl FromBytes for TransactionTarget
impl FromBytes for Transfer
impl FromBytes for ValidatorChange
impl FromBytes for ExecutionResult
impl FromBytes for TransformError
impl FromBytes for TransformKindV2
impl FromBytes for ExecutionResultV1
impl FromBytes for OpKind
impl FromBytes for TransformKindV1
impl FromBytes for Pointer
impl FromBytes for TrieMerkleProofStep
impl FromBytes for BidAddr
impl FromBytes for BidKind
impl FromBytes for DelegatorKind
impl FromBytes for casper_types::system::auction::Error
impl FromBytes for SeigniorageAllocation
impl FromBytes for UnbondKind
impl FromBytes for CallStackElement
impl FromBytes for Caller
impl FromBytes for SystemEntityType
impl FromBytes for BalanceHoldAddr
impl FromBytes for BalanceHoldAddrTag
impl FromBytes for casper_types::system::mint::Error
impl FromBytes for casper_types::bytesrepr::Error
impl FromBytes for casper_types::account::action_thresholds::ActionThresholds
impl FromBytes for casper_types::account::associated_keys::AssociatedKeys
impl FromBytes for Account
impl FromBytes for AccountHash
impl FromBytes for casper_types::account::Weight
impl FromBytes for casper_types::addressable_entity::action_thresholds::ActionThresholds
impl FromBytes for casper_types::addressable_entity::associated_keys::AssociatedKeys
impl FromBytes for MessageTopics
impl FromBytes for NamedKeyAddr
impl FromBytes for NamedKeyValue
impl FromBytes for casper_types::addressable_entity::Weight
impl FromBytes for Message
impl FromBytes for MessageAddr
impl FromBytes for MessageChecksum
impl FromBytes for MessageTopicSummary
impl FromBytes for TopicNameHash
impl FromBytes for ContractHash
impl FromBytes for ContractPackage
impl FromBytes for ContractPackageHash
impl FromBytes for ContractVersionKey
impl FromBytes for EntryPoint
impl FromBytes for casper_types::contracts::EntryPoints
impl FromBytes for ExecutionEffect
impl FromBytes for NamedKey
impl FromBytes for Operation
impl FromBytes for TransformV1
impl FromBytes for Effects
impl FromBytes for ExecutionResultV2
impl FromBytes for TransformV2
impl FromBytes for AccessRights
impl FromBytes for AccountConfig
Available on crate feature
std only.impl FromBytes for AccountsConfig
Available on crate feature
std only.impl FromBytes for AddressableEntity
impl FromBytes for AddressableEntityHash
impl FromBytes for AdministratorAccount
Available on crate feature
std only.impl FromBytes for Approval
impl FromBytes for ApprovalsHash
impl FromBytes for AuctionCosts
Available on crate feature
std only.impl FromBytes for AvailableBlockRange
impl FromBytes for BlockBodyV1
impl FromBytes for BlockBodyV2
impl FromBytes for BlockHash
impl FromBytes for BlockHashAndHeight
impl FromBytes for BlockHeaderV1
impl FromBytes for BlockHeaderV2
impl FromBytes for BlockSignaturesV1
impl FromBytes for BlockSignaturesV2
impl FromBytes for BlockSyncStatus
impl FromBytes for BlockSynchronizerStatus
impl FromBytes for BlockTime
impl FromBytes for BlockV1
impl FromBytes for BlockV2
impl FromBytes for BlockWithSignatures
impl FromBytes for BrTableCost
Available on crate feature
std only.impl FromBytes for ByteCode
impl FromBytes for ByteCodeHash
impl FromBytes for CLValue
impl FromBytes for DictionaryValue
impl FromBytes for ChainNameDigest
impl FromBytes for Chainspec
Available on crate feature
std only.impl FromBytes for ChainspecRawBytes
Available on crate feature
std only.impl FromBytes for ChainspecRegistry
Available on crate feature
std only.impl FromBytes for ChecksumRegistry
impl FromBytes for ChunkWithProof
impl FromBytes for Contract
impl FromBytes for ContractWasm
impl FromBytes for ContractWasmHash
impl FromBytes for ControlFlowCosts
Available on crate feature
std only.impl FromBytes for CoreConfig
Available on crate feature
std only.impl FromBytes for DelegatorConfig
Available on crate feature
std only.impl FromBytes for Deploy
impl FromBytes for DeployConfig
Available on crate feature
std only.impl FromBytes for DeployHash
impl FromBytes for DeployHeader
impl FromBytes for DeployId
impl FromBytes for DeployInfo
impl FromBytes for Digest
impl FromBytes for EntityEntryPoint
impl FromBytes for EntityVersionKey
impl FromBytes for EntityVersions
impl FromBytes for casper_types::EntryPoints
impl FromBytes for EraEndV1
impl FromBytes for EraEndV2
impl FromBytes for EraId
impl FromBytes for ExecutionInfo
impl FromBytes for Gas
impl FromBytes for GenesisValidator
Available on crate feature
std only.impl FromBytes for GlobalStateUpdate
Available on crate feature
std only.impl FromBytes for Group
impl FromBytes for Groups
impl FromBytes for HandlePaymentCosts
Available on crate feature
std only.impl FromBytes for HighwayConfig
Available on crate feature
std only.impl FromBytes for HostFunctionCostsV1
Available on crate feature
std only.impl FromBytes for HostFunctionCostsV2
Available on crate feature
std only.impl FromBytes for IndexedMerkleProof
impl FromBytes for MessageLimits
Available on crate feature
std only.impl FromBytes for MintCosts
Available on crate feature
std only.impl FromBytes for Motes
impl FromBytes for NamedArg
impl FromBytes for NamedKeys
impl FromBytes for NetworkConfig
Available on crate feature
std only.impl FromBytes for NextUpgrade
Available on crate feature
std only.impl FromBytes for OpcodeCosts
Available on crate feature
std only.impl FromBytes for Package
impl FromBytes for PackageHash
impl FromBytes for Parameter
impl FromBytes for PeerEntry
impl FromBytes for Peers
impl FromBytes for ProtocolConfig
Available on crate feature
std only.impl FromBytes for ProtocolVersion
impl FromBytes for RewardedSignatures
impl FromBytes for RuntimeArgs
impl FromBytes for SemVer
impl FromBytes for SingleBlockRewardedSignatures
impl FromBytes for StandardPaymentCosts
Available on crate feature
std only.impl FromBytes for StorageCosts
Available on crate feature
std only.impl FromBytes for TypeMismatch
impl FromBytes for SystemConfig
Available on crate feature
std only.impl FromBytes for SystemHashRegistry
impl FromBytes for TimeDiff
impl FromBytes for Timestamp
impl FromBytes for TransactionConfig
Available on crate feature
std only.impl FromBytes for TransactionId
impl FromBytes for TransactionV1
impl FromBytes for TransactionV1Config
Available on crate feature
std only.impl FromBytes for TransactionV1Hash
impl FromBytes for TransactionV1Payload
impl FromBytes for TransferAddr
impl FromBytes for TransferV1
impl FromBytes for TransferV2
impl FromBytes for U128
impl FromBytes for U256
impl FromBytes for U512
impl FromBytes for URef
impl FromBytes for VacancyConfig
Available on crate feature
std only.impl FromBytes for ValidatorConfig
Available on crate feature
std only.impl FromBytes for WasmConfig
Available on crate feature
std only.impl FromBytes for WasmV1Config
Available on crate feature
std only.impl FromBytes for WasmV2Config
Available on crate feature
std only.impl FromBytes for Bid
impl FromBytes for Bridge
impl FromBytes for Delegator
impl FromBytes for DelegatorBid
impl FromBytes for EraInfo
impl FromBytes for Reservation
impl FromBytes for SeigniorageRecipientV1
impl FromBytes for SeigniorageRecipientV2
impl FromBytes for Unbond
impl FromBytes for UnbondEra
impl FromBytes for UnbondingPurse
impl FromBytes for ValidatorBid
impl FromBytes for ValidatorCredit
impl FromBytes for WithdrawPurse
impl FromBytes for CallerInfo
impl FromBytes for Bytes
impl<K, V> FromBytes for TrieMerkleProof<K, V>
impl<T> FromBytes for HostFunction<T>
Available on crate feature
std only.