#[non_exhaustive]pub struct Declaration {
pub number: i32,
pub full_name: String,
pub type: String,
pub reserved: bool,
pub repeated: bool,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.number: i32The extension number declared within the extension range.
full_name: StringThe fully-qualified name of the extension field. There must be a leading dot in front of the full name.
type: StringThe fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
reserved: boolIf true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.
repeated: boolIf true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.
Implementations§
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a duplicate of the value. Read more
1.0.0 · 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 Declaration
impl Debug for Declaration
Source§impl Default for Declaration
impl Default for Declaration
Source§fn default() -> Declaration
fn default() -> Declaration
Returns the “default value” for a type. Read more
Source§impl Message for Declaration
impl Message for Declaration
Source§impl PartialEq for Declaration
impl PartialEq for Declaration
impl StructuralPartialEq for Declaration
Auto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnwindSafe for Declaration
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