brane_let::errors

Enum LetError

Source
pub enum LetError {
Show 39 variants JuiceFSLaunchError { command: String, err: Error, }, JuiceFSError { command: String, code: i32, stdout: String, stderr: String, }, RedirectorError { address: String, err: String, }, ArgumentsBase64Error { err: DecodeError, }, ArgumentsUTF8Error { err: FromUtf8Error, }, ArgumentsJSONError { err: Error, }, LocalContainerInfoError { path: PathBuf, err: LocalContainerInfoError, }, PackageInfoError { err: Error, }, MissingFunctionsProperty { path: PathBuf, }, UnknownFunction { function: String, package: String, kind: PackageKind, }, MissingInputArgument { function: String, package: String, kind: PackageKind, name: String, }, IncompatibleTypes { function: String, package: String, kind: PackageKind, name: String, expected: DataType, got: DataType, }, WorkdirInitLaunchError { command: String, err: Error, }, WorkdirInitError { command: String, code: i32, stdout: String, stderr: String, }, EntrypointPathError { path: PathBuf, err: Error, }, DuplicateArgument { name: String, }, DuplicateArrayArgument { array: String, elem: usize, name: String, }, DuplicateStructArgument { sname: String, field: String, name: String, }, UnsupportedType { argument: String, elem_type: DataType, }, UnsupportedNestedArray { elem: usize, }, UnsupportedArrayElement { elem: usize, elem_type: String, }, UnsupportedStructArray { name: String, field: String, }, UnsupportedNestedStruct { name: String, field: String, }, UnsupportedStructField { name: String, field: String, elem_type: String, }, IllegalNestedURL { name: String, field: String, }, PackageLaunchError { command: String, err: Error, }, IllegalOasDocument { path: PathBuf, err: Error, }, PackageRunError { err: Error, }, ClosedStdout, ClosedStderr, StdoutReadError { err: Error, }, StderrReadError { err: Error, }, DecodeError { stdout: String, err: Error, }, OasDecodeError { stdout: String, err: Error, }, UnsupportedMultipleOutputs { n: usize, }, SerializeError { argument: String, data_type: DataType, err: Error, }, ArraySerializeError { argument: String, err: Error, }, ClassSerializeError { argument: String, class: String, err: Error, }, ResultJSONError { value: String, err: Error, },
}
Expand description

Generic, top-level errors for the brane-let application.

Variants§

§

JuiceFSLaunchError

Could not launch the JuiceFS executable

Fields

§command: String
§err: Error
§

JuiceFSError

The JuiceFS executable didn’t complete successfully

Fields

§command: String
§code: i32
§stdout: String
§stderr: String
§

RedirectorError

Could not start the proxy redirector in the background

Fields

§address: String
§

ArgumentsBase64Error

Could not decode input arguments with Base64

Fields

§

ArgumentsUTF8Error

Could not decode input arguments as UTF-8

Fields

§

ArgumentsJSONError

Could not decode input arguments with JSON

Fields

§err: Error
§

LocalContainerInfoError

Could not load a ContainerInfo file.

§

PackageInfoError

Could not load a PackageInfo file.

Fields

§err: Error
§

MissingFunctionsProperty

Missing the ‘functions’ property in the package info YAML

Fields

§path: PathBuf
§

UnknownFunction

The requested function is not part of the package that this brane-let is responsible for

Fields

§function: String
§package: String
§

MissingInputArgument

We’re missing a required parameter in the function

Fields

§function: String
§package: String
§name: String
§

IncompatibleTypes

An argument has an incompatible type

Fields

§function: String
§package: String
§name: String
§expected: DataType
§

WorkdirInitLaunchError

Could not start the init.sh workdirectory preparation script

Fields

§command: String
§err: Error
§

WorkdirInitError

The init.sh workdirectory preparation script returned a non-zero exit code

Fields

§command: String
§code: i32
§stdout: String
§stderr: String
§

EntrypointPathError

Could not canonicalize the entrypoint file’s path

Fields

§path: PathBuf
§err: Error
§

DuplicateArgument

We encountered two arguments with indistinguishable names

Fields

§name: String
§

DuplicateArrayArgument

We encountered an array element with indistringuishable name from another environment variable

Fields

§array: String
§elem: usize
§name: String
§

DuplicateStructArgument

We encountered a struct field with indistringuishable name from another environment variable

Fields

§sname: String
§field: String
§name: String
§

UnsupportedType

The user tried to pass an unsupported type to a function

Fields

§argument: String
§elem_type: DataType
§

UnsupportedNestedArray

The user tried to give us a nested array, but that’s unsupported for now.

Fields

§elem: usize
§

UnsupportedArrayElement

The user tried to give us an array with (for now) unsupported element types.

Fields

§elem: usize
§elem_type: String
§

UnsupportedStructArray

The user tried to give us a struct with a nested array.

Fields

§name: String
§field: String
§

UnsupportedNestedStruct

The user tried to pass a nested Directory or File argument without ‘url’ property.

Fields

§name: String
§field: String
§

UnsupportedStructField

The user tried to pass a Struct with a general unsupported type.

Fields

§name: String
§field: String
§elem_type: String
§

IllegalNestedURL

The user tried to pass a nested Directory or File argument without ‘url’ property.

Fields

§name: String
§field: String
§

PackageLaunchError

We got an error launching the package

Fields

§command: String
§err: Error
§

IllegalOasDocument

The given Open API Standard file does not parse as OAS

Fields

§path: PathBuf
§err: Error
§

PackageRunError

Somehow, we got an error while waiting for the subprocess

Fields

§err: Error
§

ClosedStdout

The subprocess’ stdout wasn’t opened successfully

§

ClosedStderr

The subprocess’ stderr wasn’t opened successfully

§

StdoutReadError

Could not open stdout

Fields

§err: Error
§

StderrReadError

Could not open stderr

Fields

§err: Error
§

DecodeError

Something went wrong while decoding the package output as YAML

Fields

§stdout: String
§err: Error
§

OasDecodeError

Failed to parse the output of an OAS package (which uses JSON instead of YAML cuz OAS)

Fields

§stdout: String
§err: Error
§

UnsupportedMultipleOutputs

Encountered more than one output from the function

Fields

§

SerializeError

Failed to encode the input JSON

Fields

§argument: String
§data_type: DataType
§err: Error
§

ArraySerializeError

Could not encode the given array to JSON.

Fields

§argument: String
§err: Error
§

ClassSerializeError

Could not encode the given class to JSON.

Fields

§argument: String
§class: String
§err: Error
§

ResultJSONError

Could not write the resulting value to JSON

Fields

§value: String
§err: Error

Trait Implementations§

Source§

impl Debug for LetError

Source§

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

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

impl Display for LetError

Source§

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

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

impl Error for LetError

1.30.0 · 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

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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
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, 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,

Source§

impl<T> MaybeSendSync for T