pub struct FieldDescriptor { /* private fields */ }Expand description
One named, ordered struct field.
Implementations§
Source§impl FieldDescriptor
impl FieldDescriptor
Sourcepub fn new(
name: impl Into<String>,
descriptor: TypeDescriptor,
deprecation: Option<Deprecation>,
) -> Self
pub fn new( name: impl Into<String>, descriptor: TypeDescriptor, deprecation: Option<Deprecation>, ) -> Self
Constructs a struct field without imposing a name grammar.
Sourcepub fn descriptor(&self) -> &TypeDescriptor
pub fn descriptor(&self) -> &TypeDescriptor
Returns the struct field value.
Sourcepub fn deprecation(&self) -> Option<&Deprecation>
pub fn deprecation(&self) -> Option<&Deprecation>
Returns the struct field deprecation metadata.
Trait Implementations§
Source§impl Clone for FieldDescriptor
impl Clone for FieldDescriptor
Source§fn clone(&self) -> FieldDescriptor
fn clone(&self) -> FieldDescriptor
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 FieldDescriptor
impl Debug for FieldDescriptor
impl Eq for FieldDescriptor
Source§impl PartialEq for FieldDescriptor
impl PartialEq for FieldDescriptor
impl StructuralPartialEq for FieldDescriptor
Auto Trait Implementations§
impl Freeze for FieldDescriptor
impl RefUnwindSafe for FieldDescriptor
impl Send for FieldDescriptor
impl Sync for FieldDescriptor
impl Unpin for FieldDescriptor
impl UnsafeUnpin for FieldDescriptor
impl UnwindSafe for FieldDescriptor
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