Struct vnd_siren::field::FieldBuilder
source · pub struct FieldBuilder { /* private fields */ }
Implementations
sourceimpl FieldBuilder
impl FieldBuilder
sourcepub fn class(self, class: impl Into<String>) -> Self
pub fn class(self, class: impl Into<String>) -> Self
Add a Class to the Field.
Examples
let field: Field = Field::builder("orderNumber")
.class("item").into();
assert_eq!(&Some(vec!["item".to_string()]), field.classes());
sourcepub fn classes(self, classes: Vec<impl Into<String>>) -> Self
pub fn classes(self, classes: Vec<impl Into<String>>) -> Self
Add a vector of Classes to the Field.
Examples
let field: Field = Field::builder("orderNumber")
.classes(vec!["item"]).into();
assert_eq!(&Some(vec!["item".to_string()]), field.classes());
sourcepub fn title(self, title: impl Into<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
Set the title of the Field.
Examples
let field: Field = Field::builder("orderNumber")
.title("field").into();
assert_eq!(&Some("field".to_string()), field.title());
Trait Implementations
sourceimpl Clone for FieldBuilder
impl Clone for FieldBuilder
sourcefn clone(&self) -> FieldBuilder
fn clone(&self) -> FieldBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FieldBuilder
impl Debug for FieldBuilder
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.
sourceimpl PartialEq<FieldBuilder> for FieldBuilder
impl PartialEq<FieldBuilder> for FieldBuilder
sourcefn eq(&self, other: &FieldBuilder) -> bool
fn eq(&self, other: &FieldBuilder) -> bool
impl StructuralPartialEq for FieldBuilder
Auto Trait Implementations
impl RefUnwindSafe for FieldBuilder
impl Send for FieldBuilder
impl Sync for FieldBuilder
impl Unpin for FieldBuilder
impl UnwindSafe for FieldBuilder
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