Enum broot::conf::SerdeFormat
source · pub enum SerdeFormat {
Hjson,
Toml,
}
Expand description
Formats usable for reading configuration files
Variants§
Implementations§
source§impl SerdeFormat
impl SerdeFormat
pub fn key(self) -> &'static str
pub fn from_key(key: &str) -> Option<Self>
pub fn from_path(path: &Path) -> Result<Self, ConfError>
pub fn read_string<T>(path: &Path, s: &str) -> Result<T, ProgramError>where
T: DeserializeOwned,
pub fn read_file<T>(path: &Path) -> Result<T, ProgramError>where
T: DeserializeOwned,
Trait Implementations§
source§impl Clone for SerdeFormat
impl Clone for SerdeFormat
source§fn clone(&self) -> SerdeFormat
fn clone(&self) -> SerdeFormat
Returns a copy 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 moresource§impl Debug for SerdeFormat
impl Debug for SerdeFormat
source§impl Default for SerdeFormat
impl Default for SerdeFormat
source§fn default() -> SerdeFormat
fn default() -> SerdeFormat
Returns the “default value” for a type. Read more
source§impl PartialEq for SerdeFormat
impl PartialEq for SerdeFormat
source§fn eq(&self, other: &SerdeFormat) -> bool
fn eq(&self, other: &SerdeFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SerdeFormat
impl Eq for SerdeFormat
impl StructuralPartialEq for SerdeFormat
Auto Trait Implementations§
impl RefUnwindSafe for SerdeFormat
impl Send for SerdeFormat
impl Sync for SerdeFormat
impl Unpin for SerdeFormat
impl UnwindSafe for SerdeFormat
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.