pub enum BytesWarning {
    None = 0,
    Warn = 1,
    Raise = 2,
}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 = 0
Do nothing.
Serialization value: none
Warn = 1
Issue a warning.
Serialization value: warn
Raise = 2
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 duplicate 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<BytesWarning> for String
 
impl From<BytesWarning> for String
Source§fn from(v: BytesWarning) -> Self
 
fn from(v: BytesWarning) -> Self
Converts to this type from the input type.
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 for BytesWarning
 
impl PartialEq for BytesWarning
Source§impl ToString for BytesWarning
 
impl ToString for BytesWarning
Source§impl TryFrom<&str> for BytesWarning
 
impl TryFrom<&str> for BytesWarning
Source§impl TryFrom<String> for BytesWarning
 
impl TryFrom<String> for BytesWarning
impl Copy for BytesWarning
impl Eq for BytesWarning
impl StructuralPartialEq for BytesWarning
Auto Trait Implementations§
impl Freeze for BytesWarning
impl RefUnwindSafe for BytesWarning
impl Send for BytesWarning
impl Sync for BytesWarning
impl Unpin for BytesWarning
impl UnwindSafe for BytesWarning
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more