pub struct DocumentMetadata {
pub file_path: Option<PathBuf>,
pub format: DocumentFormat,
pub version: Option<String>,
pub metadata: HashMap<String, String>,
}Expand description
Document metadata
Fields§
§file_path: Option<PathBuf>Path to the source file
format: DocumentFormatDocument format
version: Option<String>Format-specific version information
metadata: HashMap<String, String>Format-specific tags or metadata
Implementations§
Source§impl DocumentMetadata
impl DocumentMetadata
Sourcepub fn new(format: DocumentFormat) -> Self
pub fn new(format: DocumentFormat) -> Self
Create new metadata
Sourcepub fn with_file_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn with_file_path<P: AsRef<Path>>(self, path: P) -> Self
Set file path
Sourcepub fn with_version<S: Into<String>>(self, version: S) -> Self
pub fn with_version<S: Into<String>>(self, version: S) -> Self
Set version
Trait Implementations§
Source§impl Clone for DocumentMetadata
impl Clone for DocumentMetadata
Source§fn clone(&self) -> DocumentMetadata
fn clone(&self) -> DocumentMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DocumentMetadata
impl RefUnwindSafe for DocumentMetadata
impl Send for DocumentMetadata
impl Sync for DocumentMetadata
impl Unpin for DocumentMetadata
impl UnwindSafe for DocumentMetadata
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