pub struct Validated { /* private fields */ }Expand description
The fields that had rules and passed them.
Implementations§
Source§impl Validated
impl Validated
pub fn get(&self, name: &str) -> Option<&Json>
pub fn has(&self, name: &str) -> bool
Sourcepub fn string(&self, name: &str) -> Option<String>
pub fn string(&self, name: &str) -> Option<String>
A scalar as text. A number comes back as its digits, matching what
Request::input hands back for the same field sent through a form.
pub fn integer(&self, name: &str) -> Option<i64>
pub fn number(&self, name: &str) -> Option<f64>
Sourcepub fn boolean(&self, name: &str) -> Option<bool>
pub fn boolean(&self, name: &str) -> Option<bool>
A boolean, accepting the "1"/"0" and "true"/"false" a form sends.
pub fn array(&self, name: &str) -> Option<&[Json]>
pub fn fields(&self) -> &BTreeMap<String, Json>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Validated
Auto Trait Implementations§
impl Freeze for Validated
impl RefUnwindSafe for Validated
impl Send for Validated
impl Sync for Validated
impl Unpin for Validated
impl UnsafeUnpin for Validated
impl UnwindSafe for Validated
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