Enum pyembed::BytesWarning
source · pub enum BytesWarning {
None,
Warn,
Raise,
}
Expand description
Defines what to do when comparing bytes
or bytesarray
with str
or comparing bytes
with int
.
See https://docs.python.org/3/c-api/init_config.html#c.PyConfig.bytes_warning.
Serialization type: string
Variants§
None
Do nothing.
Serialization value: none
Warn
Issue a warning.
Serialization value: warn
Raise
Raise a BytesWarning
.
Serialization value: raise
Trait Implementations§
source§impl Clone for BytesWarning
impl Clone for BytesWarning
source§fn clone(&self) -> BytesWarning
fn clone(&self) -> BytesWarning
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 BytesWarning
impl Debug for BytesWarning
source§impl From<i32> for BytesWarning
impl From<i32> for BytesWarning
source§fn from(value: i32) -> BytesWarning
fn from(value: i32) -> BytesWarning
Converts to this type from the input type.
source§impl PartialEq<BytesWarning> for BytesWarning
impl PartialEq<BytesWarning> for BytesWarning
source§fn eq(&self, other: &BytesWarning) -> bool
fn eq(&self, other: &BytesWarning) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.