pub trait ToProto<P>: Protobuf<P>
where P: From<Self> + Message + Name + Default, <Self as TryFrom<P>>::Error: Display,
{ // Provided methods fn type_url() -> String { ... } fn to_any(self) -> Any { ... } }
Expand description

Types that implement this trait are able to be converted to a raw Protobuf Any type.

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, P> ToProto<P> for T
where T: Protobuf<P>, P: From<Self> + Message + Name + Default, <Self as TryFrom<P>>::Error: Display,