pub struct ArtifactRef<'a> {
pub id: &'a ArtifactId,
pub entry: bool,
pub media_type: &'a str,
pub extension: Option<&'a str>,
pub output: Option<&'a str>,
pub folder: bool,
}Expand description
What an ArtifactNamer is asked to name: an artifact’s identity and the
facts about it that are known before its bytes are made.
A host’s write stage builds one from each Artifact it places; a
producer that needs the path of its own artifact during the run (the
graphics feature’s copy of an image, the recomposed LaTeX’s style file, a
compose template’s own files) builds one from what it is about to make.
Fields§
§id: &'a ArtifactIdThe artifact’s identity.
entry: boolWhether the artifact is its output’s entry artifact.
media_type: &'a strThe artifact’s media type, such as text/html.
extension: Option<&'a str>The file extension the producer gives (without the dot), when it gives one; the namer derives one from the media type otherwise.
output: Option<&'a str>The output the artifact is placed under, when the caller knows it: the
host’s write stage does; a producer naming its own artifact during the
run gives None.
folder: boolWhether the artifact is a folder artifact (ArtifactData::Files; see
the module documentation). The namer then
names a folder: a path with no extension (and no trailing slash), under
which the host writes each of the folder’s files with its own path.
extension is None and
media_type the empty text for a folder.
Trait Implementations§
Source§impl<'a> Clone for ArtifactRef<'a>
impl<'a> Clone for ArtifactRef<'a>
impl<'a> Copy for ArtifactRef<'a>
Source§impl<'a> Debug for ArtifactRef<'a>
impl<'a> Debug for ArtifactRef<'a>
impl<'a> Eq for ArtifactRef<'a>
Source§impl<'a> PartialEq for ArtifactRef<'a>
impl<'a> PartialEq for ArtifactRef<'a>
impl<'a> StructuralPartialEq for ArtifactRef<'a>
Auto Trait Implementations§
impl<'a> Forget for ArtifactRef<'a>
impl<'a> Freeze for ArtifactRef<'a>
impl<'a> Move for ArtifactRef<'a>
impl<'a> RefUnwindSafe for ArtifactRef<'a>
impl<'a> Send for ArtifactRef<'a>
impl<'a> Sync for ArtifactRef<'a>
impl<'a> Unpin for ArtifactRef<'a>
impl<'a> UnsafeUnpin for ArtifactRef<'a>
impl<'a> UnwindSafe for ArtifactRef<'a>
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