pub struct RoutePreflight { /* private fields */ }Expand description
A frozen preflight for every worker in a Workflow, plus the Router.
Implementations§
Source§impl RoutePreflight
impl RoutePreflight
pub fn new( workers: Vec<PreflightedRoute>, router: Option<PreflightedRoute>, ) -> Self
pub fn workers(&self) -> &[PreflightedRoute]
pub fn router(&self) -> Option<&PreflightedRoute>
Sourcepub fn worker(&self, member_id: &str) -> Option<&PreflightedRoute>
pub fn worker(&self, member_id: &str) -> Option<&PreflightedRoute>
The frozen route for one member id.
Sourcepub fn require_all_ready(&self) -> Result<(), PreflightError>
pub fn require_all_ready(&self) -> Result<(), PreflightError>
Fail unless every worker route is runnable.
Called before a Workflow is allowed to start, so a member with no credential is a startup error rather than a first-task surprise.
Sourcepub fn crosses_providers(&self, member_id: &str) -> bool
pub fn crosses_providers(&self, member_id: &str) -> bool
Whether any worker route talks to a different provider than the Router. This is what a receipt discloses as cross-provider inference.
Trait Implementations§
Source§impl Clone for RoutePreflight
impl Clone for RoutePreflight
Source§fn clone(&self) -> RoutePreflight
fn clone(&self) -> RoutePreflight
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoutePreflight
impl Debug for RoutePreflight
Source§impl Default for RoutePreflight
impl Default for RoutePreflight
Source§fn default() -> RoutePreflight
fn default() -> RoutePreflight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RoutePreflight
impl<'de> Deserialize<'de> for RoutePreflight
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RoutePreflight
Source§impl PartialEq for RoutePreflight
impl PartialEq for RoutePreflight
Source§impl Serialize for RoutePreflight
impl Serialize for RoutePreflight
impl StructuralPartialEq for RoutePreflight
Auto Trait Implementations§
impl Freeze for RoutePreflight
impl RefUnwindSafe for RoutePreflight
impl Send for RoutePreflight
impl Sync for RoutePreflight
impl Unpin for RoutePreflight
impl UnsafeUnpin for RoutePreflight
impl UnwindSafe for RoutePreflight
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