#[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§
Source§impl BufferDisposition
impl BufferDisposition
pub fn from_primitive(prim: u8) -> Option<Self>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
Source§impl Clone for BufferDisposition
impl Clone for BufferDisposition
Source§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 moreSource§impl Debug for BufferDisposition
impl Debug for BufferDisposition
Source§impl<D: ResourceDialect> Decode<BufferDisposition, D> for BufferDisposition
impl<D: ResourceDialect> Decode<BufferDisposition, D> for BufferDisposition
Source§impl<D: ResourceDialect> Encode<BufferDisposition, D> for BufferDisposition
impl<D: ResourceDialect> Encode<BufferDisposition, D> for BufferDisposition
Source§impl Hash for BufferDisposition
impl Hash for BufferDisposition
Source§impl Ord for BufferDisposition
impl Ord for BufferDisposition
Source§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,
Source§impl PartialEq for BufferDisposition
impl PartialEq for BufferDisposition
Source§impl PartialOrd for BufferDisposition
impl PartialOrd for BufferDisposition
Source§impl TypeMarker for BufferDisposition
impl TypeMarker for BufferDisposition
Source§type Owned = BufferDisposition
type Owned = BufferDisposition
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§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 moreSource§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.Source§impl ValueTypeMarker for BufferDisposition
impl ValueTypeMarker for BufferDisposition
Source§type Borrowed<'a> = BufferDisposition
type Borrowed<'a> = BufferDisposition
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for BufferDisposition
impl Eq for BufferDisposition
impl StructuralPartialEq for BufferDisposition
Auto Trait Implementations§
impl Freeze for BufferDisposition
impl RefUnwindSafe for BufferDisposition
impl Send for BufferDisposition
impl Sync for BufferDisposition
impl Unpin for BufferDisposition
impl UnwindSafe for BufferDisposition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)