pub enum CharterState {
Absent,
Empty,
Lines(usize),
Broken(String),
Unknown,
}Expand description
What ~/.mecha/charter.toml is doing — the five answers a reader has to
tell apart.
Absent and Empty are not folded together, for the reason
crate::doctor’s own charter check keeps them apart: a file that parses
cleanly to zero lines is an authoring mistake by construction (nobody
writes an empty charter on purpose), where no file at all is the ordinary
state of a fresh install and is the one this module exists to offer
something about.
Variants§
Absent
No file. A new install, and the case worth prompting.
Empty
A file with no [[line]] entries — a template nobody filled in, or an
edit that removed the last line.
Lines(usize)
n lines, loading cleanly.
Broken(String)
It exists and does not load: every run is starting un-chartered.
Unknown
Could not be established from here.
Trait Implementations§
Source§impl Clone for CharterState
impl Clone for CharterState
Source§fn clone(&self) -> CharterState
fn clone(&self) -> CharterState
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 CharterState
impl Debug for CharterState
Source§impl Default for CharterState
impl Default for CharterState
Source§fn default() -> CharterState
fn default() -> CharterState
Returns the “default value” for a type. Read more
impl Eq for CharterState
Source§impl PartialEq for CharterState
impl PartialEq for CharterState
impl StructuralPartialEq for CharterState
Auto Trait Implementations§
impl Freeze for CharterState
impl RefUnwindSafe for CharterState
impl Send for CharterState
impl Sync for CharterState
impl Unpin for CharterState
impl UnsafeUnpin for CharterState
impl UnwindSafe for CharterState
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