pub struct ImageRecord {
pub id: ImageId,
pub print_id: Option<PrintId>,
pub event_id: EventId,
pub source_url: Option<String>,
pub fetched_at: Timestamp,
pub content_type: String,
pub byte_len: i64,
pub sha256: String,
pub relative_path: 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§
§id: ImageIdThis image’s identifier, minted by the store.
print_id: Option<PrintId>The print it belongs to, when it belongs to one: a frame taken of the printer with no print named belongs to none.
event_id: EventIdThe event it arrived with.
source_url: Option<String>Where it was fetched from, when it was fetched from somewhere.
fetched_at: TimestampWhen it was fetched.
content_type: StringThe content type it was served as.
byte_len: i64How many bytes it is.
sha256: StringThe SHA-256 of its bytes, lowercase hexadecimal.
relative_path: StringWhere it lives, relative to the configured state directory.
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
impl Eq for ImageRecord
Source§impl JsonSchema for ImageRecord
impl JsonSchema for ImageRecord
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ImageRecord
impl PartialEq for ImageRecord
Source§impl Sample for ImageRecord
impl Sample for ImageRecord
Source§fn sample_full() -> Self
fn sample_full() -> Self
A value carrying every field the type declares.
Source§fn sample_minimal() -> Self
fn sample_minimal() -> Self
A value carrying every optional field absent.
Source§fn sample_alternates() -> Vec<Self>
fn sample_alternates() -> Vec<Self>
One value per further arm, for a type whose wire form is a union. Read more
Source§impl Serialize for ImageRecord
impl Serialize for ImageRecord
impl StructuralPartialEq for ImageRecord
Auto Trait Implementations§
impl Forget for ImageRecord
impl Freeze for ImageRecord
impl Move 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