pub struct BufferConfig {
pub size_kb: Option<u32>,
pub fill_policy: Option<i32>,
pub transfer_on_clone: Option<bool>,
pub clear_before_clone: Option<bool>,
}
Fields§
§size_kb: Option<u32>
§fill_policy: Option<i32>
§transfer_on_clone: Option<bool>
When true the buffer is moved (rather than copied) onto the cloned session, and an empty buffer of the same size is allocated in the source tracing session. This feature will likely get deprecated in the future. It been introduced mainly to support the surfaceflinger snapshot dump for bugreports, where SF can dumps O(400MB) into the bugreport trace. In that case we don’t want to retain another in-memory copy of the buffer.
clear_before_clone: Option<bool>
Used in conjuction with transfer_on_clone. When true the buffer is cleared before issuing the Flush(reason=kTraceClone). This is to ensure that if the data source took too long to write the data in a previous clone-related flush, we don’t end up with a mixture of leftovers from the previous write and new data.
Implementations§
Source§impl BufferConfig
impl BufferConfig
Sourcepub fn size_kb(&self) -> u32
pub fn size_kb(&self) -> u32
Returns the value of size_kb
, or the default value if size_kb
is unset.
Sourcepub fn fill_policy(&self) -> FillPolicy
pub fn fill_policy(&self) -> FillPolicy
Returns the enum value of fill_policy
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_fill_policy(&mut self, value: FillPolicy)
pub fn set_fill_policy(&mut self, value: FillPolicy)
Sets fill_policy
to the provided enum value.
Sourcepub fn transfer_on_clone(&self) -> bool
pub fn transfer_on_clone(&self) -> bool
Returns the value of transfer_on_clone
, or the default value if transfer_on_clone
is unset.
Sourcepub fn clear_before_clone(&self) -> bool
pub fn clear_before_clone(&self) -> bool
Returns the value of clear_before_clone
, or the default value if clear_before_clone
is unset.
Trait Implementations§
Source§impl Clone for BufferConfig
impl Clone for BufferConfig
Source§fn clone(&self) -> BufferConfig
fn clone(&self) -> BufferConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BufferConfig
impl Debug for BufferConfig
Source§impl Default for BufferConfig
impl Default for BufferConfig
Source§impl Message for BufferConfig
impl Message for BufferConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
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>
self
.