subspace_agent_model/
image_attachment.rs1use std::sync::Arc;
2
3#[derive(Clone, PartialEq, Eq)]
6pub struct ImageAttachment {
7 pub id: u64,
8 pub data: Arc<[u8]>,
9 pub mime_type: String,
10 pub display_name: String,
11}
12
13impl std::fmt::Debug for ImageAttachment {
14 fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
15 formatter
16 .debug_struct("ImageAttachment")
17 .field("id", &self.id)
18 .field("bytes", &self.data.len())
19 .field("mime_type", &self.mime_type)
20 .field("display_name", &self.display_name)
21 .finish()
22 }
23}
24
25pub const DRAFT_ATTACHMENT_LIMIT: usize = 20 * 1024 * 1024;