[−][src]Struct splinter::registry::LocalYamlRegistry
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
impl LocalYamlRegistry
[src]
pub fn new(file_path: &str) -> Result<LocalYamlRegistry, RegistryError>
[src]
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
impl Clone for LocalYamlRegistry
[src]
fn clone(&self) -> LocalYamlRegistry
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl RegistryReader for LocalYamlRegistry
[src]
fn fetch_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>
[src]
fn list_nodes<'a, 'b: 'a>(
&'b self,
predicates: &'a [MetadataPredicate]
) -> Result<NodeIter<'a>, RegistryError>
[src]
&'b self,
predicates: &'a [MetadataPredicate]
) -> Result<NodeIter<'a>, RegistryError>
fn count_nodes(
&self,
predicates: &[MetadataPredicate]
) -> Result<u32, RegistryError>
[src]
&self,
predicates: &[MetadataPredicate]
) -> Result<u32, RegistryError>
fn has_node(&self, identity: &str) -> Result<bool, RegistryError>
[src]
impl RegistryWriter for LocalYamlRegistry
[src]
fn insert_node(&self, node: Node) -> Result<(), RegistryError>
[src]
fn delete_node(&self, identity: &str) -> Result<Option<Node>, RegistryError>
[src]
impl RwRegistry for LocalYamlRegistry
[src]
fn clone_box(&self) -> Box<dyn RwRegistry>
[src]
fn clone_box_as_reader(&self) -> Box<dyn RegistryReader>
[src]
fn clone_box_as_writer(&self) -> Box<dyn RegistryWriter>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P, N> IntoBytes<P> for N where
P: Message + FromNative<N>,
[src]
P: Message + FromNative<N>,
fn into_bytes(Self) -> Result<Vec<u8>, ProtoConversionError>
[src]
impl<N, P> IntoNative<N> for P where
N: FromProto<P>,
[src]
N: FromProto<P>,
fn into_native(Self) -> Result<N, ProtoConversionError>
[src]
impl<N, P> IntoProto<P> for N where
P: FromNative<N>,
[src]
P: FromNative<N>,
fn into_proto(Self) -> Result<P, ProtoConversionError>
[src]
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,