pub struct Executor { /* private fields */ }Expand description
Executor for remote operations guarded by a global bulkhead.
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn from_pragma_remote_max_in_flight(
remote_max_in_flight: usize,
) -> Result<Self>
pub fn from_pragma_remote_max_in_flight( remote_max_in_flight: usize, ) -> Result<Self>
Build executor from PRAGMA fsqlite.remote_max_in_flight.
0 means “auto” and resolves to the conservative balanced default.
§Errors
Returns FrankenError::OutOfRange when remote_max_in_flight is
non-zero but invalid.
Sourcepub fn with_max_in_flight(max_in_flight: usize) -> Result<Self>
pub fn with_max_in_flight(max_in_flight: usize) -> Result<Self>
Create with explicit in-flight limit.
§Errors
Returns FrankenError::OutOfRange if max_in_flight == 0.
pub fn balanced_default() -> Self
pub const fn name(&self) -> &'static str
pub const fn max_in_flight(&self) -> usize
pub const fn max_queue(&self) -> usize
pub fn snapshot(&self) -> AdmissionSnapshot
Sourcepub fn execute<Caps, F>(
&self,
cx: &Cx<Caps>,
remote_cap: Option<RemoteCap>,
registry: &ComputationRegistry,
computation: &NamedComputation,
trace: &TraceContext,
operation: F,
) -> Result<Vec<u8>>
pub fn execute<Caps, F>( &self, cx: &Cx<Caps>, remote_cap: Option<RemoteCap>, registry: &ComputationRegistry, computation: &NamedComputation, trace: &TraceContext, operation: F, ) -> Result<Vec<u8>>
Execute a named remote computation through the global remote bulkhead.
§Errors
Returns:
FrankenError::Internalwhenremote_capis absent,FrankenError::Unsupportedfor unregistered computations,FrankenError::Busywhen the remote bulkhead is saturated,- or any error from
operation.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
impl !UnwindSafe for Executor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).