Struct splinter::registry::LocalYamlRegistry [−][src]
pub struct LocalYamlRegistry { /* fields omitted */ }
Expand description
A local, read/write registry.
The LocalYamlRegistry
provides access to and modification of a local registry YAML file. The
local registry file must be a YAML sequence of nodes, where each node is valid (see Node
for
validity criteria).
The contents of the YAML file are cached in-memory by the registry; this means that the registry will continue to be available even if the backing YAML file becomes unavailable. Each time the registry is read, it will check the backing file for any changes since the last read and refresh the internal cache if necessary.
On initializaion, the registry will check if its backing file already exists. If the backing file already exists, the registry will attempt to load, parse, and validate it. If the backing file does not already exist, the registry will attempt to create it.
Implementations
Construct a new LocalYamlRegistry
. If the backing file already exists, it will be
loaded, parsed, and validated; if any of these steps fails, the error will be returned. If
the backing file doesn’t already exist, it will be created and initialized; if file creation
fails, the error will be returned.
Arguments
file_path
- The path of the backing YAML file.
Trait Implementations
Returns the node with the given identity, if it exists in the registry. Read more
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. Read more
Returns the count of nodes in the registry. Read more
Clone implementation for RwRegistry
. The implementation of the Clone
trait for
Box<RwRegistry>
calls this method. Read more
Clone the RwRegistry
as a Box<dyn RegistryReader>
.
Clone the RwRegistry
as a Box<dyn RegistryWriter>
.
Auto Trait Implementations
impl RefUnwindSafe for LocalYamlRegistry
impl Send for LocalYamlRegistry
impl Sync for LocalYamlRegistry
impl Unpin for LocalYamlRegistry
impl UnwindSafe for LocalYamlRegistry
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more
type Output = T
type Output = T
Should always be Self