[][src]Struct openvino::Blob

pub struct Blob { /* fields omitted */ }

See Blob.

Implementations

impl Blob[src]

pub fn new(description: TensorDesc, data: &[u8]) -> Result<Self, InferenceError>[src]

Create a new Blob by copying data in to the OpenVINO-allocated memory.

pub fn allocate(description: TensorDesc) -> Result<Self, InferenceError>[src]

Allocate space in OpenVINO for an empty Blob.

pub fn tensor_desc(&self) -> Result<TensorDesc, InferenceError>[src]

Return the tensor description of this Blob.

pub fn len(&mut self) -> Result<usize, InferenceError>[src]

Get the number of elements contained in the Blob.

pub fn byte_len(&mut self) -> Result<usize, InferenceError>[src]

Get the size of the current Blob in bytes.

pub fn buffer(&mut self) -> Result<&[u8], InferenceError>[src]

Retrieve the Blob's data as an immutable slice of bytes.

pub fn buffer_mut(&mut self) -> Result<&mut [u8], InferenceError>[src]

Retrieve the Blob's data as a mutable slice of bytes.

pub unsafe fn buffer_mut_as_type<T>(
    &mut self
) -> Result<&mut [T], InferenceError>
[src]

Retrieve the Blob's data as a mutable slice of type T. This is unsafe, since the values of T may not have been properly initialized; however, this functionality is provided as an equivalent of what C/C++ users of OpenVINO currently do to access Blobs with, e.g., floating point values: results.buffer_mut_as_type::<f32>().

Trait Implementations

impl Drop for Blob[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.