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§
Sourcefn to_normalized(
&self,
quorum_id: &str,
) -> Result<NormalizedShare, AdapterError>
fn to_normalized( &self, quorum_id: &str, ) -> Result<NormalizedShare, AdapterError>
Convert to a normalized share.
Sourcefn from_normalized(normalized: &NormalizedShare) -> Result<Self, AdapterError>where
Self: Sized,
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".