#[non_exhaustive]pub enum ForkError {
Transport(String),
RpcError(String),
RpcNoResult,
Xdr(String),
Base64(DecodeError),
Json(Error),
Cache {
path: PathBuf,
message: String,
},
Host(String),
Workspace(String),
}Expand description
The crate’s unified error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport(String)
A JSON-RPC HTTP request failed (network error, timeout, or non-success status after all retries).
RpcError(String)
The RPC endpoint returned a JSON-RPC level error object.
RpcNoResult
The RPC response was well-formed JSON but didn’t contain a result
field (protocol violation on the server side).
Xdr(String)
An XDR payload failed to encode or decode. Usually indicates an
incompatibility between the pinned stellar-xdr version and the
protocol version the RPC server is serving.
Base64(DecodeError)
A base64 payload from the RPC failed to decode.
Json(Error)
JSON (de)serialization error.
Cache
Reading or writing the on-disk cache snapshot failed.
Fields
message: StringThe underlying I/O-or-serialization error, stringified because
soroban_ledger_snapshot returns a non-std::error::Error
type for its file operations. Not named source so thiserror
doesn’t confuse it with the error-chain source attribute.
Host(String)
An out-of-band operation on the underlying soroban-env-host failed.
Currently only emitted by super::ForkConfig::tracing when
switching the host’s diagnostic level. Per-call contract failures
surface as panics from Env::invoke_contract and never travel
through this enum — that’s an SDK boundary we don’t reach across.
Workspace(String)
Building or locating a workspace member’s contract WASM failed.
Emitted by super::workspace_wasm when cargo metadata /
cargo build fails, when the named crate isn’t a workspace
member, or when the expected .wasm artifact is missing or
unreadable after a successful build. The message carries the
underlying cause verbatim — compilation errors from cargo
surface as-is so the failing test reports them straight.
Trait Implementations§
Source§impl Error for ForkError
impl Error for ForkError
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<DecodeError> for ForkError
impl From<DecodeError> for ForkError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Auto Trait Implementations§
impl Freeze for ForkError
impl !RefUnwindSafe for ForkError
impl Send for ForkError
impl Sync for ForkError
impl Unpin for ForkError
impl UnsafeUnpin for ForkError
impl !UnwindSafe for ForkError
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, U, V, W, E, C> Compare<(T, U, V, W)> for C
impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W), b: &(T, U, V, W), ) -> Result<Ordering, <C as Compare<(T, U, V, W)>>::Error>
Source§impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W, X), b: &(T, U, V, W, X), ) -> Result<Ordering, <C as Compare<(T, U, V, W, X)>>::Error>
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<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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.