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]

[]

Create an Id wrapper of a u32. As the id maybe not actually exist or be the correct type, so this method is unsafe.

[]

Get the value of the id.

Trait Implementations

impl<T> Copy for Id<T>
[src]

impl<T> Clone for Id<T>
[src]

[]

Returns a copy of the value. Read more

[]

Performs copy-assignment from source. Read more

impl<T> PartialEq for Id<T>
[src]

[]

This method tests for self and other values to be equal, and is used by ==. Read more

[]

This method tests for !=.

impl<T> Eq for Id<T>
[src]

impl<T> Ord for Id<T>
[src]

[]

This method returns an Ordering between self and other. Read more

impl<T> PartialOrd for Id<T>
[src]

[]

This method returns an ordering between self and other values if one exists. Read more

[]

This method tests less than (for self and other) and is used by the < operator. Read more

[]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[]

This method tests greater than (for self and other) and is used by the > operator. Read more

[]

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]

[]

Feeds this value into the state given, updating the hasher as necessary.

[]

Feeds a slice of this type into the state provided.

impl<T: Resource> Debug for Id<T>
[src]

[]

Formats the value using the given formatter.