pub struct ProtobufCodecHelper {}
Implementations§
Source§impl ProtobufCodecHelper
impl ProtobufCodecHelper
pub fn raw_measure<'a, T, P>( value: &'a T, purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<usize>
pub fn raw_encode<'a, 'b, T, P>( value: &'b T, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a mut [u8]>
pub fn raw_decode<'de, T, P>(buf: &'de [u8]) -> BuckyResult<(T, &'de [u8])>
pub fn decode_buf<T>(buf: Vec<u8>) -> BuckyResult<T>where
T: for<'de> RawDecode<'de>,
pub fn decode_string_list<T>(list: Vec<String>) -> BuckyResult<Vec<T>>
pub fn encode_string_list<T>(list: &[T]) -> BuckyResult<RepeatedField<String>>where
T: ToString,
pub fn decode_buf_list<T>(list: impl Into<Vec<Vec<u8>>>) -> BuckyResult<Vec<T>>where
T: for<'de> RawDecode<'de>,
pub fn encode_buf_list<T>(list: &[T]) -> BuckyResult<RepeatedField<Vec<u8>>>where
T: RawEncode,
pub fn decode_nested_item<T, P>(item: P) -> BuckyResult<T>
pub fn encode_nested_item<'a, T, P>(item: &'a T) -> BuckyResult<P>
pub fn decode_nested_list<T, P>(list: impl Into<Vec<P>>) -> BuckyResult<Vec<T>>
pub fn encode_nested_list<'a, T, P>( list: &'a Vec<T>, ) -> BuckyResult<RepeatedField<P>>
pub fn decode_value<T, P>(value: P) -> BuckyResult<T>
pub fn decode_value_list<T, P>(list: impl Into<Vec<P>>) -> BuckyResult<Vec<T>>
pub fn decode_str_value<T>(value: &str) -> BuckyResult<T>
Auto Trait Implementations§
impl Freeze for ProtobufCodecHelper
impl RefUnwindSafe for ProtobufCodecHelper
impl Send for ProtobufCodecHelper
impl Sync for ProtobufCodecHelper
impl Unpin for ProtobufCodecHelper
impl UnwindSafe for ProtobufCodecHelper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more