pub struct ScalarField { /* private fields */ }Implementations§
Source§impl ScalarField
impl ScalarField
pub fn new( id: impl Into<String>, prompt: impl Into<String>, kind: ScalarKind, ) -> Self
pub fn optional(self) -> Self
pub fn with_default(self, default: impl Into<String>) -> Self
pub fn with_dynamic_default(self, dynamic_default: DynamicDefault) -> Self
pub fn one_of( self, choices: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn active_when( self, controller: impl Into<String>, expected: impl Into<String>, ) -> Self
pub fn with_validator(self, validator: FieldValidator) -> Self
pub fn id(&self) -> &str
pub fn prompt(&self) -> &str
pub fn kind(&self) -> ScalarKind
pub fn is_optional(&self) -> bool
pub fn default(&self) -> Option<&str>
pub fn dynamic_default(&self) -> Option<&DynamicDefault>
pub fn constraint(&self) -> Option<&Constraint>
pub fn condition(&self) -> Option<&Condition>
pub fn validator(&self) -> Option<&FieldValidator>
Trait Implementations§
Source§impl Clone for ScalarField
impl Clone for ScalarField
Source§fn clone(&self) -> ScalarField
fn clone(&self) -> ScalarField
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 ScalarField
impl Debug for ScalarField
impl Eq for ScalarField
Source§impl From<ScalarField> for Item
impl From<ScalarField> for Item
Source§fn from(field: ScalarField) -> Self
fn from(field: ScalarField) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ScalarField
impl PartialEq for ScalarField
impl StructuralPartialEq for ScalarField
Auto Trait Implementations§
impl !RefUnwindSafe for ScalarField
impl !UnwindSafe for ScalarField
impl Freeze for ScalarField
impl Send for ScalarField
impl Sync for ScalarField
impl Unpin for ScalarField
impl UnsafeUnpin for ScalarField
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more