pub struct FieldSpec {
pub field_type: FieldType,
pub required: bool,
pub unique: bool,
pub index: Option<IndexKind>,
pub fulltext: bool,
pub cypher: bool,
pub values: Option<Vec<String>>,
pub default: Option<DefaultValue>,
pub addressable: bool,
}Fields§
§field_type: FieldType§required: bool§unique: bool§index: Option<IndexKind>§fulltext: bool§cypher: boolNOTE: encryption at rest — parsed/rejected today, AES-256-GCM sealing is not wired up yet.
values: Option<Vec<String>>§default: Option<DefaultValue>§addressable: boolWhether this field’s own value is a link target — true for every field, and settable only
on a markdown one, where addressable: false means the content still links out but the
field holds no virtual path of its own and nothing can link to it.
Implementations§
Source§impl FieldSpec
impl FieldSpec
pub fn new(field_type: FieldType) -> Self
Sourcepub fn has_virtual_path(&self) -> bool
pub fn has_virtual_path(&self) -> bool
Whether this field carries its own engine-managed virtual path — the index a markdown link
resolves against, and the value uniqueness is enforced on. A markdown field declaring
addressable: false answers false: it is not a link target, so it needs no path at all.
Trait Implementations§
Source§impl From<FieldSpec> for CatalogFieldSpec
impl From<FieldSpec> for CatalogFieldSpec
impl StructuralPartialEq for FieldSpec
Auto Trait Implementations§
impl Freeze for FieldSpec
impl RefUnwindSafe for FieldSpec
impl Send for FieldSpec
impl Sync for FieldSpec
impl Unpin for FieldSpec
impl UnsafeUnpin for FieldSpec
impl UnwindSafe for FieldSpec
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