Struct ferrisetw::trace::DumpFileLoggingMode
source · pub struct DumpFileLoggingMode { /* private fields */ }
Expand description
Logging Mode constants that applies to a dump file.
This is a subset of https://learn.microsoft.com/en-us/windows/win32/etw/logging-mode-constants
See the documentation of crate::trace::TraceBuilder::set_etl_dump_file
for more info.
Implementations§
source§impl DumpFileLoggingMode
impl DumpFileLoggingMode
sourcepub const EVENT_TRACE_FILE_MODE_NONE: Self = _
pub const EVENT_TRACE_FILE_MODE_NONE: Self = _
Same as EVENT_TRACE_FILE_MODE_SEQUENTIAL with no maximum file size specified.
sourcepub const EVENT_TRACE_FILE_MODE_SEQUENTIAL: Self = _
pub const EVENT_TRACE_FILE_MODE_SEQUENTIAL: Self = _
Writes events to a log file sequentially; stops when the file reaches its maximum size.Do not use with EVENT_TRACE_FILE_MODE_CIRCULAR or EVENT_TRACE_FILE_MODE_NEWFILE.
Note: “stop” here means “stop appending to the file”, not “stop the trace”
sourcepub const EVENT_TRACE_FILE_MODE_CIRCULAR: Self = _
pub const EVENT_TRACE_FILE_MODE_CIRCULAR: Self = _
Writes events to a log file. After the file reaches the maximum size, the oldest events are replaced with incoming events.Note that the contents of the circular log file may appear out of order on multiprocessor computers.
Do not use with EVENT_TRACE_FILE_MODE_APPEND, EVENT_TRACE_FILE_MODE_NEWFILE, or EVENT_TRACE_FILE_MODE_SEQUENTIAL.
sourcepub const EVENT_TRACE_FILE_MODE_APPEND: Self = _
pub const EVENT_TRACE_FILE_MODE_APPEND: Self = _
Appends events to an existing sequential log file. If the file does not exist, it is created. Use only if you specify system time for the clock resolution, otherwise, ProcessTrace will return events with incorrect time stamps. When using EVENT_TRACE_FILE_MODE_APPEND, the values for BufferSize, NumberOfProcessors, and ClockType must be explicitly provided and must be the same in both the logger and the file being appended.
Do not use with EVENT_TRACE_REAL_TIME_MODE, EVENT_TRACE_FILE_MODE_CIRCULAR, EVENT_TRACE_FILE_MODE_NEWFILE, or EVENT_TRACE_PRIVATE_LOGGER_MODE.
sourcepub const EVENT_TRACE_FILE_MODE_NEWFILE: Self = _
pub const EVENT_TRACE_FILE_MODE_NEWFILE: Self = _
Automatically switches to a new log file when the file reaches the maximum size. The MaximumFileSize member of EVENT_TRACE_PROPERTIES must be set.The specified file name must be a formatted string (for example, the string contains a %d, such as c:\test%d.etl). Each time a new file is created, a counter is incremented and its value is used, the formatted string is updated, and the resulting string is used as the file name.
This option is not allowed for private event tracing sessions and should not be used for NT kernel logger sessions.
Do not use with EVENT_TRACE_FILE_MODE_CIRCULAR, EVENT_TRACE_FILE_MODE_APPEND or EVENT_TRACE_FILE_MODE_SEQUENTIAL.
sourcepub const EVENT_TRACE_FILE_MODE_PREALLOCATE: Self = _
pub const EVENT_TRACE_FILE_MODE_PREALLOCATE: Self = _
Reserves EVENT_TRACE_PROPERTIES.MaximumFileSize bytes of disk space for the log file in advance. The file occupies the entire space during logging, for both circular and sequential log files. When you stop the session, the log file is reduced to the size needed. You must set EVENT_TRACE_PROPERTIES.MaximumFileSize.
You cannot use the mode for private event tracing sessions.
sourcepub const EVENT_TRACE_USE_KBYTES_FOR_SIZE: Self = _
pub const EVENT_TRACE_USE_KBYTES_FOR_SIZE: Self = _
Use kilobytes as the unit of measure for specifying the size of a file. The default unit of measure is megabytes. This mode applies to the MaxFileSize registry value for an AutoLogger session and the MaximumFileSize member of EVENT_TRACE_PROPERTIES.
sourcepub const EVENT_TRACE_USE_GLOBAL_SEQUENCE: Self = _
pub const EVENT_TRACE_USE_GLOBAL_SEQUENCE: Self = _
Uses sequence numbers that are unique across event tracing sessions. This mode only applies to events logged using the TraceMessage function. For more information, see TraceMessage for usage details.
EVENT_TRACE_USE_GLOBAL_SEQUENCE and EVENT_TRACE_USE_LOCAL_SEQUENCE are mutually exclusive.
sourcepub const EVENT_TRACE_USE_LOCAL_SEQUENCE: Self = _
pub const EVENT_TRACE_USE_LOCAL_SEQUENCE: Self = _
Uses sequence numbers that are unique only for an individual event tracing session. This mode only applies to events logged using the TraceMessage function. For more information, see TraceMessage for usage details.
EVENT_TRACE_USE_GLOBAL_SEQUENCE and EVENT_TRACE_USE_LOCAL_SEQUENCE are mutually exclusive.
sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> Self
pub const unsafe fn from_bits_unchecked(bits: u32) -> Self
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Returns true
if all of the flags in other
are contained within self
.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
source§impl Binary for DumpFileLoggingMode
impl Binary for DumpFileLoggingMode
source§impl BitAndAssign<DumpFileLoggingMode> for DumpFileLoggingMode
impl BitAndAssign<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
source§impl BitOr<DumpFileLoggingMode> for DumpFileLoggingMode
impl BitOr<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn bitor(self, other: DumpFileLoggingMode) -> Self
fn bitor(self, other: DumpFileLoggingMode) -> Self
Returns the union of the two sets of flags.
§type Output = DumpFileLoggingMode
type Output = DumpFileLoggingMode
|
operator.source§impl BitOrAssign<DumpFileLoggingMode> for DumpFileLoggingMode
impl BitOrAssign<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
source§impl BitXorAssign<DumpFileLoggingMode> for DumpFileLoggingMode
impl BitXorAssign<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
source§impl Clone for DumpFileLoggingMode
impl Clone for DumpFileLoggingMode
source§fn clone(&self) -> DumpFileLoggingMode
fn clone(&self) -> DumpFileLoggingMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DumpFileLoggingMode
impl Debug for DumpFileLoggingMode
source§impl Default for DumpFileLoggingMode
impl Default for DumpFileLoggingMode
source§impl Extend<DumpFileLoggingMode> for DumpFileLoggingMode
impl Extend<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl FromIterator<DumpFileLoggingMode> for DumpFileLoggingMode
impl FromIterator<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
source§impl Hash for DumpFileLoggingMode
impl Hash for DumpFileLoggingMode
source§impl LowerHex for DumpFileLoggingMode
impl LowerHex for DumpFileLoggingMode
source§impl Not for DumpFileLoggingMode
impl Not for DumpFileLoggingMode
source§impl Octal for DumpFileLoggingMode
impl Octal for DumpFileLoggingMode
source§impl Ord for DumpFileLoggingMode
impl Ord for DumpFileLoggingMode
source§fn cmp(&self, other: &DumpFileLoggingMode) -> Ordering
fn cmp(&self, other: &DumpFileLoggingMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<DumpFileLoggingMode> for DumpFileLoggingMode
impl PartialEq<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn eq(&self, other: &DumpFileLoggingMode) -> bool
fn eq(&self, other: &DumpFileLoggingMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DumpFileLoggingMode> for DumpFileLoggingMode
impl PartialOrd<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn partial_cmp(&self, other: &DumpFileLoggingMode) -> Option<Ordering>
fn partial_cmp(&self, other: &DumpFileLoggingMode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<DumpFileLoggingMode> for DumpFileLoggingMode
impl Sub<DumpFileLoggingMode> for DumpFileLoggingMode
source§impl SubAssign<DumpFileLoggingMode> for DumpFileLoggingMode
impl SubAssign<DumpFileLoggingMode> for DumpFileLoggingMode
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.