pub struct BufferEvent {
pub frame_number: Option<u32>,
pub type: Option<i32>,
pub layer_name: Option<String>,
pub duration_ns: Option<u64>,
pub buffer_id: Option<u32>,
}
Fields§
§frame_number: Option<u32>
§type: Option<i32>
§layer_name: Option<String>
§duration_ns: Option<u64>
If no duration is set, the event is an instant event.
buffer_id: Option<u32>
Unique buffer identifier.
Implementations§
Source§impl BufferEvent
impl BufferEvent
Sourcepub fn frame_number(&self) -> u32
pub fn frame_number(&self) -> u32
Returns the value of frame_number
, or the default value if frame_number
is unset.
Sourcepub fn type(&self) -> BufferEventType
pub fn type(&self) -> BufferEventType
Returns the enum value of type
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_type(&mut self, value: BufferEventType)
pub fn set_type(&mut self, value: BufferEventType)
Sets type
to the provided enum value.
Sourcepub fn layer_name(&self) -> &str
pub fn layer_name(&self) -> &str
Returns the value of layer_name
, or the default value if layer_name
is unset.
Sourcepub fn duration_ns(&self) -> u64
pub fn duration_ns(&self) -> u64
Returns the value of duration_ns
, or the default value if duration_ns
is unset.
Trait Implementations§
Source§impl Clone for BufferEvent
impl Clone for BufferEvent
Source§fn clone(&self) -> BufferEvent
fn clone(&self) -> BufferEvent
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 BufferEvent
impl Debug for BufferEvent
Source§impl Default for BufferEvent
impl Default for BufferEvent
Source§impl Message for BufferEvent
impl Message for BufferEvent
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 BufferEvent
impl PartialEq for BufferEvent
impl StructuralPartialEq for BufferEvent
Auto Trait Implementations§
impl Freeze for BufferEvent
impl RefUnwindSafe for BufferEvent
impl Send for BufferEvent
impl Sync for BufferEvent
impl Unpin for BufferEvent
impl UnwindSafe for BufferEvent
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