Struct numcodecs_python::PyCodec
source · pub struct PyCodec { /* private fields */ }
Expand description
Represents a numcodecs.abc.Codec
instance object.
The Bound<Codec>
type implements the PyCodecMethods
API.
Auto Trait Implementations§
impl !Freeze for PyCodec
impl !RefUnwindSafe for PyCodec
impl !Send for PyCodec
impl !Sync for PyCodec
impl Unpin for PyCodec
impl UnwindSafe for PyCodec
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<'p, T> FromPyPointer<'p> for Twhere
T: 'p + PyNativeType,
impl<'p, T> FromPyPointer<'p> for Twhere
T: 'p + PyNativeType,
source§unsafe fn from_owned_ptr_or_opt(
py: Python<'p>,
ptr: *mut PyObject,
) -> Option<&'p T>
unsafe fn from_owned_ptr_or_opt( py: Python<'p>, ptr: *mut PyObject, ) -> Option<&'p T>
👎Deprecated since 0.21.0: use
Py::from_owned_ptr_or_opt(py, ptr)
or Bound::from_owned_ptr_or_opt(py, ptr)
insteadConvert from an arbitrary
PyObject
. Read moresource§unsafe fn from_borrowed_ptr_or_opt(
_py: Python<'p>,
ptr: *mut PyObject,
) -> Option<&'p T>
unsafe fn from_borrowed_ptr_or_opt( _py: Python<'p>, ptr: *mut PyObject, ) -> Option<&'p T>
👎Deprecated since 0.21.0: use
Py::from_borrowed_ptr_or_opt(py, ptr)
or Bound::from_borrowed_ptr_or_opt(py, ptr)
insteadConvert from an arbitrary borrowed
PyObject
. Read moresource§unsafe fn from_owned_ptr_or_panic(
py: Python<'p>,
ptr: *mut PyObject,
) -> &'p Self
unsafe fn from_owned_ptr_or_panic( py: Python<'p>, ptr: *mut PyObject, ) -> &'p Self
👎Deprecated since 0.21.0: use
Py::from_owned_ptr(py, ptr)
or Bound::from_owned_ptr(py, ptr)
insteadConvert from an arbitrary
PyObject
or panic. Read moresource§unsafe fn from_owned_ptr(py: Python<'p>, ptr: *mut PyObject) -> &'p Self
unsafe fn from_owned_ptr(py: Python<'p>, ptr: *mut PyObject) -> &'p Self
👎Deprecated since 0.21.0: use
Py::from_owned_ptr(py, ptr)
or Bound::from_owned_ptr(py, ptr)
insteadConvert from an arbitrary
PyObject
or panic. Read moresource§unsafe fn from_owned_ptr_or_err(
py: Python<'p>,
ptr: *mut PyObject,
) -> Result<&'p Self, PyErr>
unsafe fn from_owned_ptr_or_err( py: Python<'p>, ptr: *mut PyObject, ) -> Result<&'p Self, PyErr>
👎Deprecated since 0.21.0: use
Py::from_owned_ptr_or_err(py, ptr)
or Bound::from_owned_ptr_or_err(py, ptr)
insteadConvert from an arbitrary
PyObject
. Read moresource§unsafe fn from_borrowed_ptr_or_panic(
py: Python<'p>,
ptr: *mut PyObject,
) -> &'p Self
unsafe fn from_borrowed_ptr_or_panic( py: Python<'p>, ptr: *mut PyObject, ) -> &'p Self
👎Deprecated since 0.21.0: use
Py::from_borrowed_ptr(py, ptr)
or Bound::from_borrowed_ptr(py, ptr)
insteadConvert from an arbitrary borrowed
PyObject
. Read moresource§impl<T> HasPyGilRef for Twhere
T: PyNativeType,
impl<T> HasPyGilRef for Twhere
T: PyNativeType,
source§type AsRefTarget = T
type AsRefTarget = T
Utility type to make Py::as_ref work.
source§impl<'v, T> PyTryFrom<'v> for Twhere
T: PyTypeInfo<AsRefTarget = T> + PyNativeType,
impl<'v, T> PyTryFrom<'v> for Twhere
T: PyTypeInfo<AsRefTarget = T> + PyNativeType,
source§fn try_from<V>(value: V) -> Result<&'v T, PyDowncastError<'v>>
fn try_from<V>(value: V) -> Result<&'v T, PyDowncastError<'v>>
👎Deprecated since 0.21.0: use
value.downcast::<T>()
instead of T::try_from(value)
Cast from a concrete Python object type to PyObject.
source§fn try_from_exact<V>(value: V) -> Result<&'v T, PyDowncastError<'v>>
fn try_from_exact<V>(value: V) -> Result<&'v T, PyDowncastError<'v>>
👎Deprecated since 0.21.0: use
value.downcast_exact::<T>()
instead of T::try_from_exact(value)
Cast from a concrete Python object type to PyObject. With exact type check.
source§unsafe fn try_from_unchecked<V>(value: V) -> &'v T
unsafe fn try_from_unchecked<V>(value: V) -> &'v T
👎Deprecated since 0.21.0: use
value.downcast_unchecked::<T>()
instead of T::try_from_unchecked(value)
Cast a PyAny to a specific type of PyObject. The caller must
have already verified the reference is for this type. Read more