pub struct Field { /* private fields */ }
Implementations
sourceimpl Field
impl Field
pub fn builder(name: impl Into<String>) -> FieldBuilder
sourcepub fn classes(&self) -> &Option<Vec<String>>
pub fn classes(&self) -> &Option<Vec<String>>
Returns a reference to the Fields’s Classes.
Examples
let field: Field = Field::builder("orderNumber")
.classes(vec!["item"]).into();
assert_eq!(&Some(vec!["item".to_string()]), field.classes());
sourcepub fn title(&self) -> &Option<String>
pub fn title(&self) -> &Option<String>
Returns a reference to the Fields’s title.
Examples
let field: Field = Field::builder("orderNumber")
.title("field").into();
assert_eq!(&Some("field".to_string()), field.title());
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<FieldBuilder> for Field
impl From<FieldBuilder> for Field
sourcefn from(builder: FieldBuilder) -> Field
fn from(builder: FieldBuilder) -> Field
Converts to this type from the input type.
impl StructuralPartialEq for Field
Auto Trait Implementations
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more