pub struct BatchResponse { /* private fields */ }Expand description
Batch response with results
Implementations§
Source§impl BatchResponse
impl BatchResponse
Sourcepub fn request_id(&self) -> String
pub fn request_id(&self) -> String
Get the request ID
Sourcepub fn result(&self) -> Option<WasmTensor>
pub fn result(&self) -> Option<WasmTensor>
Get the result tensor
Sourcepub fn processing_time_ms(&self) -> f64
pub fn processing_time_ms(&self) -> f64
Get processing time in milliseconds
Sourcepub fn queue_time_ms(&self) -> f64
pub fn queue_time_ms(&self) -> f64
Get queue time in milliseconds
Sourcepub fn batch_size(&self) -> usize
pub fn batch_size(&self) -> usize
Get the batch size this request was processed in
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the request was successful
Trait Implementations§
Source§impl From<BatchResponse> for JsValue
impl From<BatchResponse> for JsValue
Source§fn from(value: BatchResponse) -> Self
fn from(value: BatchResponse) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for BatchResponse
impl FromWasmAbi for BatchResponse
Source§impl IntoWasmAbi for BatchResponse
impl IntoWasmAbi for BatchResponse
Source§impl LongRefFromWasmAbi for BatchResponse
impl LongRefFromWasmAbi for BatchResponse
Source§impl OptionFromWasmAbi for BatchResponse
impl OptionFromWasmAbi for BatchResponse
Source§impl OptionIntoWasmAbi for BatchResponse
impl OptionIntoWasmAbi for BatchResponse
Source§impl RefFromWasmAbi for BatchResponse
impl RefFromWasmAbi for BatchResponse
Source§type Anchor = RcRef<BatchResponse>
type Anchor = RcRef<BatchResponse>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for BatchResponse
impl RefMutFromWasmAbi for BatchResponse
Source§impl TryFromJsValue for BatchResponse
impl TryFromJsValue for BatchResponse
Source§impl VectorFromWasmAbi for BatchResponse
impl VectorFromWasmAbi for BatchResponse
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[BatchResponse]>
Source§impl VectorIntoWasmAbi for BatchResponse
impl VectorIntoWasmAbi for BatchResponse
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[BatchResponse]>) -> Self::Abi
Source§impl WasmDescribeVector for BatchResponse
impl WasmDescribeVector for BatchResponse
impl SupportsConstructor for BatchResponse
impl SupportsInstanceProperty for BatchResponse
impl SupportsStaticProperty for BatchResponse
Auto Trait Implementations§
impl Freeze for BatchResponse
impl RefUnwindSafe for BatchResponse
impl Send for BatchResponse
impl Sync for BatchResponse
impl Unpin for BatchResponse
impl UnsafeUnpin for BatchResponse
impl UnwindSafe for BatchResponse
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.