pyo3::impl_::wrap

Struct IntoPyObjectConverter

Source
pub struct IntoPyObjectConverter<T>(IntoPyConverter<T>);

Tuple Fields§

§0: IntoPyConverter<T>

Implementations§

Source§

impl<'py, T: IntoPyObject<'py>> IntoPyObjectConverter<T>

Source

pub fn wrap(&self, obj: T) -> Result<T, Infallible>

Source§

impl<'py, T: IntoPyObject<'py>, E> IntoPyObjectConverter<Result<T, E>>

Source

pub fn wrap(&self, obj: Result<T, E>) -> Result<T, E>

Source

pub fn map_into_pyobject( &self, py: Python<'py>, obj: PyResult<T>, ) -> PyResult<PyObject>
where T: IntoPyObject<'py>,

Source

pub fn map_into_ptr( &self, py: Python<'py>, obj: PyResult<T>, ) -> PyResult<*mut PyObject>
where T: IntoPyObject<'py>,

Methods from Deref<Target = IntoPyConverter<T>>§

Source

pub fn wrap(&self, obj: T) -> Result<T, Infallible>

Source

pub fn wrap(&self, obj: Result<T, E>) -> Result<T, E>

Source

pub fn map_into_pyobject( &self, py: Python<'_>, obj: PyResult<T>, ) -> PyResult<PyObject>

Source

pub fn map_into_ptr( &self, py: Python<'_>, obj: PyResult<T>, ) -> PyResult<*mut PyObject>

Methods from Deref<Target = UnknownReturnResultType<T>>§

Source

pub fn wrap<'py>(&self, _: Result<T, E>) -> Result<T, E>
where T: IntoPyObject<'py>,

Methods from Deref<Target = UnknownReturnType<T>>§

Source

pub fn wrap<'py>(&self, _: T) -> T
where T: IntoPyObject<'py>,

Source

pub fn map_into_pyobject<'py>( &self, _: Python<'py>, _: PyResult<T>, ) -> PyResult<PyObject>
where T: IntoPyObject<'py>,

Source

pub fn map_into_ptr<'py>( &self, _: Python<'py>, _: PyResult<T>, ) -> PyResult<*mut PyObject>
where T: IntoPyObject<'py>,

Trait Implementations§

Source§

impl<T> Deref for IntoPyObjectConverter<T>

Source§

type Target = IntoPyConverter<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<T> Freeze for IntoPyObjectConverter<T>

§

impl<T> RefUnwindSafe for IntoPyObjectConverter<T>
where T: RefUnwindSafe,

§

impl<T> Send for IntoPyObjectConverter<T>
where T: Send,

§

impl<T> Sync for IntoPyObjectConverter<T>
where T: Sync,

§

impl<T> Unpin for IntoPyObjectConverter<T>
where T: Unpin,

§

impl<T> UnwindSafe for IntoPyObjectConverter<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AssertNotZeroSized for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
Available on non-bootstrap only.
The target type on which the method may be called.
Source§

impl<T> SizedTypeProperties for T

Source§

#[doc(hidden)] const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
Source§

#[doc(hidden)] const LAYOUT: Layout = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

impl<T> SomeWrap<T> for T

Source§

fn wrap(self) -> Option<T>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> PyClassSync for T
where T: Sync,

Source§

impl<T> Ungil for T
where T: Send,

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here