pub struct VaultSchema {
pub collections: BTreeMap<String, CollectionSchema>,
}Expand description
Top-level schema file structure.
Fields§
§collections: BTreeMap<String, CollectionSchema>Implementations§
Source§impl VaultSchema
impl VaultSchema
Sourcepub fn collections_for_folder<'a>(
&'a self,
folder: &str,
) -> Vec<(&'a String, &'a CollectionSchema)>
pub fn collections_for_folder<'a>( &'a self, folder: &str, ) -> Vec<(&'a String, &'a CollectionSchema)>
Collections whose folder matches folder exactly, or is a path
under it (e.g. when folder = "Notes", also matches collections
declared with folder: Notes/movie). Used by schema show /
schema validate to scope queries to a folder, and by the MCP
schema_show tool’s optional folder filter.
Sourcepub fn collection_for_folder<'a>(
&'a self,
folder: &str,
) -> Option<&'a CollectionSchema>
pub fn collection_for_folder<'a>( &'a self, folder: &str, ) -> Option<&'a CollectionSchema>
The single collection whose folder matches folder exactly.
Used by CreateBuilder to pick the unambiguous schema for a
vaultdb create <folder> invocation. Prefix matches don’t apply
here — for a create, the user means a specific folder.
Trait Implementations§
Source§impl Clone for VaultSchema
impl Clone for VaultSchema
Source§fn clone(&self) -> VaultSchema
fn clone(&self) -> VaultSchema
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 VaultSchema
impl Debug for VaultSchema
Source§impl<'de> Deserialize<'de> for VaultSchema
impl<'de> Deserialize<'de> for VaultSchema
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 VaultSchema
impl RefUnwindSafe for VaultSchema
impl Send for VaultSchema
impl Sync for VaultSchema
impl Unpin for VaultSchema
impl UnsafeUnpin for VaultSchema
impl UnwindSafe for VaultSchema
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