pub struct Route { /* private fields */ }Expand description
A generated client’s route: its path, and a refusal if an instance name on the way to it cannot be routed.
Implementations§
Source§impl Route
impl Route
Sourcepub fn at(path: impl Into<RoutePath>, namespace: &str) -> Route
pub fn at(path: impl Into<RoutePath>, namespace: &str) -> Route
The activation mounted at path (its namespace, or empty, is
Route::ROOT).
Sourcepub fn path<'a>(&'a self, namespace: &'a str) -> &'a str
pub fn path<'a>(&'a self, namespace: &'a str) -> &'a str
The dotted path: namespace when mounted at its own.
Sourcepub fn child(&self, segment: &str, joined: &'static str) -> Route
pub fn child(&self, segment: &str, joined: &'static str) -> Route
The route of the static child segment. joined is
"{namespace}.{segment}", known when the program is written: a
child of a client at its own namespace costs no allocation.
Sourcepub fn instance(&self, namespace: &str, name: &str, statics: &[&str]) -> Route
pub fn instance(&self, namespace: &str, name: &str, statics: &[&str]) -> Route
The route of the dynamic instance name, refused when the service
would not reach the instance with it: empty, dotted, outside its path
grammar (is_route_segment), or one of the parent’s static
children’s statics. A name that is a method of the parent is fine:
the service takes it as the child.
Trait Implementations§
impl Eq for Route
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 UnsafeUnpin 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