pub struct VaultFile {Show 14 fields
pub path: PathBuf,
pub content: String,
pub metadata: FileMetadata,
pub frontmatter: Option<Frontmatter>,
pub headings: Vec<Heading>,
pub links: Vec<Link>,
pub backlinks: HashSet<Link>,
pub blocks: Vec<Block>,
pub tags: Vec<Tag>,
pub callouts: Vec<Callout>,
pub tasks: Vec<TaskItem>,
pub is_parsed: bool,
pub parse_error: Option<String>,
pub last_parsed: Option<f64>,
}Expand description
A complete vault file with parsed content
Fields§
§path: PathBuf§content: String§metadata: FileMetadata§frontmatter: Option<Frontmatter>§headings: Vec<Heading>§links: Vec<Link>§backlinks: HashSet<Link>§blocks: Vec<Block>§callouts: Vec<Callout>§tasks: Vec<TaskItem>§is_parsed: bool§parse_error: Option<String>§last_parsed: Option<f64>Implementations§
Source§impl VaultFile
impl VaultFile
Sourcepub fn new(path: PathBuf, content: String, metadata: FileMetadata) -> Self
pub fn new(path: PathBuf, content: String, metadata: FileMetadata) -> Self
Create a new vault file
Sourcepub fn outgoing_links(&self) -> HashSet<&str>
pub fn outgoing_links(&self) -> HashSet<&str>
Get outgoing links
Sourcepub fn headings_by_text(&self) -> HashMap<&str, &Heading>
pub fn headings_by_text(&self) -> HashMap<&str, &Heading>
Get headings indexed by text
Sourcepub fn blocks_with_ids(&self) -> HashMap<&str, &Block>
pub fn blocks_with_ids(&self) -> HashMap<&str, &Block>
Get blocks with IDs
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VaultFile
impl<'de> Deserialize<'de> for VaultFile
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 VaultFile
impl RefUnwindSafe for VaultFile
impl Send for VaultFile
impl Sync for VaultFile
impl Unpin for VaultFile
impl UnwindSafe for VaultFile
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