pub struct App<Signer, Context, KnownVerifiers, Routes> { /* private fields */ }
Implementations§
Source§impl<Signer, Context> App<Signer, Context, KnownVerifiers, BTreeMap<Name, RouteHandler<Context>>>
impl<Signer, Context> App<Signer, Context, KnownVerifiers, BTreeMap<Name, RouteHandler<Context>>>
Source§impl<Signer, Context, Verifiers> App<Signer, Context, Verifiers, BTreeMap<Name, RouteHandler<Context>>>where
Signer: SignMethod + Send + Sync + 'static,
Context: Clone + Send + 'static,
Verifiers: ToVerifier + Send + Sync + 'static,
impl<Signer, Context, Verifiers> App<Signer, Context, Verifiers, BTreeMap<Name, RouteHandler<Context>>>where
Signer: SignMethod + Send + Sync + 'static,
Context: Clone + Send + 'static,
Verifiers: ToVerifier + Send + Sync + 'static,
pub fn route<Callback, Verifier, Params, Output, G>(
self,
name: impl ToName,
verifier: Verifier,
func: Callback,
) -> Selfwhere
Callback: IntoInterestCallbackFunction<Params, Context> + Send + Sync + 'static + Fn(AppHandler, Interest<Params>, Context) -> G,
G: Future<Output = Option<Data<Output>>> + Send + 'static,
Verifier: InterestVerifier + Send + Sync + 'static,
Params: TlvDecode + Send + 'static,
Output: TlvEncode + 'static,
pub fn on_start<F>(self, on_start: F) -> Selfwhere
F: OnStartFn<Context> + 'static,
pub fn mtu(self, mtu: usize) -> Self
pub async fn start(self) -> Result<()>
Auto Trait Implementations§
impl<Signer, Context, KnownVerifiers, Routes> Freeze for App<Signer, Context, KnownVerifiers, Routes>
impl<Signer, Context, KnownVerifiers, Routes> !RefUnwindSafe for App<Signer, Context, KnownVerifiers, Routes>
impl<Signer, Context, KnownVerifiers, Routes> !Send for App<Signer, Context, KnownVerifiers, Routes>
impl<Signer, Context, KnownVerifiers, Routes> !Sync for App<Signer, Context, KnownVerifiers, Routes>
impl<Signer, Context, KnownVerifiers, Routes> Unpin for App<Signer, Context, KnownVerifiers, Routes>
impl<Signer, Context, KnownVerifiers, Routes> !UnwindSafe for App<Signer, Context, KnownVerifiers, Routes>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more