Struct rustypy::pytypes::pystring::PyString
[−]
[src]
pub struct PyString { /* fields omitted */ }
An analog of a Python string.
Read the module docs for more information.
Methods
impl PyString
[src]
unsafe fn from_ptr(ptr: *mut PyString) -> PyString
Get a PyString from a previously boxed raw pointer.
fn to_string(&self) -> String
Constructs an owned String from a PyString.
unsafe fn from_ptr_to_string(ptr: *mut PyString) -> String
Constructs an owned String from a raw pointer.
fn as_ptr(self) -> *mut PyString
Returns PyString as a raw pointer. Use this whenever you want to return a PyString to Python.
unsafe fn from_raw(ptr: *const c_char) -> PyString
Return a PyString from a raw char pointer.
Trait Implementations
impl Clone for PyString
[src]
fn clone(&self) -> PyString
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 PyString
[src]
impl PartialEq for PyString
[src]
fn eq(&self, __arg_0: &PyString) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PyString) -> bool
This method tests for !=
.
impl Eq for PyString
[src]
impl Hash for PyString
[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