pub struct ExtensionId<Extendee, T: Proxied> { /* private fields */ }Expand description
A unique identifier for an extension field. Values of this type are emitted into the generated code and used to access extension fields.
The type parameter Extendee is the message type that the extension field is extending.
The type parameter T defines the kind of extension field: either T for a singular extension
or Repeated<T> for a repeated extension.
Implementations§
Source§impl<Extendee: Message, T: Proxied + EntityType> ExtensionId<Extendee, T>
impl<Extendee: Message, T: Proxied + EntityType> ExtensionId<Extendee, T>
pub fn has(&self, msg: impl AsView<Proxied = Extendee>) -> boolwhere
Self: ExtHas<Extendee>,
pub fn get<'msg>(
&self,
msg: impl IntoView<'msg, Proxied = Extendee>,
) -> View<'msg, T>where
Self: ExtAccess<Extendee, T, <T as EntityType>::Tag>,
pub fn clear(&self, msg: impl AsMut<MutProxied = Extendee>)where
Self: ExtClear<Extendee>,
pub fn set(
&self,
msg: impl AsMut<MutProxied = Extendee>,
value: impl IntoProxied<T>,
)where
Self: ExtAccess<Extendee, T, <T as EntityType>::Tag>,
pub fn get_mut<'msg>( &self, msg: impl IntoMut<'msg, MutProxied = Extendee>, ) -> Mut<'msg, T>
Auto Trait Implementations§
impl<Extendee, T> Forget for ExtensionId<Extendee, T>
impl<Extendee, T> Freeze for ExtensionId<Extendee, T>
impl<Extendee, T> Move for ExtensionId<Extendee, T>
impl<Extendee, T> RefUnwindSafe for ExtensionId<Extendee, T>where
Option<<T as ProtoObject>::View<'static>>: RefUnwindSafe,
PhantomData<Extendee>: RefUnwindSafe,
impl<Extendee, T> Send for ExtensionId<Extendee, T>
impl<Extendee, T> Sync for ExtensionId<Extendee, T>
impl<Extendee, T> Unpin for ExtensionId<Extendee, T>
impl<Extendee, T> UnsafeUnpin for ExtensionId<Extendee, T>
impl<Extendee, T> UnwindSafe for ExtensionId<Extendee, T>
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