pub struct Endpoint { /* private fields */ }Expand description
A handler ready to mount.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn layer<L>(self, layer: L) -> Self
pub fn layer<L>(self, layer: L) -> Self
Wraps the endpoint in layer: it runs once a route matched, before
the arguments are extracted (a handler system’s own per-route
pipeline, such as message handlers’).
Sourcepub fn guest_or(guest: Endpoint, signed_in: Endpoint) -> Self
pub fn guest_or(guest: Endpoint, signed_in: Endpoint) -> Self
An endpoint that answers with guest when no one is signed in on the request
and with signed_in when someone is: see RouteDef::on_guest_or.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Endpoint
impl !UnwindSafe for Endpoint
impl Forget for Endpoint
impl Freeze for Endpoint
impl Move for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
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