#[repr(C, align(8))]pub struct AssetPath { /* private fields */ }
Expand description
Contains an asset path and an optional resolved path. Asset paths may contain non-control UTF-8 encoded characters. Specifically, U+0000..U+001F (C0 controls), U+007F (delete), and U+0080..U+009F (C1 controls) are disallowed. Attempts to construct asset paths with such characters will issue a TfError and produce the default-constructed empty asset path.
Implementations§
source§impl AssetPath
impl AssetPath
sourcepub fn new(desc: AssetPathDescriptor<'_>) -> Result<Self>
pub fn new(desc: AssetPathDescriptor<'_>) -> Result<Self>
Construct an asset path with path
and an associated resolvedPath
.
If either the passed path
or resolvedPath
are not valid UTF-8 or
either contain C0 or C1 control characters, raise a TfError and return
the default-constructed empty asset path.
The parameters are in AssetPathDescriptor.
Methods from Deref<Target = AssetPathRef>§
sourcepub fn get_asset_path(&self) -> Result<&str>
pub fn get_asset_path(&self) -> Result<&str>
Return the asset path as a &str
Trait Implementations§
source§impl AsRef<AssetPathRef> for AssetPath
impl AsRef<AssetPathRef> for AssetPath
source§fn as_ref(&self) -> &AssetPathRef
fn as_ref(&self) -> &AssetPathRef
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl RefUnwindSafe for AssetPath
impl !Send for AssetPath
impl !Sync for AssetPath
impl Unpin for AssetPath
impl UnwindSafe for AssetPath
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