#[non_exhaustive]pub enum AttachmentError {
Gone {
attachment_id: AttachmentId,
},
Unauthorized {
attachment_id: AttachmentId,
},
Timeout {
attachment_id: AttachmentId,
},
Other {
attachment_id: AttachmentId,
code: String,
},
}Expand description
Why an attachment could not be fetched.
None of these ends a turn. A file the model cannot be shown is a turn that answers with less, not a turn that fails: the user has just done the work of taking a photograph, and losing their question as well is the worse outcome.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Gone
The application no longer holds the bytes.
Ordinary rather than exceptional: an application may keep an attachment for one turn and never write it down, which is a legitimate product decision and the reason this is a port rather than a store.
Fields
§
attachment_id: AttachmentIdThe attachment.
The actor may not read it.
Fields
The attachment.
Timeout
Fetching timed out.
Fields
§
attachment_id: AttachmentIdThe attachment.
Other
Anything else the application wants named.
Fields
§
attachment_id: AttachmentIdThe attachment.
Trait Implementations§
Source§impl Clone for AttachmentError
impl Clone for AttachmentError
Source§impl Debug for AttachmentError
impl Debug for AttachmentError
Source§impl Display for AttachmentError
impl Display for AttachmentError
impl Eq for AttachmentError
Source§impl Error for AttachmentError
impl Error for AttachmentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for AttachmentError
impl PartialEq for AttachmentError
impl StructuralPartialEq for AttachmentError
Auto Trait Implementations§
impl Freeze for AttachmentError
impl RefUnwindSafe for AttachmentError
impl Send for AttachmentError
impl Sync for AttachmentError
impl Unpin for AttachmentError
impl UnsafeUnpin for AttachmentError
impl UnwindSafe for AttachmentError
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.