pub trait ExtensionOptions: Send + Sync + Debug + 'static {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
    fn cloned(&self) -> Box<dyn ExtensionOptions>;
    fn set(&mut self, key: &str, value: &str) -> Result<()>;
    fn entries(&self) -> Vec<ConfigEntry>;
}
Expand description

An object-safe API for storing arbitrary configuration

Required Methods§

source

fn as_any(&self) -> &dyn Any

Return self as Any

This is needed until trait upcasting is stabilised

source

fn as_any_mut(&mut self) -> &mut dyn Any

Return self as Any

This is needed until trait upcasting is stabilised

source

fn cloned(&self) -> Box<dyn ExtensionOptions>

Return a deep clone of this ExtensionOptions

It is important this does not share mutable state to avoid consistency issues with configuration changing whilst queries are executing

source

fn set(&mut self, key: &str, value: &str) -> Result<()>

Set the given key, value pair

source

fn entries(&self) -> Vec<ConfigEntry>

Returns the ConfigEntry stored in this ExtensionOptions

Implementors§