[][src]Struct splinter::registry::LocalYamlRegistry

pub struct LocalYamlRegistry { /* fields omitted */ }

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]

impl RegistryReader for LocalYamlRegistry[src]

impl RegistryWriter for LocalYamlRegistry[src]

impl RwRegistry for LocalYamlRegistry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<P, N> IntoBytes<P> for N where
    P: Message + FromNative<N>, 
[src]

impl<N, P> IntoNative<N> for P where
    N: FromProto<P>, 
[src]

impl<N, P> IntoProto<P> for N where
    P: FromNative<N>, 
[src]

impl<T> IntoSql for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,