pub struct Batch<T> { /* private fields */ }
Expand description
A storage for lookups. Has a maximum limit of 100 lookups
Implementations§
Source§impl<T> Batch<T>
impl<T> Batch<T>
Sourcepub fn push(&mut self, lookup: T) -> Result<(), BatchError>
pub fn push(&mut self, lookup: T) -> Result<(), BatchError>
Pushes a lookup into the batch, returns an SDKError if the batch is full.
Sourcepub fn records(&self) -> &Vec<T>
pub fn records(&self) -> &Vec<T>
Returns the lookups stored in the batch
Mostly used to get the results from the lookups
Sourcepub fn records_mut(&mut self) -> &mut Vec<T>
pub fn records_mut(&mut self) -> &mut Vec<T>
Returns the lookups stored in the batch as a mutable reference
Mostly used to alter lookups all at once.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Batch<T>
impl<T> RefUnwindSafe for Batch<T>where
T: RefUnwindSafe,
impl<T> Send for Batch<T>where
T: Send,
impl<T> Sync for Batch<T>where
T: Sync,
impl<T> Unpin for Batch<T>where
T: Unpin,
impl<T> UnwindSafe for Batch<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