ProtoPack

Trait ProtoPack 

Source
pub trait ProtoPack<T>
where Self: Sized,
{ // Required method fn pack(self) -> Result<T, Error>; }

Required Methods§

Source

fn pack(self) -> Result<T, Error>

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.

Implementations on Foreign Types§

Source§

impl ProtoPack<Option<Duration>> for Duration

Source§

impl ProtoPack<Option<Timestamp>> for DateTime<Utc>

Source§

impl ProtoPack<Option<Value>> for Value

Source§

impl ProtoPack<bool> for bool

Source§

fn pack(self) -> Result<bool>

Source§

impl ProtoPack<f32> for f32

Source§

fn pack(self) -> Result<f32>

Source§

impl ProtoPack<f64> for f64

Source§

fn pack(self) -> Result<f64>

Source§

impl ProtoPack<i32> for i32

Source§

fn pack(self) -> Result<i32>

Source§

impl ProtoPack<i64> for i64

Source§

fn pack(self) -> Result<i64>

Source§

impl ProtoPack<u32> for u32

Source§

fn pack(self) -> Result<u32>

Source§

impl ProtoPack<u64> for u64

Source§

fn pack(self) -> Result<u64>

Source§

impl ProtoPack<String> for String

Source§

impl ProtoPack<String> for BigDecimal

Source§

impl ProtoPack<Vec<u8>> for Vec<u8>

Source§

fn pack(self) -> Result<Vec<u8>>

Source§

impl ProtoPack<Duration> for Duration

Source§

impl ProtoPack<Timestamp> for DateTime<Utc>

Source§

impl ProtoPack<Value> for Value

Source§

impl<K, V, K2, V2> ProtoPack<HashMap<K, V>> for HashMap<K2, V2>
where K: Eq + Hash, K2: ProtoPack<K> + Eq + Hash, V2: ProtoPack<V>,

Source§

fn pack(self) -> Result<HashMap<K, V>>

Source§

impl<T1, T2> ProtoPack<Option<T1>> for Option<T2>
where T2: ProtoPack<T1>,

Source§

fn pack(self) -> Result<Option<T1>, Error>

Source§

impl<T, T2> ProtoPack<Vec<T>> for Vec<T2>
where T2: ProtoPack<T>,

Source§

fn pack(self) -> Result<Vec<T>>

Implementors§

Source§

impl<T> ProtoPack<Value> for Json<T>
where T: Serialize + for<'de> Deserialize<'de>,