Subject

Trait Subject 

Source
pub trait Subject {
    type Error: Error + Send + Sync;
    type Options<'a>: Default;

    // Required methods
    fn start(&self, options: Self::Options<'_>) -> Result<State, Self::Error>;
    fn stop(&self) -> Result<State, Self::Error>;
    fn destroy(&self) -> Result<State, Self::Error>;
    fn exists(&self) -> Result<bool, Self::Error>;
    fn running(&self) -> Result<bool, Self::Error>;
}
Expand description

The trait that these coordinate functions work with.

Required Associated Types§

Required Methods§

Source

fn start(&self, options: Self::Options<'_>) -> Result<State, Self::Error>

Source

fn stop(&self) -> Result<State, Self::Error>

Source

fn destroy(&self) -> Result<State, Self::Error>

Source

fn exists(&self) -> Result<bool, Self::Error>

Source

fn running(&self) -> Result<bool, Self::Error>

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§

Source§

impl Subject for Cluster

Cluster can be coordinated.