pub struct LibCfg {
pub scheme_sync_default: String,
pub scheme: Vec<Scheme>,
pub tmpl_html: TmplHtml,
}Expand description
Configuration data, deserialized from the configuration file.
Fields§
§scheme_sync_default: StringThe fallback scheme for the sync_filename template choice, if the
scheme header variable is empty or is not defined.
scheme: Vec<Scheme>Configuration of Scheme.
tmpl_html: TmplHtmlConfiguration of HTML templates.
Implementations§
Source§impl LibCfg
impl LibCfg
Sourcepub fn scheme_idx(&self, name: &str) -> Result<usize, LibCfgError>
pub fn scheme_idx(&self, name: &str) -> Result<usize, LibCfgError>
Returns the index of a named scheme. If no scheme with that name can be
be found, return LibCfgError::SchemeNotFound.
Source§impl LibCfg
impl LibCfg
Sourcepub fn assert_validity(&self) -> Result<(), LibCfgError>
pub fn assert_validity(&self) -> Result<(), LibCfgError>
Perform some semantic consistency checks.
sort_tag.extra_separatormust NOT be insort_tag.extra_chars.sort_tag.extra_separatormust NOT be in0..9.sort_tag.extra_separatormust NOT be ina..z.sort_tag.extra_separatormust NOT be insort_tag.extra_chars.sort_tag.extra_separatormust NOTFILENAME_DOTFILE_MARKER.copy_counter.extra_separatormust be one ofsanitize_filename_reader_friendly::TRIM_LINE_CHARS.- All characters of
sort_tag.separatormust be insort_tag.extra_chars. sort_tag.separatormust start with NOTFILENAME_DOTFILE_MARKER.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LibCfg
impl<'de> Deserialize<'de> for LibCfg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LibCfg
impl RefUnwindSafe for LibCfg
impl Send for LibCfg
impl Sync for LibCfg
impl Unpin for LibCfg
impl UnwindSafe for LibCfg
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
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>
Converts
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>
Converts
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