pub trait ProtoMapEntry<K, V> {
// Required methods
fn from_rust<'a>(entry: (&'a K, &'a V)) -> Self;
fn into_rust(self) -> Result<(K, V), TryFromProtoError>;
}
Expand description
A trait that allows Self
to be used as an entry in a
Vec<Self>
representing a Rust *Map<K, V>
.
Required Methods§
fn from_rust<'a>(entry: (&'a K, &'a V)) -> Self
fn into_rust(self) -> Result<(K, V), TryFromProtoError>
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.