pub enum Trouble {
NotInstalled,
DaemonStopped,
MachineStopped,
Refused(String),
NotRunnable(String),
}Expand description
Why the engine cannot be used, in a shape a screen can keep.
Unavailable carries a std::io::Error, so it can be neither cloned nor compared, while a
screen’s state and every message travelling through it have to be both. This keeps the
distinctions the person is told apart by and turns the rest into the words they read.
Variants§
NotInstalled
No binary anywhere QCode looked.
DaemonStopped
Docker is installed and its daemon is not answering.
MachineStopped
Podman is installed and the Linux virtual machine it needs is not running.
Refused(String)
The engine ran and refused, carrying what it said.
NotRunnable(String)
A binary was found and could not be started, carrying what the system said.
Implementations§
Source§impl Trouble
impl Trouble
Sourcepub fn of(unavailable: &Unavailable) -> Self
pub fn of(unavailable: &Unavailable) -> Self
What the engine layer found, kept for a screen.
Sourcepub fn brief(&self, kind: EngineKind) -> String
pub fn brief(&self, kind: EngineKind) -> String
The few words the repair strip has room for. The strip stands over every screen, so it
stays one row in a narrow terminal; the whole sentence is headline,
on the settings screen, where there is room to read it.
Sourcepub fn headline(&self, kind: EngineKind) -> String
pub fn headline(&self, kind: EngineKind) -> String
The one sentence that says what is wrong.
Sourcepub fn remedy(&self, kind: EngineKind) -> String
pub fn remedy(&self, kind: EngineKind) -> String
What the person has to do about it. Repair is named in each one, because repair is the only thing the strip offers and a sentence that stops without a next step reads as a dead end.
Trait Implementations§
impl Eq for Trouble
impl StructuralPartialEq for Trouble
Auto Trait Implementations§
impl Freeze for Trouble
impl RefUnwindSafe for Trouble
impl Send for Trouble
impl Sync for Trouble
impl Unpin for Trouble
impl UnsafeUnpin for Trouble
impl UnwindSafe for Trouble
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>. Box<dyn Any> can
then be further downcast into Box<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>. Rc<Any> 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> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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