pub struct FieldDef {
pub name: String,
pub kind: ValueKind,
pub protection: FieldProtection,
pub indexed: bool,
pub required: bool,
pub search: FieldIndex,
}Fields§
§name: String§kind: ValueKind§protection: FieldProtection§indexed: boolIndexed fields support crate::query::TargetFilter lookups
(current and historical values). RSA-protected fields cannot be indexed.
required: bool§search: FieldIndexBlind token index for prefix/substring/case-insensitive search — see
FieldIndex. Text fields only.
Implementations§
Source§impl FieldDef
impl FieldDef
pub fn text(name: &str) -> Self
pub fn indexed(self) -> Self
pub fn required(self) -> Self
pub fn kind(self, kind: ValueKind) -> Self
pub fn protection(self, p: FieldProtection) -> Self
Sourcepub fn search(self, idx: FieldIndex) -> Self
pub fn search(self, idx: FieldIndex) -> Self
Attach a blind token index — see FieldIndex for the search shapes
and the leakage trade-off.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldDef
impl<'de> Deserialize<'de> for FieldDef
Source§fn 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
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin for FieldDef
impl UnsafeUnpin for FieldDef
impl UnwindSafe for FieldDef
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