pub trait Ctor {
type Opt: Opt;
type Config;
type Error: Into<Error>;
// Required methods
fn cid(&self) -> &Cid;
fn new_with(
&mut self,
config: Self::Config,
) -> Result<Self::Opt, Self::Error>;
}Required Associated Types§
Required Methods§
fn cid(&self) -> &Cid
fn new_with(&mut self, config: Self::Config) -> Result<Self::Opt, Self::Error>
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<Opt: Opt, Config: Send + Sync, Err: Into<Error>> Ctor for Box<dyn Ctor<Opt = Opt, Config = Config, Error = Err> + Send + Sync>
Available on crate feature sync only.Implement Ctor for Box<dyn Ctor>.
impl<Opt: Opt, Config: Send + Sync, Err: Into<Error>> Ctor for Box<dyn Ctor<Opt = Opt, Config = Config, Error = Err> + Send + Sync>
Available on crate feature
sync only.Implement Ctor for Box<dyn Ctor>.