Struct smarty_rust_sdk::sdk::batch::Batch
source · 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<(), SDKError>
pub fn push(&mut self, lookup: T) -> Result<(), SDKError>
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