Trait splinter::registry::RegistryWriter [−][src]
pub trait RegistryWriter: Send + Sync {
fn insert_node(&self, node: Node) -> Result<(), RegistryError>;
fn delete_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>;
}
Expand description
Defines registry write capabilities.
Required methods
fn insert_node(&self, node: Node) -> Result<(), RegistryError>
fn insert_node(&self, node: Node) -> Result<(), RegistryError>
Adds a new node to the registry, or replaces an existing node with the same identity.
Arguments
node
- The node to be added to or updated in the registry.
fn delete_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>
fn delete_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>
Deletes a node with the given identity and returns the node if it was in the registry.
Arguments
identity
- The Splinter identity of the node.