Struct drm::mode::Id
[−]
[src]
pub struct Id<T>(_, _);
Id is a 32-bit integer that represents an object in the driver.
This information can change at any time, due to physical hardware
changes, driver behavior, other programs, etc. So the Id can be used
to get the information again using Device::get
.
Most API's use Id's for passing information back to the kernel as well.
The phantom type parameter allows can unsure that you don't accidently mix id's, and it makes Device::get very convienient.
let thing = device.get(id).unwrap();
Methods
impl<T: Resource> Id<T>
[src]
unsafe fn from_u32(id: u32) -> Option<Id<T>>
[−]
Create an Id wrapper of a u32. As the id maybe not actually exist or be the correct type, so this method is unsafe.
fn as_u32(&self) -> u32
[−]
Get the value of the id.
Trait Implementations
impl<T> Copy for Id<T>
[src]
impl<T> Clone for Id<T>
[src]
fn clone(&self) -> Id<T>
[−]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[−]
Performs copy-assignment from source
. Read more
impl<T> PartialEq for Id<T>
[src]
fn eq(&self, rhs: &Id<T>) -> bool
[−]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[−]
This method tests for !=
.
impl<T> Eq for Id<T>
[src]
impl<T> Ord for Id<T>
[src]
fn cmp(&self, rhs: &Id<T>) -> Ordering
[−]
This method returns an Ordering
between self
and other
. Read more
impl<T> PartialOrd for Id<T>
[src]
fn partial_cmp(&self, rhs: &Id<T>) -> Option<Ordering>
[−]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[−]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[−]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[−]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[−]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> Hash for Id<T>
[src]
fn hash<H>(&self, state: &mut H) where H: Hasher
[−]
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0[−]
Feeds a slice of this type into the state provided.