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

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).

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).

Returns the node with the given identity, if it exists in the registry.

Arguments

  • identity - The identity of the node.

Provided methods

Determines whether or not the node exists in the registry.

Arguments

  • identity - The identity of the node.

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.

Implementations on Foreign Types

Implementors