pub struct PyArrowType<T>(pub T);
Expand description
A newtype wrapper for types implementing FromPyArrow
or IntoPyArrow
.
When wrapped around a type T: FromPyArrow
, it
implements FromPyObject
for the PyArrow objects. When wrapped around a
T: IntoPyArrow
, it implements IntoPy<PyObject>
for the wrapped type.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T> Debug for PyArrowType<T>where
T: Debug,
impl<T> Debug for PyArrowType<T>where
T: Debug,
Source§impl<T> From<T> for PyArrowType<T>
impl<T> From<T> for PyArrowType<T>
Source§fn from(s: T) -> PyArrowType<T>
fn from(s: T) -> PyArrowType<T>
Converts to this type from the input type.
Source§impl<'source, T> FromPyObject<'source> for PyArrowType<T>where
T: FromPyArrow,
impl<'source, T> FromPyObject<'source> for PyArrowType<T>where
T: FromPyArrow,
Source§fn extract_bound(value: &Bound<'source, PyAny>) -> Result<PyArrowType<T>, PyErr>
fn extract_bound(value: &Bound<'source, PyAny>) -> Result<PyArrowType<T>, PyErr>
Source§impl<'py, T> IntoPyObject<'py> for PyArrowType<T>where
T: IntoPyArrow,
impl<'py, T> IntoPyObject<'py> for PyArrowType<T>where
T: IntoPyArrow,
Source§type Output = Bound<'py, <PyArrowType<T> as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyArrowType<T> as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<PyArrowType<T> as IntoPyObject<'py>>::Output, PyErr>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<PyArrowType<T> as IntoPyObject<'py>>::Output, PyErr>
Performs the conversion.
Auto Trait Implementations§
impl<T> Freeze for PyArrowType<T>where
T: Freeze,
impl<T> RefUnwindSafe for PyArrowType<T>where
T: RefUnwindSafe,
impl<T> Send for PyArrowType<T>where
T: Send,
impl<T> Sync for PyArrowType<T>where
T: Sync,
impl<T> Unpin for PyArrowType<T>where
T: Unpin,
impl<T> UnwindSafe for PyArrowType<T>where
T: UnwindSafe,
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<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
Converts
self
into an owned Python object, dropping type information.