pub trait FromDisk: Sized {
    // Required method
    fn from_bytes(bytes: impl AsRef<[u8]>) -> Self;
}
Expand description

Helper type for reading types from disk as raw bytes.

Required Methods§

source

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

Converts raw disk bytes back into the deserialized type.

Used to convert keys and values from bytes in ReadDisk.

§Panics
  • if the input data doesn’t deserialize correctly

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromDisk for Transaction

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Address

source§

fn from_bytes(disk_bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Option<SaplingScannedResult>

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for ()

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Amount<NonNegative>

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Hash

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Header

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Height

source§

fn from_bytes(disk_bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Node

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for NoteCommitmentTree

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Root

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Node

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for NoteCommitmentTree

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Root

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for NoteCommitmentTree

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Root

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for NoteCommitmentSubtreeIndex

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Hash

source§

fn from_bytes(disk_bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for Output

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl FromDisk for ValueBalance<NonNegative>

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

source§

impl<Node: FromDisk> FromDisk for NoteCommitmentSubtreeData<Node>

source§

fn from_bytes(disk_bytes: impl AsRef<[u8]>) -> Self

source§

impl<T> FromDisk for Arc<T>
where T: FromDisk,

source§

fn from_bytes(bytes: impl AsRef<[u8]>) -> Self

Implementors§