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>
Sourcepub fn id(&self) -> u32
pub fn id(&self) -> u32
The resource id, 0x01000000 and up; shared by every value of the resource.
Sourcepub fn kind(&self) -> ResourceType
pub fn kind(&self) -> ResourceType
The resource type: string, media, color…
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.
Sourcepub fn qualifiers(&self) -> &'r Qualifiers
pub fn qualifiers(&self) -> &'r Qualifiers
The qualifier set this value is for.
Sourcepub fn value(&self) -> ResourceValue<'r>
pub fn value(&self) -> ResourceValue<'r>
The value decoded according to Resource::kind.
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