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.
Sourcepub fn segment(&self, name: &str) -> Route
pub fn segment(&self, name: &str) -> Route
NEST-14: the route of the segment name below this one — a peer
slot’s name, an untyped child — joined to this route’s path as it
is (empty: name alone), refused as Route::instance refuses a
name, with no static children to avoid.
Sourcepub fn refusal(&self) -> Option<ClientError>
pub fn refusal(&self) -> Option<ClientError>
NEST-14: why nothing may be sent along this route, if anything — the error every call through it is.