Skip to main content

ProtoBytes

Struct ProtoBytes 

Source
pub struct ProtoBytes { /* private fields */ }

Implementations§

Source§

impl ProtoBytes

Source

pub fn as_view(&self) -> &[u8] ⓘ

Trait Implementations§

Source§

impl AsRef<[u8]> for ProtoBytes

Source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsView for ProtoBytes

Source§

type Proxied = ProtoBytes

Source§

fn as_view(&self) -> &[u8] ⓘ

Converts a borrow into a View with the lifetime of that borrow. Read more
Source§

impl Debug for ProtoBytes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl EntityType for ProtoBytes

Source§

impl<const N: usize> From<&[u8; N]> for ProtoBytes

Source§

fn from(v: &[u8; N]) -> ProtoBytes

Converts to this type from the input type.
Source§

impl From<&[u8]> for ProtoBytes

Source§

fn from(v: &[u8]) -> ProtoBytes

Converts to this type from the input type.
Source§

impl From<ProtoString> for ProtoBytes

Source§

fn from(v: ProtoString) -> Self

Converts to this type from the input type.
Source§

impl IntoProxied<ProtoBytes> for ProtoBytesCow<'_>

Source§

impl IntoProxied<ProtoBytes> for &[u8]

Source§

impl<const N: usize> IntoProxied<ProtoBytes> for &[u8; N]

Source§

impl IntoProxied<ProtoBytes> for Vec<u8>

Source§

impl IntoProxied<ProtoBytes> for &Vec<u8>

Source§

impl IntoProxied<ProtoBytes> for Box<[u8]>

Source§

impl IntoProxied<ProtoBytes> for Cow<'_, [u8]>

Source§

impl IntoProxied<ProtoBytes> for Rc<[u8]>

Source§

impl IntoProxied<ProtoBytes> for Arc<[u8]>

Source§

impl ProtoObject for ProtoBytes

Source§

type View<'msg> = &'msg [u8]

The proxy type that provides shared access to a T, like a &'msg T. Read more
Source§

impl SealedInternal for ProtoBytes

Source§

impl Send for ProtoBytes

Source§

impl Sync for ProtoBytes

Source§

impl UpbTypeConversions<PrimitiveTag> for ProtoBytes

Source§

fn upb_type() -> CType

Source§

fn to_message_value(val: View<'_, ProtoBytes>) -> upb_MessageValue

Source§

unsafe fn into_message_value_fuse_if_required( raw_parent_arena: NonNull<upb_Arena>, val: ProtoBytes, ) -> upb_MessageValue

Safety Read more
Source§

unsafe fn from_message_value<'msg>( msg: upb_MessageValue, ) -> View<'msg, ProtoBytes>

Safety Read more
Source§

unsafe fn copy_repeated( src: NonNull<upb_Array>, dest: NonNull<upb_Array>, arena: NonNull<upb_Arena>, )

Safety Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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> IntoProxied<T> for T
where T: ProtoObject,

Source§

fn into_proxied(self, _private: Private) -> T

Source§

impl<MessageType> MapValue for MessageType
where MessageType: ProtoObject + EntityType + UpbTypeConversions<<MessageType as EntityType>::Tag>,

Source§

fn map_new<K>(_private: Private) -> Map<K, MessageType>
where K: MapKey,

Source§

unsafe fn map_free<K>(_private: Private, _map: &mut Map<K, MessageType>)
where K: MapKey,

Source§

fn map_clear<K>(_private: Private, map: MapMut<'_, K, MessageType>)
where K: MapKey,

Source§

fn map_len<K>(_private: Private, map: MapView<'_, K, MessageType>) -> usize
where K: MapKey,

Source§

fn map_insert<K>( _private: Private, map: MapMut<'_, K, MessageType>, key: <K as ProtoObject>::View<'_>, value: impl IntoProxied<MessageType>, ) -> bool
where K: MapKey,

Source§

fn map_get<'a, K>( _private: Private, map: MapView<'a, K, MessageType>, key: <K as ProtoObject>::View<'_>, ) -> Option<<MessageType as ProtoObject>::View<'a>>
where K: MapKey,

Source§

fn map_get_mut<'a, K>( _private: Private, map: MapMut<'a, K, MessageType>, key: <K as ProtoObject>::View<'_>, ) -> Option<<MessageType as MutProtoObject>::Mut<'a>>
where K: MapKey, MessageType: Message,

Source§

fn map_remove<K>( _private: Private, map: MapMut<'_, K, MessageType>, key: <K as ProtoObject>::View<'_>, ) -> bool
where K: MapKey,

Source§

fn map_iter<K>( _private: Private, map: MapView<'_, K, MessageType>, ) -> MapIter<'_, K, MessageType> ⓘ
where K: MapKey,

Source§

fn map_iter_next<'a, K>( _private: Private, iter: &mut MapIter<'a, K, MessageType>, ) -> Option<(<K as ProtoObject>::View<'a>, <MessageType as ProtoObject>::View<'a>)>
where K: MapKey,

Source§

impl<T> Singular for T

Source§

fn repeated_new(_private: Private) -> Repeated<T>

Source§

unsafe fn repeated_free(_private: Private, _repeated: &mut Repeated<T>)

Source§

fn repeated_len( _private: Private, repeated: <Repeated<T> as ProtoObject>::View<'_>, ) -> usize

Source§

fn repeated_push( _private: Private, repeated: <Repeated<T> as MutProtoObject>::Mut<'_>, val: impl IntoProxied<T>, )

Source§

fn repeated_clear( _private: Private, repeated: <Repeated<T> as MutProtoObject>::Mut<'_>, )

Source§

unsafe fn repeated_get_unchecked<'a>( _private: Private, repeated: <Repeated<T> as ProtoObject>::View<'a>, index: usize, ) -> <T as ProtoObject>::View<'a>

Source§

unsafe fn repeated_get_mut_unchecked<'a>( _private: Private, repeated: <Repeated<T> as MutProtoObject>::Mut<'a>, index: usize, ) -> <T as MutProtoObject>::Mut<'a>
where T: Message,

Source§

unsafe fn repeated_set_unchecked( _private: Private, repeated: <Repeated<T> as MutProtoObject>::Mut<'_>, index: usize, val: impl IntoProxied<T>, )

Source§

fn repeated_copy_from( _private: Private, src: <Repeated<T> as ProtoObject>::View<'_>, dest: <Repeated<T> as MutProtoObject>::Mut<'_>, )

Source§

fn repeated_reserve( _private: Private, repeated: <Repeated<T> as MutProtoObject>::Mut<'_>, additional: usize, )

Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.