Trait pb_jelly::OpenProtoEnum
source · pub trait OpenProtoEnum: ProtoEnum {
type Closed: ClosedProtoEnum;
// Required method
fn into_known(self) -> Option<Self::Closed>;
// Provided methods
fn name(self) -> Option<&'static str> { ... }
fn is_known(self) -> bool { ... }
}
Expand description
Trait implemented by enums to help with serialization and deserialization.
Note that this is not a closed enum.
Required Associated Types§
type Closed: ClosedProtoEnum
Required Methods§
sourcefn into_known(self) -> Option<Self::Closed>
fn into_known(self) -> Option<Self::Closed>
If this is a known variant, returns the corresponding closed enum value.
Provided Methods§
Object Safety§
This trait is not object safe.