pub struct ImageRecord {
pub byte_len: i64,
pub content_type: String,
pub event_id: EventId,
pub fetched_at: Timestamp,
pub id: ImageId,
pub print_id: PrintId,
pub relative_path: String,
pub sha256: String,
pub source_url: Option<String>,
}Expand description
One image, stored beside the event it arrived with.
relative_path is relative to the configured state directory, so that the
store stays portable. Materializing an image resolves that to an absolute
path; nothing in this system renders image bytes into JSON.
Fields§
§byte_len: i64How many bytes it is.
content_type: StringThe content type it was served as.
event_id: EventIdThe event it arrived with.
fetched_at: TimestampWhen it was fetched.
id: ImageIdThis image’s identifier, minted by the store.
print_id: PrintIdThe print it belongs to.
relative_path: StringWhere it lives, relative to the configured state directory.
sha256: StringThe SHA-256 of its bytes, lowercase hexadecimal.
source_url: Option<String>Where it was fetched from, when it was fetched from somewhere.
Trait Implementations§
Source§impl Clone for ImageRecord
impl Clone for ImageRecord
Source§impl Debug for ImageRecord
impl Debug for ImageRecord
Source§impl<'de> Deserialize<'de> for ImageRecord
impl<'de> Deserialize<'de> for ImageRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ImageRecord
impl PartialEq for ImageRecord
Source§impl Serialize for ImageRecord
impl Serialize for ImageRecord
impl StructuralPartialEq for ImageRecord
Auto Trait Implementations§
impl Freeze for ImageRecord
impl RefUnwindSafe for ImageRecord
impl Send for ImageRecord
impl Sync for ImageRecord
impl Unpin for ImageRecord
impl UnsafeUnpin for ImageRecord
impl UnwindSafe for ImageRecord
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