pub struct ResourceId(pub u32);Expand description
A packed resource identifier: 0xPPTTEEEE (package, type, entry).
Tuple Fields§
§0: u32Implementations§
Source§impl ResourceId
impl ResourceId
Sourcepub const APP_PACKAGE: u8 = 0x7f
pub const APP_PACKAGE: u8 = 0x7f
The package ID of application resources.
Sourcepub const ANDROID_PACKAGE: u8 = 0x01
pub const ANDROID_PACKAGE: u8 = 0x01
The package ID of framework (android:) resources.
pub const fn new(package: u8, type_id: u8, entry: u16) -> Self
pub const fn package(self) -> u8
pub const fn entry(self) -> u16
Trait Implementations§
Source§impl Clone for ResourceId
impl Clone for ResourceId
impl Copy for ResourceId
Source§impl Debug for ResourceId
impl Debug for ResourceId
Source§impl Display for ResourceId
impl Display for ResourceId
impl Eq for ResourceId
Source§impl From<ResourceId> for ResourceRef
impl From<ResourceId> for ResourceRef
Source§fn from(id: ResourceId) -> Self
fn from(id: ResourceId) -> Self
Converts to this type from the input type.
Source§impl Hash for ResourceId
impl Hash for ResourceId
Source§impl Ord for ResourceId
impl Ord for ResourceId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ResourceId
impl PartialEq for ResourceId
Source§impl PartialOrd for ResourceId
impl PartialOrd for ResourceId
impl StructuralPartialEq for ResourceId
Auto Trait Implementations§
impl Freeze for ResourceId
impl RefUnwindSafe for ResourceId
impl Send for ResourceId
impl Sync for ResourceId
impl Unpin for ResourceId
impl UnsafeUnpin for ResourceId
impl UnwindSafe for ResourceId
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CustomError for T
impl<T> CustomError for T
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.