pub struct OutputField {
pub name: &'static str,
pub field_type: &'static str,
pub optional: bool,
}Expand description
Manual output field descriptor.
Fields§
§name: &'static strField name.
field_type: &'static strField type label.
optional: boolWhether the field is optional.
Implementations§
Source§impl OutputField
impl OutputField
Sourcepub const fn new(name: &'static str, field_type: &'static str) -> Self
pub const fn new(name: &'static str, field_type: &'static str) -> Self
Creates a field descriptor.
Sourcepub const fn list(name: &'static str, field_type: &'static str) -> Self
pub const fn list(name: &'static str, field_type: &'static str) -> Self
Creates a list field with a custom type label.
Sourcepub const fn string_list(name: &'static str) -> Self
pub const fn string_list(name: &'static str) -> Self
Creates a string-list field.
Sourcepub const fn float_list(name: &'static str) -> Self
pub const fn float_list(name: &'static str) -> Self
Creates a float-list field.
Sourcepub const fn object_list(name: &'static str) -> Self
pub const fn object_list(name: &'static str) -> Self
Creates an object-list field.
Trait Implementations§
Source§impl Clone for OutputField
impl Clone for OutputField
Source§fn clone(&self) -> OutputField
fn clone(&self) -> OutputField
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 moreimpl Copy for OutputField
Source§impl Debug for OutputField
impl Debug for OutputField
impl Eq for OutputField
Source§impl PartialEq for OutputField
impl PartialEq for OutputField
Source§fn eq(&self, other: &OutputField) -> bool
fn eq(&self, other: &OutputField) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OutputField
Auto Trait Implementations§
impl Freeze for OutputField
impl RefUnwindSafe for OutputField
impl Send for OutputField
impl Sync for OutputField
impl Unpin for OutputField
impl UnsafeUnpin for OutputField
impl UnwindSafe for OutputField
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.