Struct DocumentMetadata
pub struct DocumentMetadata { /* private fields */ }Expand description
Vendor-neutral metadata for a modeled document.
Implementations§
§impl DocumentMetadata
impl DocumentMetadata
pub const fn new() -> DocumentMetadata
pub const fn new() -> DocumentMetadata
Creates empty document metadata.
pub fn with_collection(self, collection: CollectionName) -> DocumentMetadata
pub fn with_collection(self, collection: CollectionName) -> DocumentMetadata
Sets the collection name.
pub const fn with_revision(self, revision: DocumentRevision) -> DocumentMetadata
pub const fn with_revision(self, revision: DocumentRevision) -> DocumentMetadata
Sets the document revision.
pub const fn with_version(self, version: DocumentVersion) -> DocumentMetadata
pub const fn with_version(self, version: DocumentVersion) -> DocumentMetadata
Sets the document version.
pub const fn collection(&self) -> Option<&CollectionName>
pub const fn collection(&self) -> Option<&CollectionName>
Returns the collection name, if present.
pub const fn revision(&self) -> Option<DocumentRevision>
pub const fn revision(&self) -> Option<DocumentRevision>
Returns the revision, if present.
pub const fn version(&self) -> Option<DocumentVersion>
pub const fn version(&self) -> Option<DocumentVersion>
Returns the version, if present.
Trait Implementations§
§impl Clone for DocumentMetadata
impl Clone for DocumentMetadata
§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 more§impl Debug for DocumentMetadata
impl Debug for DocumentMetadata
§impl Default for DocumentMetadata
impl Default for DocumentMetadata
§fn default() -> DocumentMetadata
fn default() -> DocumentMetadata
Returns the “default value” for a type. Read more
§impl PartialEq for DocumentMetadata
impl PartialEq for DocumentMetadata
impl Eq for DocumentMetadata
impl StructuralPartialEq for DocumentMetadata
Auto Trait Implementations§
impl Freeze for DocumentMetadata
impl RefUnwindSafe for DocumentMetadata
impl Send for DocumentMetadata
impl Sync for DocumentMetadata
impl Unpin for DocumentMetadata
impl UnsafeUnpin 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