Struct dce_router::router::Router
source · pub struct Router<Raw: RawRequest + 'static> { /* private fields */ }Implementations§
source§impl<Raw: RawRequest + Debug + 'static> Router<Raw>
impl<Raw: RawRequest + Debug + 'static> Router<Raw>
pub fn new() -> Self
pub fn get_tree(&self) -> &Arc<ATree<ApiTrunk<Raw>, &'static str>>
pub fn get_before_controller(&self) -> &Option<BeforeController<Raw>>
pub fn before_controller(self, before_controller: BeforeController<Raw>) -> Self
pub fn push( self, supplier: fn() -> &'static (dyn ApiTrait<Raw> + Send + Sync) ) -> Self
pub fn consumer_push(self, consumer: fn(_: Self) -> Self) -> Self
pub fn ready(self) -> &'static mut Arc<Router<Raw>>
pub async fn route( context: RequestContext<Raw> ) -> (Option<bool>, DceResult<Option<Raw::Resp>>)
Trait Implementations§
Auto Trait Implementations§
impl<Raw> !RefUnwindSafe for Router<Raw>
impl<Raw> Send for Router<Raw>
impl<Raw> Sync for Router<Raw>
impl<Raw> Unpin for Router<Raw>
impl<Raw> !UnwindSafe for Router<Raw>
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