pub struct DataObjectTypeRegistry { /* private fields */ }Expand description
Data object type registry that maps types to their corresponding connectors
Implementations§
Source§impl DataObjectTypeRegistry
impl DataObjectTypeRegistry
Sourcepub fn register_type(
&mut self,
object_type: &str,
connector_name: &str,
capabilities: ConnectorCapabilities,
) -> NirvResult<()>
pub fn register_type( &mut self, object_type: &str, connector_name: &str, capabilities: ConnectorCapabilities, ) -> NirvResult<()>
Register a data object type with its connector
Sourcepub fn get_connector_for_type(&self, object_type: &str) -> Option<&String>
pub fn get_connector_for_type(&self, object_type: &str) -> Option<&String>
Get the connector name for a data object type
Sourcepub fn get_connector_capabilities(
&self,
connector_name: &str,
) -> Option<&ConnectorCapabilities>
pub fn get_connector_capabilities( &self, connector_name: &str, ) -> Option<&ConnectorCapabilities>
Get capabilities for a connector
Sourcepub fn list_types(&self) -> Vec<String>
pub fn list_types(&self) -> Vec<String>
List all registered data object types
Sourcepub fn is_type_registered(&self, object_type: &str) -> bool
pub fn is_type_registered(&self, object_type: &str) -> bool
Check if a type is registered
Sourcepub fn unregister_type(&mut self, object_type: &str) -> Option<String>
pub fn unregister_type(&mut self, object_type: &str) -> Option<String>
Unregister a data object type
Trait Implementations§
Source§impl Debug for DataObjectTypeRegistry
impl Debug for DataObjectTypeRegistry
Auto Trait Implementations§
impl Freeze for DataObjectTypeRegistry
impl RefUnwindSafe for DataObjectTypeRegistry
impl Send for DataObjectTypeRegistry
impl Sync for DataObjectTypeRegistry
impl Unpin for DataObjectTypeRegistry
impl UnwindSafe for DataObjectTypeRegistry
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