pub struct DataTypePlugin(/* private fields */);
Expand description
A data type plugin.
Implementations§
Source§impl DataTypePlugin
impl DataTypePlugin
Sourcepub const fn new(
identifier: &'static str,
match_name_fn: fn(&str) -> bool,
create_fn: fn(&MetadataV3) -> Result<Arc<dyn DataTypeExtension>, PluginCreateError>,
) -> DataTypePlugin
pub const fn new( identifier: &'static str, match_name_fn: fn(&str) -> bool, create_fn: fn(&MetadataV3) -> Result<Arc<dyn DataTypeExtension>, PluginCreateError>, ) -> DataTypePlugin
Create a new DataTypePlugin
.
Methods from Deref<Target = Plugin<Arc<dyn DataTypeExtension>, MetadataV3>>§
Sourcepub fn create(&self, inputs: &TInputs) -> Result<TPlugin, PluginCreateError>
pub fn create(&self, inputs: &TInputs) -> Result<TPlugin, PluginCreateError>
Create a TPlugin
plugin from inputs
.
§Errors
Returns a PluginCreateError
if plugin creation fails due to either:
- metadata name being unregistered,
- or the configuration is invalid, or
- some other reason specific to the plugin.
Sourcepub fn match_name(&self, name: &str) -> bool
pub fn match_name(&self, name: &str) -> bool
Returns true if this plugin is associated with name
.
Sourcepub fn identifier(&self) -> &'static str
pub fn identifier(&self) -> &'static str
Returns the identifier of the plugin.
Trait Implementations§
Source§impl Deref for DataTypePlugin
impl Deref for DataTypePlugin
Source§type Target = Plugin<Arc<dyn DataTypeExtension>, MetadataV3>
type Target = Plugin<Arc<dyn DataTypeExtension>, MetadataV3>
The resulting type after dereferencing.
impl Collect for DataTypePlugin
Auto Trait Implementations§
impl Freeze for DataTypePlugin
impl RefUnwindSafe for DataTypePlugin
impl Send for DataTypePlugin
impl Sync for DataTypePlugin
impl Unpin for DataTypePlugin
impl UnwindSafe for DataTypePlugin
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more