generic_session_types/repr/mod.rs
1pub trait Repr<T>
2where
3 Self: Sized,
4{
5 /// Convert a raw type to the common representation.
6 fn from(v: T) -> Self;
7 /// Try to convert the representation back into one of the raw message types.
8 fn try_into(self) -> Result<T, Self>;
9 /// Check whether the representation can be turned into this raw type, without consuming.
10 fn can_into(&self) -> bool;
11}
12
13mod json_string_repr;
14pub use json_string_repr::*;
15mod box_any_repr;
16pub use box_any_repr::*;