pub struct Image {
pub number: u32,
pub source_path: String,
pub filename: String,
pub slug: String,
pub title: Option<String>,
pub description: Option<String>,
}Expand description
Image metadata
Image filenames follow (<seq>-)?<title>.<ext> format:
001-Museum.jpeg→ number=1, title=Some(“Museum”)001.jpeg→ number=1, title=None001-.jpeg→ number=1, title=NoneMuseum.jpg→ unnumbered, title=Some(“Museum”)
The sequence number controls sort order; the title (if present) is displayed in the breadcrumb on the image detail page.
Fields§
§number: u32§source_path: String§filename: String§slug: StringURL-safe name from filename, dashes preserved (e.g., “L1020411” from “015-L1020411.jpg”)
title: Option<String>§description: Option<String>Image description from sidecar .txt file (e.g., 001-photo.txt for 001-photo.jpg)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnsafeUnpin for Image
impl UnwindSafe for Image
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more