pub struct BatchRequest<T> {
pub metadata: RequestMetadata,
pub inputs: T,
}Expand description
A request to be batched.
Fields§
§metadata: RequestMetadataRequest metadata
inputs: TInput data
Implementations§
Source§impl<T> BatchRequest<T>
impl<T> BatchRequest<T>
Sourcepub fn new(id: String, inputs: T, input_shapes: Vec<Vec<usize>>) -> Self
pub fn new(id: String, inputs: T, input_shapes: Vec<Vec<usize>>) -> Self
Create a new batch request.
Sourcepub fn with_priority(self, priority: Priority) -> Self
pub fn with_priority(self, priority: Priority) -> Self
Set priority.
Sourcepub fn with_max_latency(self, max_latency: Duration) -> Self
pub fn with_max_latency(self, max_latency: Duration) -> Self
Set maximum latency.
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
Check if request has timed out.
Auto Trait Implementations§
impl<T> Freeze for BatchRequest<T>where
T: Freeze,
impl<T> RefUnwindSafe for BatchRequest<T>where
T: RefUnwindSafe,
impl<T> Send for BatchRequest<T>where
T: Send,
impl<T> Sync for BatchRequest<T>where
T: Sync,
impl<T> Unpin for BatchRequest<T>where
T: Unpin,
impl<T> UnwindSafe for BatchRequest<T>where
T: UnwindSafe,
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