Trait splinter::registry::RegistryWriter
source · [−]pub trait RegistryWriter: Send + Sync {
fn add_node(&self, node: Node) -> Result<(), RegistryError>;
fn update_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 update_node(&self, node: Node) -> Result<(), RegistryError>
fn update_node(&self, node: Node) -> Result<(), RegistryError>
Replaces an existing node with the same identity.
Arguments
node
- The node to be 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.