pub trait ProtoType<Rust>: Sized {
// Required methods
fn into_rust(self) -> Result<Rust, TryFromProtoError>;
fn from_rust(rust: &Rust) -> Self;
}
Expand description
Required Methods§
Sourcefn into_rust(self) -> Result<Rust, TryFromProtoError>
fn into_rust(self) -> Result<Rust, TryFromProtoError>
See RustType::from_proto
.
Sourcefn from_rust(rust: &Rust) -> Self
fn from_rust(rust: &Rust) -> Self
See RustType::into_proto
.
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.