pub struct ExtensionRegistry { /* private fields */ }Expand description
Registry of configured extensions. Cheap to clone (holds Arcs).
Implementations§
Source§impl ExtensionRegistry
impl ExtensionRegistry
pub fn new() -> Self
pub fn register(&mut self, ext: Arc<dyn DlepExtension>)
Sourcepub fn advertised(&self) -> Vec<ExtensionId>
pub fn advertised(&self) -> Vec<ExtensionId>
Union of all advertised IDs, for Session Initialization.
Sourcepub fn negotiate(&self, remote: &[ExtensionId]) -> Vec<Arc<dyn DlepExtension>>
pub fn negotiate(&self, remote: &[ExtensionId]) -> Vec<Arc<dyn DlepExtension>>
Given the peer’s advertised IDs, return extensions that accepted negotiation. Only these receive subsequent hook calls.
pub fn iter(&self) -> impl Iterator<Item = &Arc<dyn DlepExtension>>
Trait Implementations§
Source§impl Clone for ExtensionRegistry
impl Clone for ExtensionRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for ExtensionRegistry
impl !UnwindSafe for ExtensionRegistry
impl Freeze for ExtensionRegistry
impl Send for ExtensionRegistry
impl Sync for ExtensionRegistry
impl Unpin for ExtensionRegistry
impl UnsafeUnpin for ExtensionRegistry
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