pub struct LayoutConfig { /* private fields */ }Expand description
The parsed config: the version, where it came from, how authentic it is,
and every key=value in it, verbatim.
Implementations§
Source§impl LayoutConfig
impl LayoutConfig
pub fn path(&self) -> &Path
pub fn version(&self) -> u32
pub fn authenticity(&self) -> Authenticity
Sourcepub fn get(&self, key: &str) -> Option<&str>
pub fn get(&self, key: &str) -> Option<&str>
One value, exactly as written. None is “the config does not carry
this key” and is never a zero, an empty string or a guess.
Sourcepub fn u64(&self, key: &str) -> Option<u64>
pub fn u64(&self, key: &str) -> Option<u64>
One value as a number, or None — including for a value that does not
parse, because a number that could not be read must not be reported as
one.
Sourcepub fn yes_no(&self, key: &str) -> Option<bool>
pub fn yes_no(&self, key: &str) -> Option<bool>
A yes/no value. Anything else, or absent, is None.
Sourcepub fn fields(&self) -> impl Iterator<Item = (&str, &str)>
pub fn fields(&self) -> impl Iterator<Item = (&str, &str)>
Every field, in key order — what the admin view renders.
Sourcepub fn dir_path(&self, name: &str) -> Option<PathBuf>
pub fn dir_path(&self, name: &str) -> Option<PathBuf>
dir.<name>.path — the parameter gunnar obeys.
Sourcepub fn dir_requires_off_stripe(&self, name: &str) -> Option<bool>
pub fn dir_requires_off_stripe(&self, name: &str) -> Option<bool>
dir.<name>.off_stripe_required.
Sourcepub fn dir_off_stripe_satisfied(&self, name: &str) -> Option<bool>
pub fn dir_off_stripe_satisfied(&self, name: &str) -> Option<bool>
dir.<name>.off_stripe_satisfied — the installer’s verdict, not
gunnar’s re-derivation of it.
Trait Implementations§
Source§impl Clone for LayoutConfig
impl Clone for LayoutConfig
Auto Trait Implementations§
impl Freeze for LayoutConfig
impl RefUnwindSafe for LayoutConfig
impl Send for LayoutConfig
impl Sync for LayoutConfig
impl Unpin for LayoutConfig
impl UnsafeUnpin for LayoutConfig
impl UnwindSafe for LayoutConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request