pub struct GetExtentOperation<'c> { /* private fields */ }
Expand description
A get_extent
operation. Gets the specified extent from a shape or extent tensor.
Gets the extent indexed by dim
from the shape
operand. If the shape is
an error then it returns an invalid size.
Implementations§
source§impl<'c> GetExtentOperation<'c>
impl<'c> GetExtentOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> GetExtentOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GetExtentOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn extent(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn shape(&self) -> Result<Value<'c, '_>, Error>
pub fn dim(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<GetExtentOperation<'c>> for Operation<'c>
impl<'c> From<GetExtentOperation<'c>> for Operation<'c>
source§fn from(operation: GetExtentOperation<'c>) -> Self
fn from(operation: GetExtentOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for GetExtentOperation<'c>
impl<'c> !Send for GetExtentOperation<'c>
impl<'c> !Sync for GetExtentOperation<'c>
impl<'c> Unpin for GetExtentOperation<'c>
impl<'c> UnwindSafe for GetExtentOperation<'c>
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