pub trait FileFormatFactory:
Any
+ Sync
+ Send
+ GetExt
+ Debug {
// Required methods
fn create(
&self,
state: &dyn Session,
format_options: &HashMap<String, String>,
) -> Result<Arc<dyn FileFormat>>;
fn default(&self) -> Arc<dyn FileFormat> ⓘ;
}Expand description
Factory for creating FileFormat instances based on session and command level options
Users can provide their own FileFormatFactory to support arbitrary file formats
Required Methods§
Sourcefn create(
&self,
state: &dyn Session,
format_options: &HashMap<String, String>,
) -> Result<Arc<dyn FileFormat>>
fn create( &self, state: &dyn Session, format_options: &HashMap<String, String>, ) -> Result<Arc<dyn FileFormat>>
Initialize a FileFormat and configure based on session and command level options
Sourcefn default(&self) -> Arc<dyn FileFormat> ⓘ
fn default(&self) -> Arc<dyn FileFormat> ⓘ
Initialize a FileFormat with all options set to default values
Implementations§
Source§impl dyn FileFormatFactory
impl dyn FileFormatFactory
pub fn is<T: FileFormatFactory>(&self) -> bool
pub fn downcast_ref<T: FileFormatFactory>(&self) -> Option<&T>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".