pub struct MemoryExtensionTypeRegistry { /* private fields */ }Expand description
An ExtensionTypeRegistry that uses in memory HashMaps.
Implementations§
Source§impl MemoryExtensionTypeRegistry
impl MemoryExtensionTypeRegistry
Sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Creates an empty MemoryExtensionTypeRegistry.
Sourcepub fn new_with_canonical_extension_types() -> Self
pub fn new_with_canonical_extension_types() -> Self
Pre-registers the canonical extension types in the extension type registry.
Sourcepub fn new_with_types(
types: impl IntoIterator<Item = ExtensionTypeRegistrationRef>,
) -> Result<Self>
pub fn new_with_types( types: impl IntoIterator<Item = ExtensionTypeRegistrationRef>, ) -> Result<Self>
Creates a new MemoryExtensionTypeRegistry with the provided types.
§Errors
Returns an error if one of the types is a native type.
Sourcepub fn all_extension_types(&self) -> Vec<ExtensionTypeRegistrationRef> ⓘ
pub fn all_extension_types(&self) -> Vec<ExtensionTypeRegistrationRef> ⓘ
Returns a list of all registered types.
Trait Implementations§
Source§impl Clone for MemoryExtensionTypeRegistry
impl Clone for MemoryExtensionTypeRegistry
Source§fn clone(&self) -> MemoryExtensionTypeRegistry
fn clone(&self) -> MemoryExtensionTypeRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryExtensionTypeRegistry
impl Debug for MemoryExtensionTypeRegistry
Source§impl ExtensionTypeRegistry for MemoryExtensionTypeRegistry
impl ExtensionTypeRegistry for MemoryExtensionTypeRegistry
Source§fn extension_type_registration(
&self,
name: &str,
) -> Result<ExtensionTypeRegistrationRef>
fn extension_type_registration( &self, name: &str, ) -> Result<ExtensionTypeRegistrationRef>
Returns a reference to registration of an extension type named
name. Read moreSource§fn extension_type_registrations(&self) -> Vec<ExtensionTypeRegistrationRef> ⓘ
fn extension_type_registrations(&self) -> Vec<ExtensionTypeRegistrationRef> ⓘ
Returns all registered ExtensionTypeRegistration.
Source§fn add_extension_type_registration(
&self,
extension_type: ExtensionTypeRegistrationRef,
) -> Result<Option<ExtensionTypeRegistrationRef>>
fn add_extension_type_registration( &self, extension_type: ExtensionTypeRegistrationRef, ) -> Result<Option<ExtensionTypeRegistrationRef>>
Registers a new ExtensionTypeRegistrationRef, returning any previously registered
implementation. Read more
Source§fn remove_extension_type_registration(
&self,
name: &str,
) -> Result<Option<ExtensionTypeRegistrationRef>>
fn remove_extension_type_registration( &self, name: &str, ) -> Result<Option<ExtensionTypeRegistrationRef>>
Deregisters an extension type registration with the name
name, returning the
implementation that was deregistered. Read moreSource§fn create_extension_type_for_field(
&self,
field: &Field,
) -> Result<Option<DFExtensionTypeRef>>
fn create_extension_type_for_field( &self, field: &Field, ) -> Result<Option<DFExtensionTypeRef>>
Auto Trait Implementations§
impl Freeze for MemoryExtensionTypeRegistry
impl RefUnwindSafe for MemoryExtensionTypeRegistry
impl Send for MemoryExtensionTypeRegistry
impl Sync for MemoryExtensionTypeRegistry
impl Unpin for MemoryExtensionTypeRegistry
impl UnsafeUnpin for MemoryExtensionTypeRegistry
impl UnwindSafe for MemoryExtensionTypeRegistry
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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