pub struct ProtocolRegistry { /* private fields */ }Implementations§
Source§impl ProtocolRegistry
impl ProtocolRegistry
pub fn new() -> Self
pub async fn register(&self, plugin: Arc<dyn ProtocolPlugin>)
pub async fn register_checked( &self, plugin: Arc<dyn ProtocolPlugin>, ) -> Result<()>
pub async fn unregister(&self, name: &str) -> Option<Arc<dyn ProtocolPlugin>>
pub async fn contains(&self, name: &str) -> bool
pub async fn list(&self) -> Vec<String>
pub async fn extra_alpns(&self) -> Vec<Vec<u8>>
pub async fn descriptors(&self) -> Vec<ProtocolPluginDescriptor>
pub async fn apply_router_handlers( &self, builder: RouterBuilder, ) -> Result<RouterBuilder>
pub async fn notify_runtime_ready(&self, context: RuntimeContext) -> Result<()>
Trait Implementations§
Source§impl Default for ProtocolRegistry
impl Default for ProtocolRegistry
Source§fn default() -> ProtocolRegistry
fn default() -> ProtocolRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ProtocolRegistry
impl !UnwindSafe for ProtocolRegistry
impl Freeze for ProtocolRegistry
impl Send for ProtocolRegistry
impl Sync for ProtocolRegistry
impl Unpin for ProtocolRegistry
impl UnsafeUnpin for ProtocolRegistry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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