Enum blockless_car::Codec

source ·
pub enum Codec {
Show 159 variants Bin, Base1, Base8, Base10, Cbor, Protobuf, Rlp, Bencode, Multicodec, Multihash, Multiaddr, Multibase, Sha1, Sha2_256, Sha2_512, Dbl_Sha2_256, Sha3_224, Sha3_256, Sha3_384, Sha3_512, Shake_128, Shake_256, Keccak_224, Keccak_256, Keccak_384, Keccak_512, Murmur3, Blake2b_8, Blake2b_16, Blake2b_24, Blake2b_32, Blake2b_40, Blake2b_48, Blake2b_56, Blake2b_64, Blake2b_72, Blake2b_80, Blake2b_88, Blake2b_96, Blake2b_104, Blake2b_112, Blake2b_120, Blake2b_128, Blake2b_136, Blake2b_144, Blake2b_152, Blake2b_160, Blake2b_168, Blake2b_176, Blake2b_184, Blake2b_192, Blake2b_200, Blake2b_208, Blake2b_216, Blake2b_224, Blake2b_232, Blake2b_240, Blake2b_248, Blake2b_256, Blake2b_264, Blake2b_272, Blake2b_280, Blake2b_288, Blake2b_296, Blake2b_304, Blake2b_312, Blake2b_320, Blake2b_328, Blake2b_336, Blake2b_344, Blake2b_352, Blake2b_360, Blake2b_368, Blake2b_376, Blake2b_384, Blake2b_392, Blake2b_400, Blake2b_408, Blake2b_416, Blake2b_424, Blake2b_432, Blake2b_440, Blake2b_448, Blake2b_456, Blake2b_464, Blake2b_472, Blake2b_480, Blake2b_488, Blake2b_496, Blake2b_504, Blake2b_512, Blake2s_8, Blake2s_16, Blake2s_24, Blake2s_32, Blake2s_40, Blake2s_48, Blake2s_56, Blake2s_64, Blake2s_72, Blake2s_80, Blake2s_88, Blake2s_96, Blake2s_104, Blake2s_112, Blake2s_120, Blake2s_128, Blake2s_136, Blake2s_144, Blake2s_152, Blake2s_160, Blake2s_168, Blake2s_176, Blake2s_184, Blake2s_192, Blake2s_200, Blake2s_208, Blake2s_216, Blake2s_224, Blake2s_232, Blake2s_240, Blake2s_248, Blake2s_256, Ip4, Ip6, Tcp, Udp, Dccp, Sctp, Udt, Utp, Ipfs, Http, Https, Quic, Ws, Onion, P2p_Circuit, Dag_Pb, Dag_Cbor, Git_Raw, Eth_Block, Eth_Block_List, Eth_Tx_Trie, Eth_Tx, Eth_Tx_Receipt_Trie, Eth_Tx_Receipt, Eth_State_Trie, Eth_Account_Snapshot, Eth_Storage_Trie, Bitcoin_Block, Bitcoin_Tx, Zcash_Block, Zcash_Tx, Stellar_Block, Stellar_Tx, Torrent_Info, Torrent_File, Ed25519_Pub,
}

Variants§

§

Bin

§

Base1

§

Base8

§

Base10

§

Cbor

§

Protobuf

§

Rlp

§

Bencode

§

Multicodec

§

Multihash

§

Multiaddr

§

Multibase

§

Sha1

§

Sha2_256

§

Sha2_512

§

Dbl_Sha2_256

§

Sha3_224

§

Sha3_256

§

Sha3_384

§

Sha3_512

§

Shake_128

§

Shake_256

§

Keccak_224

§

Keccak_256

§

Keccak_384

§

Keccak_512

§

Murmur3

§

Blake2b_8

§

Blake2b_16

§

Blake2b_24

§

Blake2b_32

§

Blake2b_40

§

Blake2b_48

§

Blake2b_56

§

Blake2b_64

§

Blake2b_72

§

Blake2b_80

§

Blake2b_88

