Enum brane_ctl::errors::GenerateError
source · pub enum GenerateError {
Show 35 variants
DirNotFound {
path: PathBuf,
},
DirNotADir {
path: PathBuf,
},
DirCreateError {
path: PathBuf,
err: Error,
},
CanonicalizeError {
path: PathBuf,
err: Error,
},
FileNotAFile {
path: PathBuf,
},
FileWriteError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileSerializeError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileDeserializeError {
what: &'static str,
path: PathBuf,
err: Error,
},
ExtractError {
what: &'static str,
path: PathBuf,
err: Error,
},
ExecutableError {
err: Box<Error>,
},
FileMetadataError {
what: &'static str,
path: PathBuf,
err: Error,
},
FilePermissionsError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileChecksumError {
path: PathBuf,
expected: String,
got: String,
},
ConfigSerializeError {
err: Error,
},
SpawnError {
cmd: Command,
err: Error,
},
SpawnFailure {
cmd: Command,
status: ExitStatus,
err: String,
},
CaCertNotFound {
path: PathBuf,
},
CaCertNotAFile {
path: PathBuf,
},
CaKeyNotFound {
path: PathBuf,
},
CaKeyNotAFile {
path: PathBuf,
},
FileOpenError {
what: &'static str,
path: PathBuf,
err: Error,
},
CopyError {
source: PathBuf,
target: PathBuf,
err: Error,
},
FileCreateError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileHeaderWriteError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileBodyWriteError {
what: &'static str,
path: PathBuf,
err: YamlError,
},
UnknownLocation {
loc: String,
},
TempDirError {
err: Error,
},
RepoDownloadError {
repo: String,
target: PathBuf,
err: Error,
},
RepoUnpackError {
tar: PathBuf,
target: PathBuf,
err: Error,
},
RepoRecurseError {
target: PathBuf,
err: Error,
},
MigrationsRetrieve {
path: PathBuf,
err: MigrationError,
},
DatabaseConnect {
path: PathBuf,
err: ConnectionError,
},
MigrationsApply {
path: PathBuf,
err: Box<dyn Error + 'static>,
},
UnsupportedKeyAlgorithm {
key_alg: KeyAlgorithm,
},
TokenGenerate {
err: Error,
},
}
Expand description
Errors that relate to generating files.
Note: we box brane_shr::fs::Error
to avoid the error enum growing too large (see clippy::result_large_err
).
Variants§
DirNotFound
Directory not found.
DirNotADir
Directory found but not as a directory
DirCreateError
Failed to create a directory.
CanonicalizeError
Failed to canonicalize the given path.
FileNotAFile
The given file is not a file.
FileWriteError
Failed to write to the output file.
FileSerializeError
Failed to serialize & write to the output file.
FileDeserializeError
Failed to deserialize & read an input file.
ExtractError
Failed to extract a file.
ExecutableError
Failed to set a file to executable.
FileMetadataError
Failed to get a file handle’s metadata.
FilePermissionsError
Failed to set the permissions of a file.
FileChecksumError
The downloaded file did not have the required checksum.
ConfigSerializeError
Failed to serialize a config file.
SpawnError
Failed to spawn a new job.
SpawnFailure
A spawned fob failed.
CaCertNotFound
Assertion that the CA certificate exists failed.
CaCertNotAFile
Assertion that the CA certificate is a file failed.
CaKeyNotFound
Assertion that the CA key exists failed.
CaKeyNotAFile
Assertion that the CA key is a file failed.
FileOpenError
Failed to open a new file.
CopyError
Failed to copy one file into another.
FileCreateError
Failed to create a new file.
FileHeaderWriteError
Failed to write the header to the new file.
FileBodyWriteError
Failed to write the main body to the new file.
UnknownLocation
The given location is unknown.
TempDirError
Failed to create a temporary directory.
RepoDownloadError
Failed to download the repo
RepoUnpackError
Failed to unpack the downloaded repo archive
RepoRecurseError
Failed to recurse into the downloaded repo archive’s only folder
MigrationsRetrieve
Failed to find the migrations in the repo.
DatabaseConnect
Failed to connect to the database file.
MigrationsApply
Failed to apply a set of mitigations.
UnsupportedKeyAlgorithm
A particular combination of policy secret settings was not supported.
Fields
key_alg: KeyAlgorithm
TokenGenerate
Failed to generate a new policy token.
Trait Implementations§
source§impl Debug for GenerateError
impl Debug for GenerateError
source§impl Display for GenerateError
impl Display for GenerateError
source§impl Error for GenerateError
impl Error for GenerateError
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
Auto Trait Implementations§
impl Freeze for GenerateError
impl !RefUnwindSafe for GenerateError
impl !Send for GenerateError
impl !Sync for GenerateError
impl Unpin for GenerateError
impl !UnwindSafe for GenerateError
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> ErrorTrace for Twhere
T: Error,
impl<T> ErrorTrace for Twhere
T: Error,
source§fn trace(&self) -> ErrorTraceFormatter<'_>
fn trace(&self) -> ErrorTraceFormatter<'_>
source§impl<T> ErrorTrace for T
impl<T> ErrorTrace 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self
to an expression for Diesel’s query builder. Read more