#[non_exhaustive]pub enum Format {
Yaml,
Toml,
}Available on crate features
input-toml or input-yaml only.Expand description
How a text is written.
Non-exhaustive: each variant exists only with its format’s feature.
Cargo unifies features across a build, so a caller’s match needs a
wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Yaml
Available on crate feature
input-yaml only.YAML, read by serde-saphyr and placed by yamled.
Toml
Available on crate feature
input-toml only.TOML, read and placed by the toml crate.
Implementations§
Source§impl Format
impl Format
Sourcepub fn of(path: &Path) -> Result<Self, InputError>
pub fn of(path: &Path) -> Result<Self, InputError>
The format a file’s extension names, compared without regard to case:
.toml is TOML, and .yaml and .yml are YAML.
§Errors
An InputError with no line for any other extension or none, naming
the extension and the accepted ones. One naming the feature for an
extension whose format’s feature is off.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Forget for Format
impl Freeze for Format
impl Move for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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