Struct MasterRef

Source
pub struct MasterRef<'a, T>(/* private fields */)
where
    T: 'a + Device;
Expand description

A simple handle to the DRM Master lock. This can be generated by any object that implements the UnprivilegedDevice trait.

Trait Implementations§

Source§

impl<'a, T> AsRawFd for MasterRef<'a, T>
where T: 'a + Device,

Source§

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more
Source§

impl<'a, T> Control for MasterRef<'a, T>
where T: 'a + Device,

Source§

fn resource_ids(&self) -> Result<ResourceIds>

Attempts to read the list of all resource ids.
Source§

fn plane_ids(&self) -> Result<PlaneResourceIds>

Attempts to read the list of all plane ids.
Source§

fn connector(&self, id: ConnectorId) -> Result<ConnectorInfo>

Attempts to get a connector given its id.
Source§

fn encoder(&self, id: EncoderId) -> Result<EncoderInfo>

Attempts to get an encoder given its id.
Source§

fn crtc(&self, id: CrtcId) -> Result<CrtcInfo>

Attempts to get a crtc given its id.
Source§

fn framebuffer(&self, id: FramebufferId) -> Result<FramebufferInfo>

Attempts to get a framebuffer given its id.
Source§

fn plane(&self, id: PlaneId) -> Result<PlaneInfo>

Attempts to get a plane given its id.
Source§

fn create_framebuffer<T>(&self, buffer: &T) -> Result<FramebufferId>
where T: Buffer,

Attempts to get a Crtc’s Gamma Lookup Table (LUT) given its CrtcId.
Source§

fn add_framebuffer2(&self)

Source§

fn remove_framebuffer(&self, id: FramebufferId) -> Result<()>

Source§

fn dumbbuffer<'a>( &'a self, size: (u16, u16), bpp: u8, ) -> Result<DumbBuffer<'a, Self>>

Source§

fn properties<T>(&self, resource: T) -> Result<ResourcePropertyHandles>
where T: ResourceId,

Source§

fn resource_property( &self, handle: PropertyHandle, ) -> Result<ResourcePropertyInfo>

Source§

fn proberty_blob(&self)

Source§

fn create_property_blob(&self)

Source§

fn removeproperty_blob(&self)

Source§

impl<'a, T> Debug for MasterRef<'a, T>
where T: 'a + Device + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, T> Device for MasterRef<'a, T>
where T: 'a + Device,

Source§

fn magic(&self) -> Result<AuthToken>

Generates and returns a magic token unique to the current process. This token can be used to authenticate with the DRM Master.
Source§

fn stats(&self) -> Result<()>

Source§

fn set_client_cap(&self, cap: ClientCapability, set: bool) -> Result<()>

Tells the DRM device whether we understand or do not understand a particular capability. Some features, such as atomic modesetting, require informing the device that the process can use such features before it will expose them.
Source§

fn wait_vblan(&self)

Source§

impl<'a, T> MasterControl for MasterRef<'a, T>
where T: 'a + Device,

Source§

fn set_crtc( &self, crtc: CrtcId, buffer: FramebufferId, connectors: &[ConnectorId], position: (u32, u32), mode: Option<Mode>, ) -> Result<()>

Applies a Crtc to a Framebuffer and outputs it on a list of Connectors.
Source§

impl<'a, T> MasterDevice for MasterRef<'a, T>
where T: 'a + Device,

Auto Trait Implementations§

§

impl<'a, T> Freeze for MasterRef<'a, T>

§

impl<'a, T> RefUnwindSafe for MasterRef<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for MasterRef<'a, T>
where T: Sync,

§

impl<'a, T> Sync for MasterRef<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for MasterRef<'a, T>

§

impl<'a, T> UnwindSafe for MasterRef<'a, T>
where T: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.