pub struct HasSettings;
Expand description
See description in the ContextState
implementor list.
Trait Implementations§
Source§impl Clone for HasSettings
impl Clone for HasSettings
Source§fn clone(&self) -> HasSettings
fn clone(&self) -> HasSettings
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 HasSettings
impl Debug for HasSettings
Source§impl PartialEq for HasSettings
impl PartialEq for HasSettings
impl ContextState for HasSettings
The Context
has the following initialized and valid fields: path
,
dir_path
, root_path
and ct
. The context ct
contains data from
insert_config_vars()
and insert_settings()
.
Context<HasSettings>
has the following variables set:
TMPL_VAR_CURRENT_SCHEME
TMPL_VAR_DIR_PATH
in sync withself.dir_path
andTMPL_VAR_DOC_FILE_DATE
in sync withself.doc_file_date
(only if available).TMPL_VAR_EXTENSION_DEFAULT
TMPL_VAR_LANG
TMPL_VAR_PATH
in sync withself.path
,TMPL_VAR_ROOT_PATH
in sync withself.root_path
.TMPL_VAR_SCHEME_SYNC_DEFAULT
.TMPL_VAR_USERNAME
The variables are inserted by the following methods: self.from()
,
self.insert_config_vars()
and self.insert_settings()
.
Once this state is achieved, Context
is constant and write protected until
the next state transition.
State order | |
---|---|
Previous state | Invalid |
Current state | HasSettings |
Next state | ReadyForFilenameTemplate or HasExistingContent |
impl StructuralPartialEq for HasSettings
Auto Trait Implementations§
impl Freeze for HasSettings
impl RefUnwindSafe for HasSettings
impl Send for HasSettings
impl Sync for HasSettings
impl Unpin for HasSettings
impl UnwindSafe for HasSettings
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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