pub struct Field { /* private fields */ }Expand description
One public field mapped to one database column.
Implementations§
Source§impl Field
impl Field
Sourcepub fn new(
public_name: impl Into<String>,
column_name: impl Into<String>,
value_kind: ValueKind,
) -> RqsResult<Self>
pub fn new( public_name: impl Into<String>, column_name: impl Into<String>, value_kind: ValueKind, ) -> RqsResult<Self>
Create one allowlisted field mapping.
Sourcepub fn allow_regex(self) -> Self
pub fn allow_regex(self) -> Self
Permit regex values for this field.
Sourcepub fn public_name(&self) -> &str
pub fn public_name(&self) -> &str
Return the public query field name.
Sourcepub fn column_name(&self) -> &str
pub fn column_name(&self) -> &str
Return the allowlisted database column.
Sourcepub fn value_kind(&self) -> ValueKind
pub fn value_kind(&self) -> ValueKind
Return the expected value type.
Sourcepub fn regex_allowed(&self) -> bool
pub fn regex_allowed(&self) -> bool
Return true when regex values are allowed.
Trait Implementations§
impl Eq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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