pub struct Resource<'r> { /* private fields */ }Expand description
One value of one resource: its id, type, name, the qualifier set the value is for, and the value.
Implementations§
Source§impl<'r> Resource<'r>
impl<'r> Resource<'r>
pub fn id(&self) -> u32
pub fn kind(&self) -> ResourceType
Sourcepub fn name(&self) -> Cow<'r, str>
pub fn name(&self) -> Cow<'r, str>
The name, read lossily when it is not UTF-8. A media or profile resource is named after its file without the extension.
pub fn qualifiers(&self) -> &'r Qualifiers
pub fn value(&self) -> ResourceValue<'r>
Trait Implementations§
impl<'r> Copy for Resource<'r>
Auto Trait Implementations§
impl<'r> Forget for Resource<'r>
impl<'r> Freeze for Resource<'r>
impl<'r> Move for Resource<'r>
impl<'r> RefUnwindSafe for Resource<'r>
impl<'r> Send for Resource<'r>
impl<'r> Sync for Resource<'r>
impl<'r> Unpin for Resource<'r>
impl<'r> UnsafeUnpin for Resource<'r>
impl<'r> UnwindSafe for Resource<'r>
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