pub trait TcScheme: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn kind(&self) -> TcSchemeKind;
fn create_session(
&self,
params: &SessionParams,
) -> Result<Box<dyn SessionImpl>>;
}Expand description
A registered threshold scheme.
Implementations are Send + Sync so a scheme can be looked up from
any thread. Each create_session call yields a fresh SessionImpl
that owns the per-session mutable state.
Required Methods§
Sourcefn kind(&self) -> TcSchemeKind
fn kind(&self) -> TcSchemeKind
What kind of artifact this scheme produces.
Sourcefn create_session(&self, params: &SessionParams) -> Result<Box<dyn SessionImpl>>
fn create_session(&self, params: &SessionParams) -> Result<Box<dyn SessionImpl>>
Build a new session for this scheme. The returned SessionImpl
owns all per-session state; the framework drives it via
SessionImpl::round / SessionImpl::result /
SessionImpl::destroy.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".