Struct reinda::Info

source ·
pub struct Info<'a> { /* private fields */ }
Expand description

Contains meta information about an asset.

Implementations§

source§

impl<'a> Info<'a>

source

pub fn original_path(&self) -> &'static str

Returns the original path specified in the assets! invocation.

source

pub fn public_path(&self) -> &'a str

Returns the public path, which might be the same as original_path or might contain a hash if hash was specified in assets! for this asset.

source

pub fn is_served(&self) -> bool

Returns whether or not this asset is publicly served. Equals the serve specification in the assets! macro.

source

pub fn is_dynamic(&self) -> bool

Returns whether this asset is always loaded at runtime (either at startup or when requested) as opposed to being embeded. Equals the dynamic specification in the assets! macro.

source

pub fn is_filename_hashed(&self) -> bool

Returns whether this asset’s filename currently (in this compilation mode) includes a hash of the asset’s content. In dev mode, this always returns false; in prod mode, this returns true if hash was specified in assets!.

Trait Implementations§

source§

impl<'a> Debug for Info<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Info<'a>

§

impl<'a> Send for Info<'a>

§

impl<'a> Sync for Info<'a>

§

impl<'a> Unpin for Info<'a>

§

impl<'a> UnwindSafe for Info<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.