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.
Sourcepub fn from_dictionary(self, from_dictionary: impl Into<String>) -> Self
pub fn from_dictionary(self, from_dictionary: impl Into<String>) -> Self
Adds a source dictionary to this route. When this option is used, the source given by
from
is expected to provide a dictionary whose name is the first path segment of
from_dictionary
, and capability
is expected to exist within this dictionary at
the from_dictionary
path.
Must be called exactly once. Will panic if called a second time.
This is the RealmBuilder equivalent of cml’s from
when used with a path. That is, if
from
contains the path "parent/a/b"
, that is equivalent to the following construction:
Route::new()
.from(Ref::parent)
.from_dictionary("a/b")
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)