Struct norad::WriteOptions [−][src]
pub struct WriteOptions { /* fields omitted */ }
Expand description
Options that can be set when writing the UFO to disk.
You construct WriteOptions
using builder semantics:
let single_tab = WriteOptions::default();
let two_tabs = WriteOptions::default()
.whitespace("\t\t");
let spaces = WriteOptions::default()
.whitespace(" ");
let spaces_and_singlequotes = WriteOptions::default()
.whitespace(" ")
.quote_char(QuoteChar::Single);
Implementations
Builder-style method to customize the whitespace.
By default, we indent with a single tab (“\t”).
The argument, may be either a 'static str
or a String
. You should
prefer to use a 'static str
where possible.
The string can contain any number of a single ASCII character, but must not contain multiple different characters. As an example, “\t\t” is fine, but “\t \t” is not, because it contains both tabs and spaces.
This is not good API, but is a work around for the fact that the quick-xml and plist crates both represent whitespace in different ways.
Panics
Panics if the provided string is empty, or if it contains multiple different characters.
Builder-style method to customize the XML declaration attribute definition quote char.
By default, we indent with double quotes.
The quote style is defined with a QuoteChar
enum argument.
Return a reference to XmlWriteOptions
for use with the plist
crate.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WriteOptions
impl Send for WriteOptions
impl Sync for WriteOptions
impl Unpin for WriteOptions
impl UnwindSafe for WriteOptions
Blanket Implementations
Mutably borrows from an owned value. Read more