Lelum

Trait Lelum 

pub trait Lelum: 'static + Send {
    // Required methods
    fn health(
        &mut self,
    ) -> impl Future<Output = Result<HealthReport, LelumError<'_>>> + Send;
    fn read(
        &mut self,
        path: &str,
    ) -> impl Future<Output = Result<DataEntryValue, LelumError<'_>>> + Send;
    fn query(
        &mut self,
        root: Option<&str>,
        depth: Option<u32>,
        include_values: bool,
    ) -> impl Future<Output = Result<QueryResult<'_>, LelumError<'_>>> + Send;
    fn update(
        &mut self,
        path: &str,
        value: &Value,
    ) -> impl Future<Output = Result<DataEntryValue, LelumError<'_>>> + Send;
}
Available on crate feature server only.
Expand description

High-level trait for implementing a LeLuM Varlink server.

Required Methods§

fn health( &mut self, ) -> impl Future<Output = Result<HealthReport, LelumError<'_>>> + Send

Returns a health report.

See com.inomotech.Lelum.Health for details.

fn read( &mut self, path: &str, ) -> impl Future<Output = Result<DataEntryValue, LelumError<'_>>> + Send

Reads the current value of the data entry node at path.

See com.inomotech.Lelum.Read for details.

fn query( &mut self, root: Option<&str>, depth: Option<u32>, include_values: bool, ) -> impl Future<Output = Result<QueryResult<'_>, LelumError<'_>>> + Send

Runs a query against the VSS tree.

See com.inomotech.Lelum.Query for details.

fn update( &mut self, path: &str, value: &Value, ) -> impl Future<Output = Result<DataEntryValue, LelumError<'_>>> + Send

Updates the value of the data entry node at path.

See com.inomotech.Lelum.Update for details.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§