Struct cpython::exc::UnicodeDecodeError
[−]
[src]
pub struct UnicodeDecodeError(_);
Methods
impl UnicodeDecodeError
[src]
fn new(
py: Python,
encoding: &CStr,
input: &[u8],
range: Range<usize>,
reason: &CStr
) -> PyResult<UnicodeDecodeError>
[src]
py: Python,
encoding: &CStr,
input: &[u8],
range: Range<usize>,
reason: &CStr
) -> PyResult<UnicodeDecodeError>
fn new_utf8(
py: Python,
input: &[u8],
err: Utf8Error
) -> PyResult<UnicodeDecodeError>
[src]
py: Python,
input: &[u8],
err: Utf8Error
) -> PyResult<UnicodeDecodeError>
Trait Implementations
impl ToPyObject for UnicodeDecodeError
[src]
Identity conversion: allows using existing PyObject
instances where
T: ToPyObject
is expected.
type ObjectType = UnicodeDecodeError
fn to_py_object(&self, py: Python) -> UnicodeDecodeError
[src]
Converts self into a Python object.
fn into_py_object(self, _py: Python) -> UnicodeDecodeError
[src]
Converts self into a Python object. Read more
fn with_borrowed_ptr<F, R>(&self, _py: Python, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,
[src]
F: FnOnce(*mut PyObject) -> R,
Converts self into a Python object and calls the specified closure on the native FFI pointer underlying the Python object. Read more
impl<'source> FromPyObject<'source> for UnicodeDecodeError
[src]
fn extract(py: Python, obj: &'source PyObject) -> PyResult<UnicodeDecodeError>
[src]
Extracts Self
from the source PyObject
.
impl<'source> FromPyObject<'source> for &'source UnicodeDecodeError
[src]
fn extract(
py: Python,
obj: &'source PyObject
) -> PyResult<&'source UnicodeDecodeError>
[src]
py: Python,
obj: &'source PyObject
) -> PyResult<&'source UnicodeDecodeError>
Extracts Self
from the source PyObject
.
impl PythonObject for UnicodeDecodeError
[src]
fn as_object(&self) -> &PyObject
[src]
Casts the Python object to PyObject.
fn into_object(self) -> PyObject
[src]
Casts the Python object to PyObject.
unsafe fn unchecked_downcast_from(obj: PyObject) -> Self
[src]
Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.
unsafe fn unchecked_downcast_borrow_from<'a>(obj: &'a PyObject) -> &'a Self
[src]
Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.
impl PythonObjectWithCheckedDowncast for UnicodeDecodeError
[src]
fn downcast_from<'p>(
py: Python<'p>,
obj: PyObject
) -> Result<UnicodeDecodeError, PythonObjectDowncastError<'p>>
[src]
py: Python<'p>,
obj: PyObject
) -> Result<UnicodeDecodeError, PythonObjectDowncastError<'p>>
Cast from PyObject to a concrete Python object type.
fn downcast_borrow_from<'a, 'p>(
py: Python<'p>,
obj: &'a PyObject
) -> Result<&'a UnicodeDecodeError, PythonObjectDowncastError<'p>>
[src]
py: Python<'p>,
obj: &'a PyObject
) -> Result<&'a UnicodeDecodeError, PythonObjectDowncastError<'p>>
Cast from PyObject to a concrete Python object type.
impl PythonObjectWithTypeObject for UnicodeDecodeError
[src]
fn type_object(py: Python) -> PyType
[src]
Retrieves the type object for this Python object type.