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
sourceimpl Clone for BytesWarning
impl Clone for BytesWarning
sourcefn clone(&self) -> BytesWarning
fn clone(&self) -> BytesWarning
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BytesWarning
impl Debug for BytesWarning
sourceimpl From<i32> for BytesWarning
impl From<i32> for BytesWarning
sourcefn from(value: i32) -> BytesWarning
fn from(value: i32) -> BytesWarning
Converts to this type from the input type.
sourceimpl PartialEq<BytesWarning> for BytesWarning
impl PartialEq<BytesWarning> for BytesWarning
sourceimpl ToString for BytesWarning
impl ToString for BytesWarning
sourceimpl<'_> TryFrom<&'_ str> for BytesWarning
impl<'_> TryFrom<&'_ str> for BytesWarning
sourceimpl TryFrom<String> for BytesWarning
impl TryFrom<String> for BytesWarning
impl Copy for BytesWarning
impl StructuralPartialEq for BytesWarning
Auto Trait Implementations
impl RefUnwindSafe for BytesWarning
impl Send for BytesWarning
impl Sync for BytesWarning
impl Unpin for BytesWarning
impl UnwindSafe for BytesWarning
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more