§

Blake2b_96

§

Blake2b_104

§

Blake2b_112

§

Blake2b_120

§

Blake2b_128

§

Blake2b_136

§

Blake2b_144

§

Blake2b_152

§

Blake2b_160

§

Blake2b_168

§

Blake2b_176

§

Blake2b_184

§

Blake2b_192

§

Blake2b_200

§

Blake2b_208

§

Blake2b_216

§

Blake2b_224

§

Blake2b_232

§

Blake2b_240

§

Blake2b_248

§

Blake2b_256

§

Blake2b_264

§

Blake2b_272

§

Blake2b_280

§

Blake2b_288

§

Blake2b_296

§

Blake2b_304

§

Blake2b_312

§

Blake2b_320

§

Blake2b_328

§

Blake2b_336

§

Blake2b_344

§

Blake2b_352

§

Blake2b_360

§

Blake2b_368

§

Blake2b_376

§

Blake2b_384

§

Blake2b_392

§

Blake2b_400

§

Blake2b_408

§

Blake2b_416

§

Blake2b_424

§

Blake2b_432

§

Blake2b_440

§

Blake2b_448

§

Blake2b_456

§

Blake2b_464

§

Blake2b_472

§

Blake2b_480

§

Blake2b_488

§

Blake2b_496

§

Blake2b_504

§

Blake2b_512

§

Blake2s_8

§

Blake2s_16

§

Blake2s_24

§

Blake2s_32

§

Blake2s_40

§

Blake2s_48

§

Blake2s_56

§

Blake2s_64

§

Blake2s_72

§

Blake2s_80

§

Blake2s_88

§

Blake2s_96

§

Blake2s_104

§

Blake2s_112

§

Blake2s_120

§

Blake2s_128

§

Blake2s_136

§

Blake2s_144

§

Blake2s_152

§

Blake2s_160

§

Blake2s_168

§

Blake2s_176

§

Blake2s_184

§

Blake2s_192

§

Blake2s_200

§

Blake2s_208

§

Blake2s_216

§

Blake2s_224

§

Blake2s_232

§

Blake2s_240

§

Blake2s_248

§

Blake2s_256

§

Ip4

§

Ip6

§

Tcp

§

Udp

§

Dccp

§

Sctp

§

Udt

§

Utp

§

Ipfs

§

Http

§

Https

§

Quic

§

Ws

§

Onion

§

P2p_Circuit

§

Dag_Pb

§

Dag_Cbor

§

Git_Raw

§

Eth_Block

§

Eth_Block_List

§

Eth_Tx_Trie

§

Eth_Tx

§

Eth_Tx_Receipt_Trie

§

Eth_Tx_Receipt

§

Eth_State_Trie

§

Eth_Account_Snapshot

§

Eth_Storage_Trie

§

Bitcoin_Block

§

Bitcoin_Tx

§

Zcash_Block

§

Zcash_Tx

§

Stellar_Block

§

Stellar_Tx

§

Torrent_Info

§

Torrent_File

§

Ed25519_Pub

Implementations§

source§

impl Codec

source

pub fn code(&self) -> u16

Get the base code.

source

pub fn from_code(code: u16) -> Result<Codec, Error>

Convert a code to a base.

Trait Implementations§

source§

impl Clone for Codec

source§

fn clone(&self) -> Codec

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Codec

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl PartialEq for Codec

source§

fn eq(&self, other: &Codec) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Codec

source§

impl Eq for Codec

source§

impl StructuralPartialEq for Codec

Auto Trait Implementations§

§

impl Freeze for Codec

§

impl RefUnwindSafe for Codec

§

impl Send for Codec

§

impl Sync for Codec

§

impl Unpin for Codec

§

impl UnwindSafe for Codec

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> References<RawCodec> for T

source§

fn references<R, E>(_c: RawCodec, _r: &mut R, _set: &mut E) -> Result<(), Error>
where R: Read, E: Extend<Cid<64>>,

Scrape the references from an impl Read. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.