pub enum SecretEnvError {
Conflict {
name: String,
file_var: String,
},
RelativePath {
file_var: String,
path: PathBuf,
},
Unreadable {
file_var: String,
path: PathBuf,
source: Error,
},
Unwritable {
file_var: String,
path: PathBuf,
source: Error,
},
HoldsJson {
file_var: String,
path: PathBuf,
},
NotAFile {
file_var: String,
path: PathBuf,
},
Empty {
file_var: String,
path: PathBuf,
},
NotUtf8 {
file_var: String,
path: PathBuf,
},
LoosePermissions {
file_var: String,
path: PathBuf,
mode: u32,
},
WritableByOthers {
file_var: String,
path: PathBuf,
mode: u32,
},
WrongOwner {
file_var: String,
path: PathBuf,
owner: u32,
expected: u32,
},
}Expand description
Why a secret could not be resolved. Messages name variables, paths, modes and uids only — never the secret’s bytes.
Variants§
Conflict
NAME and NAME_FILE are both set in the same layer.
RelativePath
The _FILE value is not an absolute path.
Unreadable
The file could not be opened, inspected, or read.
Fields
Unwritable
The file could not be written.
Fields
HoldsJson
An existing secret file to be replaced holds JSON, which no secret
this resolver stores does: most likely a client_secret.json.
NotAFile
The path (after following symlinks) is not a regular file.
Empty
The file is empty (after trimming one trailing newline).
NotUtf8
The file’s contents are not valid UTF-8.
LoosePermissions
A file owned by the current user grants group or other permission bits.
Fields
WritableByOthers
A root-owned file that group or other users can write.
Fields
WrongOwner
The file is owned by neither the current user nor root.
Trait Implementations§
Source§impl Debug for SecretEnvError
impl Debug for SecretEnvError
Source§impl Display for SecretEnvError
impl Display for SecretEnvError
Source§impl Error for SecretEnvError
impl Error for SecretEnvError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SecretEnvError
impl !UnwindSafe for SecretEnvError
impl Freeze for SecretEnvError
impl Send for SecretEnvError
impl Sync for SecretEnvError
impl Unpin for SecretEnvError
impl UnsafeUnpin for SecretEnvError
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> 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> 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 moreSource§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.