Trait splinter::registry::RegistryReader [−][src]
pub trait RegistryReader: Send + Sync {
fn list_nodes<'a, 'b: 'a>(
&'b self,
predicates: &'a [MetadataPredicate]
) -> Result<NodeIter<'a>, RegistryError>;
fn count_nodes(
&self,
predicates: &[MetadataPredicate]
) -> Result<u32, RegistryError>;
fn get_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>;
fn has_node(&self, identity: &str) -> Result<bool, RegistryError> { ... }
}
Expand description
Defines registry read capabilities.
Required methods
fn list_nodes<'a, 'b: 'a>(
&'b self,
predicates: &'a [MetadataPredicate]
) -> Result<NodeIter<'a>, RegistryError>
fn list_nodes<'a, 'b: 'a>(
&'b self,
predicates: &'a [MetadataPredicate]
) -> Result<NodeIter<'a>, RegistryError>
Returns an iterator over the nodes in the registry.
Arguments
predicates
- A list of predicates to be applied to the resulting list. These are applied as an AND, from a query perspective. If the list is empty, it is the equivalent of no predicates (i.e. return all).
fn count_nodes(
&self,
predicates: &[MetadataPredicate]
) -> Result<u32, RegistryError>
fn count_nodes(
&self,
predicates: &[MetadataPredicate]
) -> Result<u32, RegistryError>
Returns the count of nodes in the registry.
Arguments
predicates
- A list of predicates to be applied before counting the nodes. These are applied as an AND, from a query perspective. If the list is empty, it is the equivalent of no predicates (i.e. return all).
Provided methods
Trait Implementations
The key is permitted if and only if the node with the given node_id
exists in the
registry and the node has the given key. Otherwise, the key is not permitted.