Struct cataclysm::http::MultipleMethod
source · [−]pub struct MultipleMethod(_);
Expand description
Holds multiple methods to make callback management easier
Implementations
sourceimpl MultipleMethod
impl MultipleMethod
sourcepub fn to<T: Sync, F: Callback<A> + Send + Sync + 'static, A: Extractor<T>>(
self,
handler: F
) -> MethodHandler<T>
pub fn to<T: Sync, F: Callback<A> + Send + Sync + 'static, A: Extractor<T>>(
self,
handler: F
) -> MethodHandler<T>
Turns the Method into a MethodHandler, which is a short for a tuple Method - Handler
let mul = Method::Put.and(Method::Post).and(Method::Patch);
sourcepub fn and(self, rhs: Method) -> MultipleMethod
pub fn and(self, rhs: Method) -> MultipleMethod
Adds another method
// This first and belongs to the `Method` struct
let mul = Method::Put.and(Method::Post);
// This one to the `MultipleMethod` struct
let more_mul = mul.and(Method::Patch);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MultipleMethod
impl Send for MultipleMethod
impl Sync for MultipleMethod
impl Unpin for MultipleMethod
impl UnwindSafe for MultipleMethod
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more