pub struct OneofDescriptor { /* private fields */ }Expand description
A oneof declaration within a message.
Constructed only by DescriptorPool; not
constructible by downstream crates.
Implementations§
Source§impl OneofDescriptor
impl OneofDescriptor
Sourcepub fn options(&self) -> Option<&OneofOptions>
pub fn options(&self) -> Option<&OneofOptions>
The raw OneofOptions for this oneof, if any were declared.
See FieldDescriptor::options for how to read custom options.
Sourcepub fn field_indices(&self) -> &[u16]
pub fn field_indices(&self) -> &[u16]
Indices into the parent message’s fields
for members of this oneof.
Sourcepub fn is_synthetic(&self) -> bool
pub fn is_synthetic(&self) -> bool
Whether this is a synthetic oneof generated for a proto3 optional
field (exactly one member, not user-declared).
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 moreAuto 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