pub struct RouteDecision {
pub next_hops: Vec<NodeId>,
pub local_copy: bool,
pub routed: bool,
pub failure_reason: Option<RouteFailure>,
}Expand description
A routing decision for a message
Fields§
§next_hops: Vec<NodeId>Next hop(s) for the message
local_copy: boolWhether to keep a local copy
routed: boolWhether routing succeeded
failure_reason: Option<RouteFailure>Reason if routing failed
Implementations§
Source§impl RouteDecision
impl RouteDecision
Sourcepub fn success(next_hops: Vec<NodeId>, local_copy: bool) -> Self
pub fn success(next_hops: Vec<NodeId>, local_copy: bool) -> Self
Create a successful route decision
Sourcepub fn failed(reason: RouteFailure) -> Self
pub fn failed(reason: RouteFailure) -> Self
Create a failed route decision
Sourcepub fn local_only() -> Self
pub fn local_only() -> Self
Route for local processing only
Trait Implementations§
Source§impl Clone for RouteDecision
impl Clone for RouteDecision
Source§fn clone(&self) -> RouteDecision
fn clone(&self) -> RouteDecision
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RouteDecision
impl RefUnwindSafe for RouteDecision
impl Send for RouteDecision
impl Sync for RouteDecision
impl Unpin for RouteDecision
impl UnwindSafe for RouteDecision
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