#[non_exhaustive]pub struct ImageFile {
pub identity: String,
pub media_type: String,
pub address: String,
}Expand description
What the graphics resolver returns about the file of an image: its
identity, its format and the address that reaches it where it is. It
holds no content: the stage that needs the content asks the resolver for
it (GraphicsResolver::read).
The record of each image holds it
(GraphicsRecord::file).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.identity: StringThe file’s identity, in the host’s own form: two images that refer to one file have the same identity, regardless of their paths as written. The resolver reads the file by it.
media_type: StringThe file’s format, as a media type (image/png), which the resolver
reads from the content where it can, else from the file’s name. See
ImageFormat::from_media_type for the formats a conversion rule can
list.
address: StringThe address an output writes to reach the file where it is, under
the strategy reference.
Implementations§
Source§impl ImageFile
impl ImageFile
Sourcepub fn new(
identity: impl Into<String>,
media_type: impl Into<String>,
address: impl Into<String>,
) -> ImageFile
pub fn new( identity: impl Into<String>, media_type: impl Into<String>, address: impl Into<String>, ) -> ImageFile
Returns the file of identity identity, of the media type
media_type, reached at address.
Sourcepub fn format(&self) -> Option<ImageFormat>
pub fn format(&self) -> Option<ImageFormat>
Returns the file’s format, where it is one of the six that a conversion rule can list.
Trait Implementations§
impl Eq for ImageFile
impl StructuralPartialEq for ImageFile
Auto Trait Implementations§
impl Forget for ImageFile
impl Freeze for ImageFile
impl Move for ImageFile
impl RefUnwindSafe for ImageFile
impl Send for ImageFilewhere
RawVecInner: Send,
impl Sync for ImageFilewhere
RawVecInner: Sync,
impl Unpin for ImageFile
impl UnsafeUnpin for ImageFile
impl UnwindSafe for ImageFilewhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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