Enum MicrosandboxError

Source
pub enum MicrosandboxError {
Show 68 variants Io(Error), Custom(AnyError), OciDistribution(Error), HttpRequest(Error), HttpMiddleware(Error), Database(Error), ManifestNotFound, JoinError(JoinError), UnsupportedImageHashAlgorithm(String), ImageLayerDownloadFailed(String), InvalidPathPair(String), InvalidPortPair(String), InvalidEnvPair(String), InvalidMicroVMConfig(InvalidMicroVMConfigError), InvalidRLimitFormat(String), InvalidRLimitValue(String), InvalidRLimitResource(String), SerdeJson(Error), SerdeYaml(Error), Toml(Error), ConfigValidation(String), ConfigValidationErrors(Vec<String>), ServiceBelongsToNoGroup(String), ServiceBelongsToWrongGroup(String, String), FailedToGetShutdownEventFd(i32), FailedToShutdown(String), FailedToStartVM(i32), PathNotFound(String), RootFsPathNotFound(String), SupervisorBinaryNotFound(String), StartVmFailed(i32), ProcessWaitError(String), SupervisorError(String), ProcessKillError(String), ConfigMerge(String), NoAvailableIPs, WalkDir(Error), StripPrefix(StripPrefixError), NixError(Error), SystemTime(SystemTimeError), LayerExtraction(String), LayerHandling { source: Error, layer: String, }, ConfigNotFound(String), RootfsNotFound(String), ImageReferenceError(String), ServiceStillRunning(String), InvalidArgument(String), PathValidation(String), MicrosandboxConfigNotFound(String), ConfigParseError(String), LogNotFound(String), PagerError(String), MicrosandboxUtilsError(MicrosandboxUtilsError), MigrationError(MigrateError), DockerRegistryResponseError(DockerRegistryResponseError), InvalidReferenceSelectorFormat(String), InvalidReferenceSelectorDigest(String), NotImplemented(String), SandboxNotFoundInConfig(String, PathBuf), InvalidLogLevel(u8), EmptyPathSegment, InvalidPathComponent(String), ScriptNotFoundInSandbox(String, String), SandboxServerError(String), InvalidNetworkScope(String), MissingStartOrExecOrShell, CommandExists(String), CommandNotFound(String),
}
Expand description

An error that occurred during a file system operation.

Variants§

§

Io(Error)

An I/O error.

§

Custom(AnyError)

An error that can represent any error.

§

OciDistribution(Error)

An error that occurred during an OCI distribution operation.

§

HttpRequest(Error)

An error that occurred during an HTTP request.

§

HttpMiddleware(Error)

An error that occurred during an HTTP middleware operation.

§

Database(Error)

An error that occurred during a database operation.

§

ManifestNotFound

An error that occurred when a manifest was not found.

§

JoinError(JoinError)

An error that occurred when a join handle returned an error.

§

UnsupportedImageHashAlgorithm(String)

An error that occurred when an unsupported image hash algorithm was used.

§

ImageLayerDownloadFailed(String)

An error that occurred when an image layer download failed.

§

InvalidPathPair(String)

An error that occurred when an invalid path pair was used.

§

InvalidPortPair(String)

An error that occurred when an invalid port pair was used.

§

InvalidEnvPair(String)

An error that occurred when an invalid environment variable pair was used.

§

InvalidMicroVMConfig(InvalidMicroVMConfigError)

An error that occurred when an invalid MicroVm configuration was used.

§

InvalidRLimitFormat(String)

An error that occurred when an invalid resource limit format was used.

§

InvalidRLimitValue(String)

An error that occurred when an invalid resource limit value was used.

§

InvalidRLimitResource(String)

An error that occurred when an invalid resource limit resource was used.

§

SerdeJson(Error)

An error that occurred when a Serde JSON error occurred.

§

SerdeYaml(Error)

An error that occurred when a Serde YAML error occurred.

§

Toml(Error)

An error that occurred when a TOML error occurred.

§

ConfigValidation(String)

An error that occurred when a configuration validation error occurred.

§

ConfigValidationErrors(Vec<String>)

An error that occurred when a configuration validation error occurred.

§

ServiceBelongsToNoGroup(String)

An error that occurs when trying to access group resources for a service that has no group

§

ServiceBelongsToWrongGroup(String, String)

An error that occurs when trying to access group resources for a service that belongs to a different group.

§

FailedToGetShutdownEventFd(i32)

An error that occurred when failed to get shutdown eventfd

§

FailedToShutdown(String)

An error that occurred when failed to write to shutdown eventfd

§

FailedToStartVM(i32)

An error that occurred when failed to start VM

§

PathNotFound(String)

An error that occurred when a path does not exist

§

RootFsPathNotFound(String)

