pub struct ExtensionRegistry { /* private fields */ }Expand description
Registry for managing custom extensions
Implementations§
Source§impl ExtensionRegistry
impl ExtensionRegistry
Sourcepub fn register(&mut self, extension: Box<dyn Extension>) -> Result<(), String>
pub fn register(&mut self, extension: Box<dyn Extension>) -> Result<(), String>
Register a new extension
Sourcepub fn unregister(&mut self, name: &str) -> bool
pub fn unregister(&mut self, name: &str) -> bool
Unregister an extension
Sourcepub fn validate(&self, name: &str, value: &ExtensionValue) -> Result<(), String>
pub fn validate(&self, name: &str, value: &ExtensionValue) -> Result<(), String>
Validate an extension value
Sourcepub fn transform(
&self,
name: &str,
value: ExtensionValue,
) -> Result<ExtensionValue, String>
pub fn transform( &self, name: &str, value: ExtensionValue, ) -> Result<ExtensionValue, String>
Transform an extension value
Sourcepub fn validate_all(
&self,
extensions: &HashMap<String, ExtensionValue>,
) -> Result<(), String>
pub fn validate_all( &self, extensions: &HashMap<String, ExtensionValue>, ) -> Result<(), String>
Validate all extensions in a map
Trait Implementations§
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 !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