pub struct Config<'d> {
pub max_packet_size: u16,
pub min_width: u32,
pub max_width: u32,
pub min_height: u32,
pub max_height: u32,
pub max_buffer_size: u32,
pub formats: &'d [PixelFormat],
pub supported_rotations: u8,
pub connectors: &'d [GudConnector<'d>],
pub validate_mode_blocking: fn(connector: u8, mode: &DisplayMode) -> bool,
}Expand description
Static class driver configuration passed to GudClass::new.
This configuration is fixed when the class is created.
Fields§
§max_packet_size: u16Maximum packet size for the bulk OUT endpoint: 8..=64 for full-speed, 512 for high-speed.
min_width: u32Minimum framebuffer width the device handles.
max_width: u32Maximum framebuffer width.
min_height: u32Minimum framebuffer height.
max_height: u32Maximum framebuffer height.
max_buffer_size: u32Maximum size in bytes of one damage rectangle. 0 means no cap.
Does not have to fit in memory, it can be streamed chunk by chunk.
formats: &'d [PixelFormat]Supported pixel formats, 1..=GUD_FORMATS_MAX_NUM.
supported_rotations: u8ROTATION_* bitmask; 0 omits the rotation property entirely.
connectors: &'d [GudConnector<'d>]Connectors, 1..=GUD_CONNECTORS_MAX_NUM. Index order is the index the
host uses in wValue and SET_STATE_CHECK.
validate_mode_blocking: fn(connector: u8, mode: &DisplayMode) -> boolValidate a mode for the given connector index during SET_STATE_CHECK.
Implementations§
Auto Trait Implementations§
impl<'d> !RefUnwindSafe for Config<'d>
impl<'d> !UnwindSafe for Config<'d>
impl<'d> Freeze for Config<'d>
impl<'d> Send for Config<'d>
impl<'d> Sync for Config<'d>
impl<'d> Unpin for Config<'d>
impl<'d> UnsafeUnpin for Config<'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