pub struct Router<Rp: RoutableProtocol + 'static> { /* private fields */ }Implementations§
Source§impl<Rp: RoutableProtocol + Debug + 'static> Router<Rp>
impl<Rp: RoutableProtocol + Debug + 'static> Router<Rp>
pub fn new() -> DceResult<Self>
pub fn set_separator( self, path_part_separator: char, suffix_separator: char, ) -> Self
pub fn suffix_boundary(&self) -> char
pub fn apis_tree(&self) -> &Arc<ATree<ApiBranch<Rp>, &'static str>>
pub fn before_controller(&self) -> &Option<EventHandler<Rp>>
pub fn after_controller(&self) -> &Option<EventHandler<Rp>>
pub fn set_event_handlers( self, before_controller: Option<EventHandler<Rp>>, after_controller: Option<EventHandler<Rp>>, ) -> Self
pub fn push( self, supplier: fn() -> &'static (dyn ApiTrait<Rp> + Send + Sync), ) -> Self
pub fn consumer_push(self, consumer: fn(Self) -> Self) -> Self
pub fn ready(self) -> DceResult<&'static Arc<Router<Rp>>>
pub async fn route(context: &mut Context<Rp>) -> DceResult<()>
pub async fn id_route(context: &mut Context<Rp>) -> DceResult<()>
Trait Implementations§
Auto Trait Implementations§
impl<Rp> Freeze for Router<Rp>
impl<Rp> !RefUnwindSafe for Router<Rp>
impl<Rp> Send for Router<Rp>
impl<Rp> Sync for Router<Rp>
impl<Rp> Unpin for Router<Rp>
impl<Rp> !UnwindSafe for Router<Rp>
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