#[non_exhaustive]pub enum CliError {
Show 35 variants
Io {
path: String,
source: Error,
},
Manifest(ManifestError),
Validation(ValidationErrors),
Expand(ExpandError),
Graph(GraphBuildError),
DoraMigrate(DoraMigrateError),
Ros2Migrate(Ros2MigrateError),
Daemon(DaemonError),
Coordinator(CoordinatorError),
Store(Error),
Transport(TransportError),
Runtime(RuntimeError),
Node(NodeError),
Recording(RecordingError),
Rosbag(RosbagError),
Ros2(String),
Tui(TuiError),
CoordinatorSource(CoordinatorSourceError),
Replay(ReplaySourceError),
Refused {
request: &'static str,
message: String,
},
UnexpectedReply {
request: &'static str,
reply: &'static str,
},
NoToken {
env: &'static str,
file: &'static str,
},
BadToken {
path: String,
source: AuthTokenError,
},
BadAddress {
input: String,
reason: String,
},
BadArgument {
flag: &'static str,
value: String,
reason: String,
},
Cluster {
action: &'static str,
process: &'static str,
reason: String,
},
NoCluster {
detail: String,
},
UnknownDataflow {
reference: String,
reason: String,
},
AlreadyRunning {
process: &'static str,
pid: u32,
address: String,
},
NotImplementedYet {
verb: &'static str,
wave: &'static str,
},
FeatureNotEnabled {
feature: &'static str,
wave: &'static str,
},
ProofUnavailable,
DeterministicNeedsRecording,
UnsafePath {
path: String,
},
TargetExists {
path: String,
},
}Expand description
Everything that can abort an astrs command outright.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
A file could not be read or written.
Manifest(ManifestError)
The manifest did not even parse as YAML.
Validation(ValidationErrors)
The manifest parsed but failed structural validation.
Expand(ExpandError)
Module expansion failed.
Graph(GraphBuildError)
The (validated, expanded) manifest could not become a dataflow graph.
DoraMigrate(DoraMigrateError)
migrate from-dora failed.
Ros2Migrate(Ros2MigrateError)
migrate from-ros2 failed.
Daemon(DaemonError)
The embedded daemon (astrs run) or the hidden astrs daemon
process failed.
Coordinator(CoordinatorError)
The hidden astrs coordinator process failed.
Store(Error)
The coordinator’s parameter/state store could not be opened.
Transport(TransportError)
A connection to the coordinator failed.
Runtime(RuntimeError)
The hidden astrs runtime process failed.
Node(NodeError)
A node could not connect to its daemon (astrs runtime).
Recording(RecordingError)
An .arec recording could not be read (astrs bag info, astrs replay).
Rosbag(RosbagError)
A rosbag2 .db3/.mcap file could not be read or written, or a
requested astrs bag convert direction is not one this build
bridges (astrs bag info, astrs bag convert).
Ros2(String)
The astrs ros2 probe could not join the DDS domain, or its report
could not be rendered (blueprint §17, §10.2).
A finding — an empty domain, a refused multicast join — is never
this: ros2 doctor reports those as checks. This is the case where
there is nothing to report on because the participant itself would
not start.
Tui(TuiError)
astrs top could not enter or run the terminal (blueprint §17).
CoordinatorSource(CoordinatorSourceError)
astrs top could not connect to the coordinator.
Replay(ReplaySourceError)
astrs top --replay could not open its recording.
Refused
The coordinator answered a request with an error reply.
Fields
UnexpectedReply
The coordinator answered with a reply this verb cannot use — a protocol violation rather than a refusal.
Fields
NoToken
No cluster token could be found, and the verb needs one (§16).
Fields
BadToken
A token was found but is not a 64-hex value (§16).
BadAddress
A host[:port] (or bare port) argument could not be resolved.
BadArgument
A flag’s value was not of the shape the flag needs.
Fields
Cluster
A cluster process could not be started or stopped.
Fields
NoCluster
A verb that needs a live cluster found none.
UnknownDataflow
A dataflow reference named nothing the coordinator knows (or named more than one thing).
AlreadyRunning
A cluster process is already running here, and the verb refuses to start a second one over it.
Fields
NotImplementedYet
A verb (or a flag on one) whose implementation belongs to a wave this build predates.
Fields
verb: &'static strThe verb (or group subcommand) that was invoked, e.g.
"node add" or "ros2 doctor".
wave: &'static strThe wave this verb is scheduled for, e.g.
crate::command::stub::WAVE_BAG.
FeatureNotEnabled
An optional feature exists as a stub but is gated behind a Cargo feature this build does not enable.
Fields
astrs validate --prove ran on a build without the verify
feature, so no solver was available to discharge the obligations.
Distinct from Self::FeatureNotEnabled, which says a feature has
not shipped yet: verify has shipped, and the obligations were
still encoded and printed — only the verdicts are missing.
DeterministicNeedsRecording
run --deterministic was given without --from-recording.
Refused before anything is built or spawned (blueprint §14) — a user who asks for a deterministic run never gets a non-deterministic one wearing the label, because there is nothing to fix the timer wheel to without a recording.
UnsafePath
new refused to write outside its target directory.
TargetExists
new was asked to write into a directory that already has
conflicting files in it.
Implementations§
Source§impl CliError
impl CliError
Sourcepub fn io(path: impl AsRef<Path>, source: Error) -> Self
pub fn io(path: impl AsRef<Path>, source: Error) -> Self
Build a CliError::Io from a path and the I/O failure accessing
it.
Sourcepub fn exit_code(&self) -> i32
pub fn exit_code(&self) -> i32
The process exit code this error should produce.
Self::NotImplementedYet, Self::FeatureNotEnabled and
Self::ProofUnavailable use EXIT_UNAVAILABLE so scripts can
tell “this build cannot do that” apart from an ordinary failure;
everything else is a plain 1 (EXIT_FAILURE), matching every
other Unix CLI tool’s default.
Trait Implementations§
Source§impl Error for CliError
impl Error for CliError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CoordinatorError> for CliError
impl From<CoordinatorError> for CliError
Source§fn from(source: CoordinatorError) -> Self
fn from(source: CoordinatorError) -> Self
Source§impl From<CoordinatorSourceError> for CliError
impl From<CoordinatorSourceError> for CliError
Source§fn from(source: CoordinatorSourceError) -> Self
fn from(source: CoordinatorSourceError) -> Self
Source§impl From<DaemonError> for CliError
impl From<DaemonError> for CliError
Source§fn from(source: DaemonError) -> Self
fn from(source: DaemonError) -> Self
Source§impl From<DoraMigrateError> for CliError
impl From<DoraMigrateError> for CliError
Source§fn from(source: DoraMigrateError) -> Self
fn from(source: DoraMigrateError) -> Self
Source§impl From<ExpandError> for CliError
impl From<ExpandError> for CliError
Source§fn from(source: ExpandError) -> Self
fn from(source: ExpandError) -> Self
Source§impl From<GraphBuildError> for CliError
impl From<GraphBuildError> for CliError
Source§fn from(source: GraphBuildError) -> Self
fn from(source: GraphBuildError) -> Self
Source§impl From<ManifestError> for CliError
impl From<ManifestError> for CliError
Source§fn from(source: ManifestError) -> Self
fn from(source: ManifestError) -> Self
Source§impl From<RecordingError> for CliError
impl From<RecordingError> for CliError
Source§fn from(source: RecordingError) -> Self
fn from(source: RecordingError) -> Self
Source§impl From<ReplaySourceError> for CliError
impl From<ReplaySourceError> for CliError
Source§fn from(source: ReplaySourceError) -> Self
fn from(source: ReplaySourceError) -> Self
Source§impl From<Ros2MigrateError> for CliError
impl From<Ros2MigrateError> for CliError
Source§fn from(source: Ros2MigrateError) -> Self
fn from(source: Ros2MigrateError) -> Self
Source§impl From<RosbagError> for CliError
impl From<RosbagError> for CliError
Source§fn from(source: RosbagError) -> Self
fn from(source: RosbagError) -> Self
Source§impl From<RuntimeError> for CliError
impl From<RuntimeError> for CliError
Source§fn from(source: RuntimeError) -> Self
fn from(source: RuntimeError) -> Self
Source§impl From<TransportError> for CliError
impl From<TransportError> for CliError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Source§impl From<ValidationErrors> for CliError
impl From<ValidationErrors> for CliError
Source§fn from(source: ValidationErrors) -> Self
fn from(source: ValidationErrors) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CliError
impl !UnwindSafe for CliError
impl Freeze for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnsafeUnpin for CliError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreimpl<T> MaybeDebug for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more