pub struct Router<TCtx = (), TMeta = ()>where
TCtx: 'static,{ /* private fields */ }๐Deprecated: This is replaced by
rspc::Router. Refer to the rspc::legacy module for bridging a legacy router into a modern one.Expand description
TODO
Implementationsยง
Sourceยงimpl<TCtx, TMeta> Router<TCtx, TMeta>where
TCtx: 'static,
impl<TCtx, TMeta> Router<TCtx, TMeta>where
TCtx: 'static,
pub async fn exec( &self, ctx: TCtx, kind: ExecKind, key: String, input: Option<Value>, ) -> Result<Value, ExecError>
pub async fn exec_subscription( &self, ctx: TCtx, key: String, input: Option<Value>, ) -> Result<Pin<Box<dyn Stream<Item = Result<Value, ExecError>> + Send>>, ExecError>
pub fn arced(self) -> Arc<Self>
pub fn typ_store(&self) -> TypeCollection
๐Deprecated: Use
Self::type_mappub fn type_map(&self) -> TypeCollection
pub fn queries(&self) -> &BTreeMap<String, Procedure<TCtx>>
pub fn mutations(&self) -> &BTreeMap<String, Procedure<TCtx>>
pub fn subscriptions(&self) -> &BTreeMap<String, Procedure<TCtx>>
pub fn export_ts<TPath: AsRef<Path>>( &self, export_path: TPath, ) -> Result<(), ExportError>
Auto Trait Implementationsยง
impl<TCtx, TMeta> Freeze for Router<TCtx, TMeta>
impl<TCtx = (), TMeta = ()> !RefUnwindSafe for Router<TCtx, TMeta>
impl<TCtx, TMeta> Send for Router<TCtx, TMeta>where
TMeta: Send,
impl<TCtx, TMeta> Sync for Router<TCtx, TMeta>where
TMeta: Sync,
impl<TCtx, TMeta> Unpin for Router<TCtx, TMeta>where
TMeta: Unpin,
impl<TCtx = (), TMeta = ()> !UnwindSafe for Router<TCtx, TMeta>
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