pub struct ObjectDefinitionSegment {
pub id: u16,
pub version: u8,
pub sequence_flag: u8,
pub data_length: u32,
pub width: u16,
pub height: u16,
pub data: Vec<u8>,
}Expand description
Object Definition Segment contains RLE-encoded bitmap data.
Fields§
§id: u16Object ID (16-bit)
version: u8Version number
sequence_flag: u8Sequence flags (bit 7 = first, bit 6 = last)
data_length: u32Total data length (only valid for first segment)
width: u16Object width in pixels (only valid for first segment)
height: u16Object height in pixels (only valid for first segment)
data: Vec<u8>RLE-encoded pixel data fragment
Implementations§
Source§impl ObjectDefinitionSegment
impl ObjectDefinitionSegment
Sourcepub fn parse(reader: &mut BigEndianReader<'_>, length: usize) -> Option<Self>
pub fn parse(reader: &mut BigEndianReader<'_>, length: usize) -> Option<Self>
Parse an object definition segment from binary data.
Sourcepub fn is_first_in_sequence(&self) -> bool
pub fn is_first_in_sequence(&self) -> bool
Check if this is the first segment in a sequence.
Sourcepub fn is_last_in_sequence(&self) -> bool
pub fn is_last_in_sequence(&self) -> bool
Check if this is the last segment in a sequence.
Trait Implementations§
Source§impl Clone for ObjectDefinitionSegment
impl Clone for ObjectDefinitionSegment
Source§fn clone(&self) -> ObjectDefinitionSegment
fn clone(&self) -> ObjectDefinitionSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ObjectDefinitionSegment
impl RefUnwindSafe for ObjectDefinitionSegment
impl Send for ObjectDefinitionSegment
impl Sync for ObjectDefinitionSegment
impl Unpin for ObjectDefinitionSegment
impl UnsafeUnpin for ObjectDefinitionSegment
impl UnwindSafe for ObjectDefinitionSegment
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