pub struct Route { /* private fields */ }
Expand description
A route of one or more capabilities from one point in the realm to one or more targets.
Implementations§
Source§impl Route
impl Route
pub fn new() -> Self
Sourcepub fn capability(self, capability: impl Into<Capability>) -> Self
pub fn capability(self, capability: impl Into<Capability>) -> Self
Adds a capability to this route. Must be called at least once.
Sourcepub fn from(self, from: impl Into<Ref>) -> Self
pub fn from(self, from: impl Into<Ref>) -> Self
Adds a source to this route. Must be called exactly once. Will panic if called a second time.
Ref::dictionary
with a path may be supplied to route a capability from a dictionary. For
example:
Route::new()
.capability(Capability::protocol::<flogger::LogSinkMarker>())
.from(Ref::dictionary(Ref::parent(), "diagnostics"))
.to(Ref::dictionary(Ref::self_(), "diagnostics"))
Trait Implementations§
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnwindSafe for Route
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more