Struct garage_rpc::rpc_helper::RequestStrategy
source · pub struct RequestStrategy<T> { /* private fields */ }
Expand description
Strategy to apply when making RPC
Implementations§
source§impl RequestStrategy<()>
impl RequestStrategy<()>
sourcepub fn with_priority(prio: RequestPriority) -> Self
pub fn with_priority(prio: RequestPriority) -> Self
Create a RequestStrategy with default timeout and not interrupting when quorum reached
sourcepub fn with_drop_on_completion<T>(
self,
drop_on_complete: T
) -> RequestStrategy<T>
pub fn with_drop_on_completion<T>( self, drop_on_complete: T ) -> RequestStrategy<T>
Add an item to be dropped on completion
source§impl<T> RequestStrategy<T>
impl<T> RequestStrategy<T>
sourcepub fn with_quorum(self, quorum: usize) -> Self
pub fn with_quorum(self, quorum: usize) -> Self
Set quorum to be reached for request
sourcepub fn send_all_at_once(self, value: bool) -> Self
pub fn send_all_at_once(self, value: bool) -> Self
Set quorum to be reached for request
sourcepub fn without_timeout(self) -> Self
pub fn without_timeout(self) -> Self
Deactivate timeout for this request
sourcepub fn with_custom_timeout(self, timeout: Duration) -> Self
pub fn with_custom_timeout(self, timeout: Duration) -> Self
Set custom timeout for this request
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RequestStrategy<T>where
T: Freeze,
impl<T> RefUnwindSafe for RequestStrategy<T>where
T: RefUnwindSafe,
impl<T> Send for RequestStrategy<T>where
T: Send,
impl<T> Sync for RequestStrategy<T>where
T: Sync,
impl<T> Unpin for RequestStrategy<T>where
T: Unpin,
impl<T> UnwindSafe for RequestStrategy<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