Skip to main content

ShareAdapter

Trait ShareAdapter 

Source
pub trait ShareAdapter {
    // Required methods
    fn to_normalized(
        &self,
        quorum_id: &str,
    ) -> Result<NormalizedShare, AdapterError>;
    fn from_normalized(
        normalized: &NormalizedShare,
    ) -> Result<Self, AdapterError>
       where Self: Sized;
}
Expand description

Trait for converting scheme-specific share types to/from the normalized representation.

Required Methods§

Source

fn to_normalized( &self, quorum_id: &str, ) -> Result<NormalizedShare, AdapterError>

Convert to a normalized share.

Source

fn from_normalized(normalized: &NormalizedShare) -> Result<Self, AdapterError>
where Self: Sized,

Convert from a normalized share. Returns Err if the scheme doesn’t match.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§