An error that occurred when a rootfs path does not exist

§

SupervisorBinaryNotFound(String)

An error that occurred when the supervisor binary was not found

§

StartVmFailed(i32)

An error that occurred when failed to start VM

§

ProcessWaitError(String)

An error that occurred when waiting for a process to exit

§

SupervisorError(String)

An error that occurred running the supervisor.

§

ProcessKillError(String)

An error that occurred when failed to kill process

§

ConfigMerge(String)

An error that occurred when merging configurations

§

NoAvailableIPs

An error that occurred when no more IP addresses are available for assignment

§

WalkDir(Error)

An error that occurred during a walkdir operation

§

StripPrefix(StripPrefixError)

An error that occurred when stripping a path prefix

§

NixError(Error)

An error that occurred during a nix operation

§

SystemTime(SystemTimeError)

An error that occurred when converting system time

§

LayerExtraction(String)

An error that occurred during layer extraction. This typically happens when the join handle for the blocking task fails.

§

LayerHandling

An error that occurred during layer handling operations like opening files or unpacking archives. Contains both the underlying IO error and the path to the layer being processed.

Fields

§source: Error

The underlying IO error that occurred

§layer: String

The path to the layer being processed when the error occurred

§

ConfigNotFound(String)

An error that occurred when a configuration file was not found

§

RootfsNotFound(String)

Error when a service’s rootfs directory is not found

§

ImageReferenceError(String)

An error that occurred when parsing an image reference

§

ServiceStillRunning(String)

An error that occurred when trying to remove running services

§

InvalidArgument(String)

An error that occurred when invalid command line arguments were provided

§

PathValidation(String)

An error that occurred when validating paths

§

MicrosandboxConfigNotFound(String)

An error that occurred when the microsandbox config file was not found

§

ConfigParseError(String)

An error that occurred when failed to parse configuration file

§

LogNotFound(String)

An error that occurred when a log file was not found

§

PagerError(String)

An error that occurred when a pager error occurred

§

MicrosandboxUtilsError(MicrosandboxUtilsError)

An error from microsandbox-utils

§

MigrationError(MigrateError)

An error that occurred when a migration error occurred

§

DockerRegistryResponseError(DockerRegistryResponseError)

An error that occurred when a Docker registry response error occurred

§

InvalidReferenceSelectorFormat(String)

An error that occurred when parsing an image reference selector with an invalid format

§

InvalidReferenceSelectorDigest(String)

An error that occurred when parsing an invalid digest in an image reference selector

§

NotImplemented(String)

An error that occurred when a feature is not yet implemented

§

SandboxNotFoundInConfig(String, PathBuf)

An error that occurred when a sandbox was not found in the configuration

§

InvalidLogLevel(u8)

An error that occurs when an invalid log level is used.

§

EmptyPathSegment

Empty path segment

§

InvalidPathComponent(String)

Invalid path component (e.g. “.”, “..”, “/”)

§

ScriptNotFoundInSandbox(String, String)

Script not found in sandbox configuration

§

SandboxServerError(String)

An error that occurred running the sandbox server.

§

InvalidNetworkScope(String)

An error that occurred when an invalid network scope was used.

§

MissingStartOrExecOrShell

An error that occurred when a start script or exec command or shell is missing.

§

CommandExists(String)

An error that occurred when trying to install a script with the same name as an existing command.

§

CommandNotFound(String)

An error that occurred when a command was not found.

Implementations§

Source§

impl MicrosandboxError

Source

pub fn custom(error: impl Into<Error>) -> MicrosandboxError

Creates a new Err result.

Trait Implementations§

Source§

impl Debug for MicrosandboxError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MicrosandboxError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for MicrosandboxError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AnyError> for MicrosandboxError

Source§

fn from(source: AnyError) -> Self

Converts to this type from the input type.
Source§

impl From<DockerRegistryResponseError> for MicrosandboxError

Source§

fn from(source: DockerRegistryResponseError) -> Self

Converts to this type from the input type.
Source§

impl From<Errno> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for MicrosandboxError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<JoinError> for MicrosandboxError

Source§

fn from(source: JoinError) -> Self

Converts to this type from the input type.
Source§

impl From<MicrosandboxUtilsError> for MicrosandboxError

Source§

fn from(source: MicrosandboxUtilsError) -> Self

Converts to this type from the input type.
Source§

impl From<MigrateError> for MicrosandboxError

Source§

fn from(source: MigrateError) -> Self

Converts to this type from the input type.
Source§

impl From<StripPrefixError> for MicrosandboxError

Source§

fn from(source: StripPrefixError) -> Self

Converts to this type from the input type.
Source§

impl From<SystemTimeError> for MicrosandboxError

Source§

fn from(source: SystemTimeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,