pub struct HeapORAMStorage<BlockSize: ArrayLength<u8>, MetaSize: ArrayLength<u8>> { /* private fields */ }
Expand description

The HeapORAMStorage is simply vector

Implementations§

source§

impl<BlockSize: ArrayLength<u8>, MetaSize: ArrayLength<u8>> HeapORAMStorage<BlockSize, MetaSize>

source

pub fn new(size: u64) -> Self

Trait Implementations§

source§

impl<BlockSize: ArrayLength<u8>, MetaSize: ArrayLength<u8>> ORAMStorage<BlockSize, MetaSize> for HeapORAMStorage<BlockSize, MetaSize>

source§

fn len(&self) -> u64

Get the number of blocks represented by this block storage This is also the bound of the largest valid index
source§

fn checkout( &mut self, leaf_index: u64, dest: &mut [A64Bytes<BlockSize>], dest_meta: &mut [A8Bytes<MetaSize>] )

Checkout all blocks on the branch leading to a particular index in the tree, copying them and their metadata into two scratch buffers. Read more
source§

fn checkin( &mut self, leaf_index: u64, src: &mut [A64Bytes<BlockSize>], src_meta: &mut [A8Bytes<MetaSize>] )

Checkin a number of blocks, copying them and their metadata from two scratch buffers. Read more

Auto Trait Implementations§

§

impl<BlockSize, MetaSize> RefUnwindSafe for HeapORAMStorage<BlockSize, MetaSize>where <BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe, <MetaSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,

§

impl<BlockSize, MetaSize> Send for HeapORAMStorage<BlockSize, MetaSize>

§

impl<BlockSize, MetaSize> Sync for HeapORAMStorage<BlockSize, MetaSize>

§

impl<BlockSize, MetaSize> Unpin for HeapORAMStorage<BlockSize, MetaSize>where <BlockSize as ArrayLength<u8>>::ArrayType: Unpin, <MetaSize as ArrayLength<u8>>::ArrayType: Unpin,

§

impl<BlockSize, MetaSize> UnwindSafe for HeapORAMStorage<BlockSize, MetaSize>where <BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe, <MetaSize as ArrayLength<u8>>::ArrayType: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.