Enum BufferDisposition
#[repr(u8)]pub enum BufferDisposition {
ClearEntire = 1,
ClearNondurable = 2,
Retain = 3,
}
Expand description
Choices for clearing/retaining trace buffer contents at Start. A brief summary of buffer contents: The trace buffer is divided into two main pieces: durable and non-durable. The durable portion contains things like the string and thread data for their respective references (trace_encoded_string_ref_t and trace_encoded_thread_ref_t). The non-durable portion contains the rest of the trace data like events); this is the portion that, for example, is discarded in circular buffering mode when the (non-durable) buffer fills.
Variants§
ClearEntire = 1
Clear the entire buffer, including durable buffer contents. N.B. If this is done mid-session, then string and thread references from prior to this point will become invalid - the underlying data will be gone. To prevent this save buffer contents before clearing.
This is typically used when buffer contents were saved after the preceding Stop.
ClearNondurable = 2
Clear the non-durable portion of the buffer, retaining the durable portion.
This is typically used when buffer contents were not saved after the preceding Stop and the current contents are to be discarded.
Retain = 3
Retain buffer contents. New trace data is added where the previous trace run left off.
This is typically used when buffer contents were not saved after the preceding Stop and the current contents are to be retained.
Implementations§
§impl BufferDisposition
impl BufferDisposition
pub fn from_primitive(prim: u8) -> Option<BufferDisposition>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
§impl Clone for BufferDisposition
impl Clone for BufferDisposition
§fn clone(&self) -> BufferDisposition
fn clone(&self) -> BufferDisposition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for BufferDisposition
impl Debug for BufferDisposition
§impl<D> Decode<BufferDisposition, D> for BufferDispositionwhere
D: ResourceDialect,
impl<D> Decode<BufferDisposition, D> for BufferDispositionwhere
D: ResourceDialect,
§fn new_empty() -> BufferDisposition
fn new_empty() -> BufferDisposition
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<BufferDisposition, D> for BufferDispositionwhere
D: ResourceDialect,
impl<D> Encode<BufferDisposition, D> for BufferDispositionwhere
D: ResourceDialect,
§impl Hash for BufferDisposition
impl Hash for BufferDisposition
§impl Ord for BufferDisposition
impl Ord for BufferDisposition
§fn cmp(&self, other: &BufferDisposition) -> Ordering
fn cmp(&self, other: &BufferDisposition) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for BufferDisposition
impl PartialEq for BufferDisposition
§impl PartialOrd for BufferDisposition
impl PartialOrd for BufferDisposition
§impl TypeMarker for BufferDisposition
impl TypeMarker for BufferDisposition
§type Owned = BufferDisposition
type Owned = BufferDisposition
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for BufferDisposition
impl ValueTypeMarker for BufferDisposition
§type Borrowed<'a> = BufferDisposition
type Borrowed<'a> = BufferDisposition
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<BufferDisposition as TypeMarker>::Owned,
) -> <BufferDisposition as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<BufferDisposition as TypeMarker>::Owned, ) -> <BufferDisposition as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.