pub struct BatchBuilder<'a> { /* private fields */ }Expand description
Builder for creating batched operations
Implementations§
Source§impl<'a> BatchBuilder<'a>
impl<'a> BatchBuilder<'a>
Sourcepub fn call(
&mut self,
cap_id: CapId,
method: &str,
args: Vec<Value>,
) -> PendingResult
pub fn call( &mut self, cap_id: CapId, method: &str, args: Vec<Value>, ) -> PendingResult
Add a call operation to the batch
Sourcepub fn pipeline(
&mut self,
base: &PendingResult,
path: Vec<&str>,
method: &str,
args: Vec<Value>,
) -> PendingResult
pub fn pipeline( &mut self, base: &PendingResult, path: Vec<&str>, method: &str, args: Vec<Value>, ) -> PendingResult
Add a pipeline operation that depends on a previous result
Sourcepub fn reference(&self, result: &PendingResult, field: &str) -> PendingResult
pub fn reference(&self, result: &PendingResult, field: &str) -> PendingResult
Create a reference to a result field for use in arguments
Sourcepub async fn execute(self) -> Result<BatchResults>
pub async fn execute(self) -> Result<BatchResults>
Execute the batch and return results
Auto Trait Implementations§
impl<'a> Freeze for BatchBuilder<'a>
impl<'a> !RefUnwindSafe for BatchBuilder<'a>
impl<'a> Send for BatchBuilder<'a>
impl<'a> Sync for BatchBuilder<'a>
impl<'a> Unpin for BatchBuilder<'a>
impl<'a> !UnwindSafe for BatchBuilder<'a>
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