pub struct Router<TCtx = ()> { /* private fields */ }
Expand description
TODO: Examples exporting types and with rspc_axum
Implementations§
Source§impl<TCtx> Router<TCtx>
impl<TCtx> Router<TCtx>
pub fn new() -> Self
pub fn procedure( self, key: impl Into<Cow<'static, str>>, procedure: impl Into<ErasedProcedure<TCtx>>, ) -> Self
pub fn setup(self, func: impl FnOnce(&mut State) + 'static) -> Self
pub fn nest(self, prefix: impl Into<Cow<'static, str>>, other: Self) -> Self
pub fn merge(self, other: Self) -> Self
pub fn build( self, ) -> Result<(Procedures<TCtx>, Types), Vec<DuplicateProcedureKeyError>>
Trait Implementations§
Source§impl<'a, TCtx> IntoIterator for &'a Router<TCtx>
impl<'a, TCtx> IntoIterator for &'a Router<TCtx>
Auto Trait Implementations§
impl<TCtx> Freeze for Router<TCtx>
impl<TCtx = ()> !RefUnwindSafe for Router<TCtx>
impl<TCtx = ()> !Send for Router<TCtx>
impl<TCtx = ()> !Sync for Router<TCtx>
impl<TCtx> Unpin for Router<TCtx>
impl<TCtx = ()> !UnwindSafe for Router<TCtx>
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