datafusion_common::config

Trait ExtensionOptions

Source
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§