pub enum RejectReason {
Disabled,
NoAllowedRoots,
PathUnresolvable(String),
OutsideAllowedRoots {
resolved: PathBuf,
},
TooLarge {
size: u64,
cap: u64,
},
ScannerRejected {
detail: String,
},
ScannerNotProvided,
ReadFailed(String),
}Expand description
Reasons the broker can refuse to read an attachment. The agent surfaces the variant + a short string back to the operator via the originating-channel notification path; the operator never sees raw filesystem errors verbatim.
Variants§
Disabled
Operator set attachments.enabled: false. Agent should treat
the request as if attachments were unsupported.
NoAllowedRoots
allowed_roots was empty after $HOME expansion. The
operator misconfigured — no path can ever resolve.
PathUnresolvable(String)
Path failed to canonicalize (does not exist, broken symlink, permission denied during traversal). Carries the OS-level reason for operator-side debugging.
OutsideAllowedRoots
Resolved path is not a descendant of any allowed_root.
TooLarge
Resolved path stat’d > max_size_bytes.
ScannerRejected
Scanner subprocess returned non-zero, timed out, or could not
be spawned. detail carries the scanner’s stderr (truncated)
or a wrapper-level error.
ScannerNotProvided
Compose configured a scanner but the caller passed
scanner: None to check_and_read. Tighter than silently
skipping the scan: a refactor that drops the scanner arg
anywhere upstream surfaces here instead of disabling
malware checking with no test failure.
ReadFailed(String)
Read raced with deletion or another fs::read failure surfaced
after the size check passed.
Implementations§
Trait Implementations§
Source§impl Clone for RejectReason
impl Clone for RejectReason
Source§fn clone(&self) -> RejectReason
fn clone(&self) -> RejectReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RejectReason
impl Debug for RejectReason
Source§impl PartialEq for RejectReason
impl PartialEq for RejectReason
Source§fn eq(&self, other: &RejectReason) -> bool
fn eq(&self, other: &RejectReason) -> bool
self and other values to be equal, and is used by ==.impl Eq for RejectReason
impl StructuralPartialEq for RejectReason
Auto Trait Implementations§
impl Freeze for RejectReason
impl RefUnwindSafe for RejectReason
impl Send for RejectReason
impl Sync for RejectReason
impl Unpin for RejectReason
impl UnsafeUnpin for RejectReason
impl UnwindSafe for RejectReason
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.