pub struct ConnectorState<'d> { /* private fields */ }Expand description
Current monitor data for one physical connector.
Keep a shared reference in the hotplug/DDC task and publish completed reads
with Self::update, independently of the task receiving USB pixel data.
USB requests read the cached data; no DDC I/O runs inside a critical section.
Set CONNECTOR_FLAGS_POLL_STATUS on hotpluggable connectors so the host
polls for changes. USB reset and deconfiguration preserve this snapshot.
Implementations§
Source§impl<'d> ConnectorState<'d>
impl<'d> ConnectorState<'d>
Sourcepub const fn new(modes: &'d mut [DisplayMode], edid: &'d mut [u8]) -> Self
pub const fn new(modes: &'d mut [DisplayMode], edid: &'d mut [u8]) -> Self
Create a disconnected connector with no advertised modes or EDID.
Sourcepub fn update(
&self,
status: u8,
modes: &[DisplayMode],
edid: Option<&[u8]>,
) -> Result<(), ConnectorUpdateError>
pub fn update( &self, status: u8, modes: &[DisplayMode], edid: Option<&[u8]>, ) -> Result<(), ConnectorUpdateError>
Atomically replace the connector’s status, modes, and EDID.
Trait Implementations§
Auto Trait Implementations§
impl<'d> !Freeze for ConnectorState<'d>
impl<'d> !RefUnwindSafe for ConnectorState<'d>
impl<'d> !UnwindSafe for ConnectorState<'d>
impl<'d> Send for ConnectorState<'d>
impl<'d> Sync for ConnectorState<'d>
impl<'d> Unpin for ConnectorState<'d>
impl<'d> UnsafeUnpin for ConnectorState<'d>
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