pub struct TensorRef<'a>(/* private fields */);Expand description
Reference to a deserialized Tensor.
Implementations§
Source§impl<'a> TensorRef<'a>
impl<'a> TensorRef<'a>
Sourcepub fn type_(&self) -> Result<TypeRef<'a>>
pub fn type_(&self) -> Result<TypeRef<'a>>
Getter for the type field.
Sourcepub fn shape(&self) -> Result<Vector<'a, Result<TensorDimRef<'a>>>>
pub fn shape(&self) -> Result<Vector<'a, Result<TensorDimRef<'a>>>>
Getter for the shape field.
Sourcepub fn data(&self) -> Result<BufferRef<'a>>
pub fn data(&self) -> Result<BufferRef<'a>>
Getter for the data field.
Trait Implementations§
Source§impl<'a> ReadAsRoot<'a> for TensorRef<'a>
impl<'a> ReadAsRoot<'a> for TensorRef<'a>
impl<'a> Copy for TensorRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for TensorRef<'a>
impl<'a> RefUnwindSafe for TensorRef<'a>
impl<'a> Send for TensorRef<'a>
impl<'a> Sync for TensorRef<'a>
impl<'a> Unpin for TensorRef<'a>
impl<'a> UnwindSafe for TensorRef<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more