pub struct MetadataWriteOptions { /* private fields */ }Expand description
Options to configure how metadata files are written.
Implementations§
Source§impl MetadataWriteOptions
impl MetadataWriteOptions
Sourcepub fn set_truncate(&mut self, truncate: bool)
pub fn set_truncate(&mut self, truncate: bool)
Sets the option to overwrite the output file if it already exists.
If true and the file path already exists, its contents will be replaced.
If false and the file path already exists, an error will be returned.
This setting has no effect if the file path does not exist.
Sourcepub fn set_write_anchors(&mut self, write_anchors: bool)
pub fn set_write_anchors(&mut self, write_anchors: bool)
Sets the option to write YAML anchors and aliases.
If true then conditions, constraints, files, file details, plugin cleaning data details, messages and message contents that appear more than once in the metadata will be deduplicated by including a YAML anchor when writing the first occurrence of the value, and writing YAML aliases in place of further occurrences.
If false, YAML anchors and aliases will not be used, so no deduplication will occur.
Sourcepub fn set_write_common_section(&mut self, write_common_section: bool)
pub fn set_write_common_section(&mut self, write_common_section: bool)
Sets the option to write YAML anchors in a common section.
If write_anchors is true and this is also true, the document’s
root-level map will start with a common key. Its value will be a list
of all the values for which YAML anchors will be written, so that all
YAML anchors will appear within that list.
This setting has no effect if write_anchors is false.
Sourcepub fn set_anchor_file_strings(&mut self, anchor_file_strings: bool)
pub fn set_anchor_file_strings(&mut self, anchor_file_strings: bool)
Sets the option to write anchors for File values that only have a name.
If write_anchors is true and this is also true, then all repeated
File metadata values will be deduplicated using YAML anchors and
aliases.
If this is false, then only File metadata that is serialised as a YAML object will be deduplicated (i.e. File values that only have a name will not be deduplicated).
This setting has no effect if write_anchors is false.
Sourcepub fn write_anchors(&self) -> bool
pub fn write_anchors(&self) -> bool
Gets the current value of the write_anchors option.
Sourcepub fn write_common_section(&self) -> bool
pub fn write_common_section(&self) -> bool
Gets the current value of the write_common_section option.
Sourcepub fn anchor_file_strings(&self) -> bool
pub fn anchor_file_strings(&self) -> bool
Gets the current value of the anchor_file_strings option.
Trait Implementations§
Source§impl Clone for MetadataWriteOptions
impl Clone for MetadataWriteOptions
Source§impl Debug for MetadataWriteOptions
impl Debug for MetadataWriteOptions
Auto Trait Implementations§
impl Freeze for MetadataWriteOptions
impl RefUnwindSafe for MetadataWriteOptions
impl Send for MetadataWriteOptions
impl Sync for MetadataWriteOptions
impl Unpin for MetadataWriteOptions
impl UnsafeUnpin for MetadataWriteOptions
impl UnwindSafe for MetadataWriteOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more