pub enum CliEngine {
MemRepo(Engine),
Filesystem(Engine),
}Expand description
Engine instance + the workspace flavour it serves. Subcommands
match on the variant to call the right engine API; the read-side
store accessor (engine.store()) lives on both flavours so simple
read commands can share most of their bodies.
The MemRepo variant is only present under the mem-repo
feature. In the lean build (--no-default-features) the enum
collapses to a single Filesystem arm — every subcommand’s
dispatch elides the missing arm via cfg.
Variants§
MemRepo(Engine)
Filesystem(Engine)
Filesystem-mem flavour, served by the unified memstead_base::Engine.
Implementations§
Source§impl CliEngine
impl CliEngine
Sourcepub fn base(&self) -> &BaseEngine
pub fn base(&self) -> &BaseEngine
The unified base engine behind whichever flavour booted. Both
variants wrap BaseEngine; commands that treat the flavours
identically destructure here instead of carrying a per-site
match (which, in the lean build’s single-variant enum, is the
infallible_destructuring_match shape the isolated lean clippy
leg flags).
Sourcepub fn base_mut(&mut self) -> &mut BaseEngine
pub fn base_mut(&mut self) -> &mut BaseEngine
Mutable twin of Self::base.
Sourcepub fn into_base(self) -> BaseEngine
pub fn into_base(self) -> BaseEngine
Owning twin of Self::base.
Auto Trait Implementations§
impl !Freeze for CliEngine
impl !RefUnwindSafe for CliEngine
impl !Sync for CliEngine
impl !UnwindSafe for CliEngine
impl Send for CliEngine
impl Unpin for CliEngine
impl UnsafeUnpin for CliEngine
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
impl<T> Fruit for T
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> 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> ⓘ
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> ⓘ
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