pub struct ExtensionRegistry { /* private fields */ }Expand description
Per-session/runtime registry of advertised extension names (§7, §21.2).
Construct one per session; the runtime’s session bookkeeping owns it.
Implementations§
Source§impl ExtensionRegistry
impl ExtensionRegistry
Sourcepub fn from_names<I, S>(names: I) -> Result<Self, String>
pub fn from_names<I, S>(names: I) -> Result<Self, String>
Sourcepub fn register(&mut self, name: String) -> Result<(), String>
pub fn register(&mut self, name: String) -> Result<(), String>
Register an extension name.
§Errors
Returns the offending name if it does not match an extension naming rule (§21.1).
Sourcepub fn is_advertised(&self, name: &str) -> bool
pub fn is_advertised(&self, name: &str) -> bool
True when name was previously registered.
Sourcepub fn classify(&self, type_name: &str) -> TypeClassification
pub fn classify(&self, type_name: &str) -> TypeClassification
Classify a wire-level type string per §21.3.
Trait Implementations§
Source§impl Clone for ExtensionRegistry
impl Clone for ExtensionRegistry
Source§fn clone(&self) -> ExtensionRegistry
fn clone(&self) -> ExtensionRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtensionRegistry
impl Debug for ExtensionRegistry
Source§impl Default for ExtensionRegistry
impl Default for ExtensionRegistry
Source§fn default() -> ExtensionRegistry
fn default() -> ExtensionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExtensionRegistry
impl RefUnwindSafe for ExtensionRegistry
impl Send for ExtensionRegistry
impl Sync for ExtensionRegistry
impl Unpin for ExtensionRegistry
impl UnsafeUnpin for ExtensionRegistry
impl UnwindSafe 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