pub struct DisplayDefinitionSegment {
pub page_id: u16,
pub dds_version_number: u8,
pub display_window_flag: bool,
pub reserved: u8,
pub display_width: u16,
pub display_height: u16,
pub display_window_horizontal_position_minimum: Option<u16>,
pub display_window_horizontal_position_maximum: Option<u16>,
pub display_window_vertical_position_minimum: Option<u16>,
pub display_window_vertical_position_maximum: Option<u16>,
}Expand description
Display Definition Segment (DDS).
Fields§
§page_id: u16The page_id (from generic segment header).
dds_version_number: u8Version of this DDS (modulo 16).
display_window_flag: boolWhether a window is defined (true) or the display set fills the full resolution (false).
reserved: u8Reserved bits in body byte 0 (bits [2:0]).
display_width: u16Maximum horizontal width in pixels minus 1 (0..4095).
display_height: u16Maximum vertical height in lines minus 1 (0..4095).
display_window_horizontal_position_minimum: Option<u16>Left-most pixel of the display window (present iff display_window_flag).
display_window_horizontal_position_maximum: Option<u16>Right-most pixel of the display window (present iff display_window_flag).
display_window_vertical_position_minimum: Option<u16>Upper-most line of the display window (present iff display_window_flag).
display_window_vertical_position_maximum: Option<u16>Bottom line of the display window (present iff display_window_flag).
Trait Implementations§
Source§impl Clone for DisplayDefinitionSegment
impl Clone for DisplayDefinitionSegment
Source§impl Debug for DisplayDefinitionSegment
impl Debug for DisplayDefinitionSegment
impl Eq for DisplayDefinitionSegment
Source§impl<'a> From<DisplayDefinitionSegment> for AnySegment<'a>
impl<'a> From<DisplayDefinitionSegment> for AnySegment<'a>
Source§fn from(s: DisplayDefinitionSegment) -> Self
fn from(s: DisplayDefinitionSegment) -> Self
Converts to this type from the input type.
Source§impl<'a> Parse<'a> for DisplayDefinitionSegment
impl<'a> Parse<'a> for DisplayDefinitionSegment
Source§impl PartialEq for DisplayDefinitionSegment
impl PartialEq for DisplayDefinitionSegment
Source§impl SegmentDef<'_> for DisplayDefinitionSegment
impl SegmentDef<'_> for DisplayDefinitionSegment
Source§impl Serialize for DisplayDefinitionSegment
Available on crate feature serde only.
impl Serialize for DisplayDefinitionSegment
Available on crate feature
serde only.Source§impl Serialize for DisplayDefinitionSegment
impl Serialize for DisplayDefinitionSegment
Source§type Error = Error
type Error = Error
The error type this implementer returns (usually the same as the
corresponding
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Number of bytes
serialize_into will write.Source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, Self::Error>
Write the serialised form into
buf. Returns the number of bytes
written (always equal to serialized_len()).Source§fn try_to_bytes(&self) -> Result<Vec<u8>, Self::Error>
fn try_to_bytes(&self) -> Result<Vec<u8>, Self::Error>
Allocate a
Vec and serialize into it, returning the serializer’s error instead of
panicking. This is the only
allocate-and-serialize entry point: there is deliberately no panicking
to_bytes (hand-built values, or values assembled from damaged wire data,
can violate a wire constraint, so the error must reach the caller).impl StructuralPartialEq for DisplayDefinitionSegment
Auto Trait Implementations§
impl Forget for DisplayDefinitionSegment
impl Freeze for DisplayDefinitionSegment
impl RefUnwindSafe for DisplayDefinitionSegment
impl Send for DisplayDefinitionSegment
impl Sync for DisplayDefinitionSegment
impl Unpin for DisplayDefinitionSegment
impl UnsafeUnpin for DisplayDefinitionSegment
impl UnwindSafe for DisplayDefinitionSegment
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