pub struct Endpoint<'a, T> { /* private fields */ }
Implementations§
Source§impl<'a, T> Endpoint<'a, T>
impl<'a, T> Endpoint<'a, T>
pub fn at(&mut self, path: &'static str) -> Endpoint<'_, T>
pub fn param(&self) -> Option<&Param>
Sourcepub fn get_or_insert_route_with<F>(&mut self, f: F) -> &mut Twhere
F: FnOnce() -> T,
pub fn get_or_insert_route_with<F>(&mut self, f: F) -> &mut Twhere
F: FnOnce() -> T,
Returns a mutable reference to the route associated with this Endpoint
.
If the route does not exist, the route will be set to the result of the
provided closure f
.
Auto Trait Implementations§
impl<'a, T> Freeze for Endpoint<'a, T>
impl<'a, T> RefUnwindSafe for Endpoint<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Endpoint<'a, T>where
T: Send,
impl<'a, T> Sync for Endpoint<'a, T>where
T: Sync,
impl<'a, T> Unpin for Endpoint<'a, T>
impl<'a, T> !UnwindSafe for Endpoint<'a, T>
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