Enum dce_router::api::Controller
source · pub enum Controller<Req, Ret> {
Sync(fn(_: Req) -> DceResult<Option<Ret>>),
Async(Box<dyn Fn(Req) -> Pin<Box<dyn Future<Output = DceResult<Option<Ret>>> + Send>> + Send + Sync>),
}Variants§
Sync(fn(_: Req) -> DceResult<Option<Ret>>)
Async(Box<dyn Fn(Req) -> Pin<Box<dyn Future<Output = DceResult<Option<Ret>>> + Send>> + Send + Sync>)
Trait Implementations§
Auto Trait Implementations§
impl<Req, Ret> !RefUnwindSafe for Controller<Req, Ret>
impl<Req, Ret> Send for Controller<Req, Ret>
impl<Req, Ret> Sync for Controller<Req, Ret>
impl<Req, Ret> Unpin for Controller<Req, Ret>
impl<Req, Ret> !UnwindSafe for Controller<Req, Ret>
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