pub struct PythonObject(pub PyObject);
Available on crate feature
python
only.Expand description
Wrapper around PyObject from pyo3 with additional trait impls.
Tuple Fields§
§0: PyObject
Implementations§
Source§impl PythonObject
impl PythonObject
pub fn serialize_with_pyversion<T, S>( value: &T, serializer: S, ) -> Result<S::Ok, S::Error>
Available on crate feature
serde
only.pub fn deserialize_with_pyversion<'de, T, D>(d: D) -> Result<T, D::Error>
Available on crate feature
serde
only.Trait Implementations§
Source§impl Clone for PythonObject
impl Clone for PythonObject
Source§impl Debug for PythonObject
impl Debug for PythonObject
Source§impl Deref for PythonObject
impl Deref for PythonObject
Source§impl DerefMut for PythonObject
impl DerefMut for PythonObject
Source§impl<'a> Deserialize<'a> for PythonObject
Available on crate feature serde
only.
impl<'a> Deserialize<'a> for PythonObject
Available on crate feature
serde
only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Py<PyAny>> for PythonObject
impl From<Py<PyAny>> for PythonObject
Source§impl PartialEq for PythonObject
impl PartialEq for PythonObject
Source§impl Serialize for PythonObject
Available on crate feature serde
only.
impl Serialize for PythonObject
Available on crate feature
serde
only.Source§impl TrySerializeToBytes for PythonObject
Available on crate feature serde
only.
impl TrySerializeToBytes for PythonObject
Available on crate feature
serde
only.fn try_serialize_to_bytes(&self) -> PolarsResult<Vec<u8>>
fn try_deserialize_bytes(bytes: &[u8]) -> PolarsResult<Self>
impl Eq for PythonObject
Auto Trait Implementations§
impl Freeze for PythonObject
impl !RefUnwindSafe for PythonObject
impl Send for PythonObject
impl Sync for PythonObject
impl Unpin for PythonObject
impl UnwindSafe for PythonObject
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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 more