Struct sgx_oc::linux::ocall::HostBuffer

source ·
pub struct HostBuffer(/* private fields */);

Implementations§

source§

impl HostBuffer

source

pub fn alloc(size: usize) -> OCallResult<Self>

source

pub fn alloc_zeroed(size: usize) -> OCallResult<Self>

source

pub fn from_enclave_slice(encl_buf: &[u8]) -> OCallResult<Self>

source

pub fn to_enclave_slice(&self, encl_buf: &mut [u8]) -> OCallResult<usize>

source

pub fn as_slice(&self) -> HostSlice<'_>

source

pub fn as_mut_slice(&mut self) -> HostSliceMut<'_>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn as_ptr(&self) -> *const u8

source

pub fn as_mut_ptr(&mut self) -> *mut u8

source

pub fn write(&mut self, encl_buf: &[u8]) -> OCallResult<usize>

source

pub fn read(&self, encl_buf: &mut [u8]) -> OCallResult<usize>

source

pub fn get_range<I>(&self, index: I) -> Option<HostSlice<'_>>where I: SliceIndex<[u8], Output = [u8]>,

source

pub fn get_range_mut<I>(&mut self, index: I) -> Option<HostSliceMut<'_>>where I: SliceIndex<[u8], Output = [u8]>,

source

pub fn range<I>(&self, index: I) -> HostSlice<'_>where I: SliceIndex<[u8], Output = [u8]>,

source

pub fn range_mut<I>(&mut self, index: I) -> HostSliceMut<'_>where I: SliceIndex<[u8], Output = [u8]>,

source§

impl HostBuffer

source

pub unsafe fn from_heap_buffer(heap: HeapBuffer) -> Self

source

pub unsafe fn from_oc_buffer(oc: OcBuffer) -> Self

Trait Implementations§

source§

impl Debug for HostBuffer

source§

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

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

impl !Send for HostBuffer

Auto Trait Implementations§

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere 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 Twhere 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.