pub struct OneofDescriptor { /* private fields */ }Expand description
Handle to one oneof declaration in a MessageDescriptor.
Implementations§
Source§impl OneofDescriptor
impl OneofDescriptor
Sourcepub fn is_synthetic(&self) -> bool
pub fn is_synthetic(&self) -> bool
True iff this oneof was synthesized for a proto3 optional field.
Synthetic oneofs are part of the descriptor model but do not generate
any user-facing oneof Rust enum.
Sourcepub fn parent_message(&self) -> MessageDescriptor
pub fn parent_message(&self) -> MessageDescriptor
Owning message.
Sourcepub fn fields(&self) -> impl ExactSizeIterator<Item = FieldDescriptor> + '_
pub fn fields(&self) -> impl ExactSizeIterator<Item = FieldDescriptor> + '_
Iterate over the fields belonging to this oneof.
Sourcepub fn descriptor_proto(&self) -> &OneofDescriptorProto
pub fn descriptor_proto(&self) -> &OneofDescriptorProto
Raw OneofDescriptorProto for advanced use.
Trait Implementations§
Source§impl Clone for OneofDescriptor
impl Clone for OneofDescriptor
Source§fn clone(&self) -> OneofDescriptor
fn clone(&self) -> OneofDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OneofDescriptor
impl Debug for OneofDescriptor
impl Eq for OneofDescriptor
Auto Trait Implementations§
impl Freeze for OneofDescriptor
impl RefUnwindSafe for OneofDescriptor
impl Send for OneofDescriptor
impl Sync for OneofDescriptor
impl Unpin for OneofDescriptor
impl UnsafeUnpin for OneofDescriptor
impl UnwindSafe for OneofDescriptor
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