Struct cyfs_base::protobuf_helper::ProtobufCodecHelper
source · [−]pub struct ProtobufCodecHelper {}Implementations
sourceimpl ProtobufCodecHelper
impl ProtobufCodecHelper
pub fn raw_measure<'a, T, P>(
value: &'a T,
purpose: &Option<RawEncodePurpose>
) -> BuckyResult<usize> where
P: TryFrom<&'a T>,
P: Message,
<P as TryFrom<&'a T>>::Error: Display,
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>,
P: Message,
<P as TryFrom<&'b T>>::Error: Display,
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,
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>> where
T: FromStr,
<T as FromStr>::Err: Display,
BuckyError: From<<T as FromStr>::Err>,
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> where
T: TryFrom<P>,
<T as TryFrom<P>>::Error: Display,
BuckyError: From<<T as TryFrom<P>>::Error>,
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>,
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>,
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>,
pub fn decode_value<T, P>(value: P) -> BuckyResult<T> where
T: TryFrom<P>,
<T as TryFrom<P>>::Error: Display,
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,
pub fn decode_str_value<T>(value: &str) -> BuckyResult<T> where
T: FromStr,
<T as FromStr>::Err: Display,
Auto Trait Implementations
impl RefUnwindSafe for ProtobufCodecHelper
impl Send for ProtobufCodecHelper
impl Sync for ProtobufCodecHelper
impl Unpin for ProtobufCodecHelper
impl UnwindSafe for ProtobufCodecHelper
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more