Struct rustypy::pytypes::pybool::PyBool
[−]
[src]
pub struct PyBool { /* fields omitted */ }
Analog to a Python boolean type.
Read the module docs for more information.
Methods
impl PyBool
[src]
unsafe fn from_ptr(ptr: *mut PyBool) -> PyBool
Get a PyBool from a previously boxed raw pointer.
unsafe fn from_ptr_into_bool(ptr: *mut PyBool) -> bool
Creates a bool from a raw pointer to a PyBool.
fn to_bool(&self) -> bool
Conversion from PyBool to bool.
fn as_ptr(self) -> *mut PyBool
Returns PyBool as a raw pointer. Use this whenever you want to return a PyBool to Python.
fn load(&mut self, v: bool)
Sets value of the underlying bool
Trait Implementations
impl Clone for PyBool
[src]
fn clone(&self) -> PyBool
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for PyBool
[src]
impl PartialEq for PyBool
[src]
fn eq(&self, __arg_0: &PyBool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PyBool) -> bool
This method tests for !=
.
impl Eq for PyBool
[src]
impl Hash for PyBool
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Copy for PyBool
[src]
impl From<bool> for PyBool
[src]
impl<'a> From<&'a bool> for PyBool
[src]
impl From<i8> for PyBool
[src]
impl PartialEq<bool> for PyBool
[src]
fn eq(&self, other: &bool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<'a> PartialEq<bool> for &'a PyBool
[src]
fn eq(&self, other: &bool) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Not for PyBool
[src]
type Output = bool
The resulting type after applying the !
operator
fn not(self) -> bool
The method for the unary !
operator
impl BitAnd<bool> for PyBool
[src]
type Output = bool
The resulting type after applying the &
operator
fn bitand(self, rhs: bool) -> bool
The method for the &
operator
impl<'a> BitAnd<bool> for &'a PyBool
[src]
type Output = bool
The resulting type after applying the &
operator
fn bitand(self, rhs: bool) -> bool
The method for the &
operator
impl<'a> BitAnd<&'a bool> for PyBool
[src]
type Output = bool
The resulting type after applying the &
operator
fn bitand(self, rhs: &'a bool) -> bool
The method for the &
operator
impl<'a, 'b> BitAnd<&'a bool> for &'b PyBool
[src]
type Output = bool
The resulting type after applying the &
operator
fn bitand(self, rhs: &'a bool) -> bool
The method for the &
operator
impl BitOr<bool> for PyBool
[src]
type Output = bool
The resulting type after applying the |
operator
fn bitor(self, rhs: bool) -> bool
The method for the |
operator
impl<'a> BitOr<bool> for &'a PyBool
[src]
type Output = bool
The resulting type after applying the |
operator
fn bitor(self, rhs: bool) -> bool
The method for the |
operator
impl<'a> BitOr<&'a bool> for PyBool
[src]
type Output = bool
The resulting type after applying the |
operator
fn bitor(self, rhs: &'a bool) -> bool
The method for the |
operator
impl<'a, 'b> BitOr<&'a bool> for &'b PyBool
[src]
type Output = bool
The resulting type after applying the |
operator
fn bitor(self, rhs: &'a bool) -> bool
The method for the |
operator