#[non_exhaustive]pub struct AttachmentBlob {
pub size: u64,
pub sha256: [u8; 32],
}Expand description
The stored blob behind an Attachment blobId, as reported by
ChatResolvers::attachment_blob.
handle_message_set compares these against the Attachment’s size
and sha256 (draft-atwood-jmap-chat-00 §Attachment at jmap-chat-spec
77c3474, size L374: “Servers SHOULD verify against actual content”;
sha256 L377: “Servers SHOULD verify”). This crate performs both
recommended checks by choice.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.size: u64Byte count of the stored blob.
sha256: [u8; 32]SHA-256 digest of the stored blob’s bytes.
Implementations§
Trait Implementations§
Source§impl Clone for AttachmentBlob
impl Clone for AttachmentBlob
impl Copy for AttachmentBlob
Source§impl Debug for AttachmentBlob
impl Debug for AttachmentBlob
impl Eq for AttachmentBlob
Source§impl PartialEq for AttachmentBlob
impl PartialEq for AttachmentBlob
impl StructuralPartialEq for AttachmentBlob
Auto Trait Implementations§
impl Forget for AttachmentBlob
impl Freeze for AttachmentBlob
impl Move for AttachmentBlob
impl RefUnwindSafe for AttachmentBlob
impl Send for AttachmentBlob
impl Sync for AttachmentBlob
impl Unpin for AttachmentBlob
impl UnsafeUnpin for AttachmentBlob
impl UnwindSafe for AttachmentBlob
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.