pub struct FormatSpec {
pub format: FormatKind,
pub extensions: Vec<String>,
}Expand description
A format plus the extensions it reads — one entry of Options::formats.
Accepted forms (all .into()):
Format::Yamlor"yaml"— default extensions(Format::Yaml, ["yml", "conf"])or("yaml", ["yml", "conf"])— custom extensions- a
CustomFormat— user-defined parser with the extensions it was built with
Fields§
§format: FormatKind§extensions: Vec<String>Extensions without the leading dot.
Trait Implementations§
Source§impl Clone for FormatSpec
impl Clone for FormatSpec
Source§fn clone(&self) -> FormatSpec
fn clone(&self) -> FormatSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatSpec
impl Debug for FormatSpec
Source§impl From<&str> for FormatSpec
impl From<&str> for FormatSpec
Source§impl From<CustomFormat> for FormatSpec
impl From<CustomFormat> for FormatSpec
Source§fn from(custom: CustomFormat) -> Self
fn from(custom: CustomFormat) -> Self
Converts to this type from the input type.
Source§impl From<Format> for FormatSpec
impl From<Format> for FormatSpec
Source§impl PartialEq for FormatSpec
impl PartialEq for FormatSpec
Source§fn eq(&self, other: &FormatSpec) -> bool
fn eq(&self, other: &FormatSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FormatSpec
Auto Trait Implementations§
impl !RefUnwindSafe for FormatSpec
impl !UnwindSafe for FormatSpec
impl Freeze for FormatSpec
impl Send for FormatSpec
impl Sync for FormatSpec
impl Unpin for FormatSpec
impl UnsafeUnpin for FormatSpec
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