pub struct WireField {
pub name: String,
pub schema: WireSchema,
pub presence: FieldPresence,
}Expand description
One serialized field of a struct or struct variant.
Fields§
§name: StringThe serialized name, after rename and rename_all have been applied.
schema: WireSchema§presence: FieldPresenceImplementations§
Source§impl WireField
impl WireField
Sourcepub fn new(
name: impl Into<String>,
schema: WireSchema,
presence: FieldPresence,
) -> Self
pub fn new( name: impl Into<String>, schema: WireSchema, presence: FieldPresence, ) -> Self
Declare one field.
Sourcepub fn required(name: impl Into<String>, schema: WireSchema) -> Self
pub fn required(name: impl Into<String>, schema: WireSchema) -> Self
Declare a field that is always written and always required.
Trait Implementations§
impl Eq for WireField
impl StructuralPartialEq for WireField
Auto Trait Implementations§
impl Freeze for WireField
impl RefUnwindSafe for WireField
impl Send for WireField
impl Sync for WireField
impl Unpin for WireField
impl UnsafeUnpin for WireField
impl UnwindSafe for WireField
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