pub struct BufferData {
pub buffer_id: Option<u64>,
pub width: Option<u32>,
pub height: Option<u32>,
pub frame_number: Option<u64>,
pub flags: Option<u32>,
pub cached_buffer_id: Option<u64>,
pub pixel_format: Option<i32>,
pub usage: Option<u64>,
}
Fields§
§buffer_id: Option<u64>
§width: Option<u32>
§height: Option<u32>
§frame_number: Option<u64>
§flags: Option<u32>
§cached_buffer_id: Option<u64>
§pixel_format: Option<i32>
§usage: Option<u64>
Implementations§
Source§impl BufferData
impl BufferData
Sourcepub fn buffer_id(&self) -> u64
pub fn buffer_id(&self) -> u64
Returns the value of buffer_id
, or the default value if buffer_id
is unset.
Sourcepub fn height(&self) -> u32
pub fn height(&self) -> u32
Returns the value of height
, or the default value if height
is unset.
Sourcepub fn frame_number(&self) -> u64
pub fn frame_number(&self) -> u64
Returns the value of frame_number
, or the default value if frame_number
is unset.
Sourcepub fn cached_buffer_id(&self) -> u64
pub fn cached_buffer_id(&self) -> u64
Returns the value of cached_buffer_id
, or the default value if cached_buffer_id
is unset.
Sourcepub fn pixel_format(&self) -> PixelFormat
pub fn pixel_format(&self) -> PixelFormat
Returns the enum value of pixel_format
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_pixel_format(&mut self, value: PixelFormat)
pub fn set_pixel_format(&mut self, value: PixelFormat)
Sets pixel_format
to the provided enum value.
Trait Implementations§
Source§impl Clone for BufferData
impl Clone for BufferData
Source§fn clone(&self) -> BufferData
fn clone(&self) -> BufferData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BufferData
impl Debug for BufferData
Source§impl Default for BufferData
impl Default for BufferData
Source§impl Message for BufferData
impl Message for BufferData
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for BufferData
impl PartialEq for BufferData
impl StructuralPartialEq for BufferData
Auto Trait Implementations§
impl Freeze for BufferData
impl RefUnwindSafe for BufferData
impl Send for BufferData
impl Sync for BufferData
impl Unpin for BufferData
impl UnwindSafe for BufferData
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