pub struct AssetReference { /* private fields */ }
Implementations§
Source§impl AssetReference
impl AssetReference
Sourcepub const fn with_options(
&self,
options: OciOptions,
) -> FetchableAssetReference<'_>
pub const fn with_options( &self, options: OciOptions, ) -> FetchableAssetReference<'_>
Embed OciOptions with an AssetReference.
Sourcepub fn get_relative_part(&self) -> Result<PathBuf, Error>
pub fn get_relative_part(&self) -> Result<PathBuf, Error>
Get the relative part of the path or return an error if the path does not exist within the base URL.
pub fn baseurl(&self) -> Option<PathBuf>
pub fn path(&self) -> Result<PathBuf, Error>
pub fn location(&self) -> &str
pub fn is_directory(&self) -> bool
pub async fn bytes(&self, options: &OciOptions) -> Result<Bytes, Error>
Sourcepub fn exists_outside_cache(&self) -> bool
pub fn exists_outside_cache(&self) -> bool
Check if the asset exists on disk and isn’t in the cache.
Trait Implementations§
Source§impl Asset for AssetReference
impl Asset for AssetReference
type Options = OciOptions
fn update_baseurl(&self, baseurl: &Path)
fn fetch_with_progress( &self, _options: OciOptions, ) -> Pin<Box<dyn Stream<Item = Progress> + Send + '_>>
fn fetch( &self, options: OciOptions, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + Sync>>
fn name(&self) -> &str
Source§impl AssetManager for AssetReference
impl AssetManager for AssetReference
Source§impl Clone for AssetReference
impl Clone for AssetReference
Source§fn clone(&self) -> AssetReference
fn clone(&self) -> AssetReference
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AssetReference
impl Debug for AssetReference
Source§impl Display for AssetReference
impl Display for AssetReference
Source§impl From<&Path> for AssetReference
impl From<&Path> for AssetReference
Source§impl From<&PathBuf> for AssetReference
impl From<&PathBuf> for AssetReference
Source§impl From<&String> for AssetReference
impl From<&String> for AssetReference
Source§impl From<&str> for AssetReference
impl From<&str> for AssetReference
Source§impl<'a> From<AssetRef<'a, AssetReference>> for AssetReference
impl<'a> From<AssetRef<'a, AssetReference>> for AssetReference
Source§fn from(asset_ref: AssetRef<'a, AssetReference>) -> Self
fn from(asset_ref: AssetRef<'a, AssetReference>) -> Self
Converts to this type from the input type.
Source§impl FromStr for AssetReference
impl FromStr for AssetReference
Source§impl Hash for AssetReference
impl Hash for AssetReference
Source§impl PartialEq for AssetReference
impl PartialEq for AssetReference
Source§impl Serialize for AssetReference
impl Serialize for AssetReference
Source§impl TryFrom<String> for AssetReference
impl TryFrom<String> for AssetReference
impl Eq for AssetReference
Auto Trait Implementations§
impl Freeze for AssetReference
impl !RefUnwindSafe for AssetReference
impl Send for AssetReference
impl Sync for AssetReference
impl Unpin for AssetReference
impl !UnwindSafe for AssetReference
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> 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§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
Compare self to
key
and return true
if they are equal.