[][src]Trait splinter::registry::RegistryReader

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 fetch_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>; fn has_node(&self, identity: &str) -> Result<bool, RegistryError> { ... } }

Defines registry read capabilities.

Required methods

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>

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

fn fetch_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>

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

Arguments

  • identity - The identity of the node.
Loading content...

Provided methods

fn has_node(&self, identity: &str) -> Result<bool, RegistryError>

Determines whether or not the node exists in the registry.

Arguments

  • identity - The identity of the node.
Loading content...

Trait Implementations

impl AdminKeyVerifier for dyn RegistryReader[src]

fn is_permitted(
    &self,
    node_id: &str,
    key: &[u8]
) -> Result<bool, AdminKeyVerifierError>
[src]

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

impl<NR: ?Sized> RegistryReader for Box<NR> where
    NR: RegistryReader
[src]

Loading content...

Implementors

impl RegistryReader for LocalYamlRegistry[src]

impl RegistryReader for RemoteYamlRegistry[src]

impl RegistryReader for UnifiedRegistry[src]

Loading content...