pub struct ProtobufCodecHelper {}

Implementations§

source§

impl ProtobufCodecHelper

source

pub fn raw_measure<'a, T, P>( value: &'a T, purpose: &Option<RawEncodePurpose> ) -> BuckyResult<usize>where P: TryFrom<&'a T> + Message, <P as TryFrom<&'a T>>::Error: Display,

source

pub fn raw_encode<'a, 'b, T, P>( value: &'b T, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose> ) -> BuckyResult<&'a mut [u8]>where P: TryFrom<&'b T> + Message, <P as TryFrom<&'b T>>::Error: Display,

source

pub fn raw_decode<'de, T, P>(buf: &'de [u8]) -> BuckyResult<(T, &'de [u8])>where T: TryFrom<P>, P: Message, <T as TryFrom<P>>::Error: Display,

source

pub fn decode_buf<T>(buf: Vec<u8>) -> BuckyResult<T>where T: for<'de> RawDecode<'de>,

source

pub fn decode_string_list<T>(list: Vec<String>) -> BuckyResult<Vec<T>>where T: FromStr, <T as FromStr>::Err: Display, BuckyError: From<<T as FromStr>::Err>,

source

pub fn encode_string_list<T>(list: &[T]) -> BuckyResult<RepeatedField<String>>where T: ToString,

source

pub fn decode_buf_list<T>(list: impl Into<Vec<Vec<u8>>>) -> BuckyResult<Vec<T>>where T: for<'de> RawDecode<'de>,

source

pub fn encode_buf_list<T>(list: &[T]) -> BuckyResult<RepeatedField<Vec<u8>>>where T: RawEncode,

source

pub fn decode_nested_item<T, P>(item: P) -> BuckyResult<T>where T: TryFrom<P>, <T as TryFrom<P>>::Error: Display, BuckyError: From<<T as TryFrom<P>>::Error>,

source

pub fn encode_nested_item<'a, T, P>(item: &'a T) -> BuckyResult<P>where P: TryFrom<&'a T>, <P as TryFrom<&'a T>>::Error: Display, BuckyError: From<<P as TryFrom<&'a T>>::Error>,

source

pub fn decode_nested_list<T, P>(list: impl Into<Vec<P>>) -> BuckyResult<Vec<T>>where T: TryFrom<P>, <T as TryFrom<P>>::Error: Display, BuckyError: From<<T as TryFrom<P>>::Error>,

source

pub fn encode_nested_list<'a, T, P>( list: &'a Vec<T> ) -> BuckyResult<RepeatedField<P>>where T: 'a, P: TryFrom<&'a T>, <P as TryFrom<&'a T>>::Error: Display, BuckyError: From<<P as TryFrom<&'a T>>::Error>,

source

pub fn decode_value<T, P>(value: P) -> BuckyResult<T>where T: TryFrom<P>, <T as TryFrom<P>>::Error: Display,

source

pub fn decode_value_list<T, P>(list: impl Into<Vec<P>>) -> BuckyResult<Vec<T>>where T: TryFrom<P>, <T as TryFrom<P>>::Error: Display,

source

pub fn decode_str_value<T>(value: &str) -> BuckyResult<T>where T: FromStr, <T as FromStr>::Err: Display,

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V