Struct TzClass

Source
pub struct TzClass {}

Implementations§

Source§

impl TzClass

Source§

impl TzClass

Source

#[doc(hidden)] pub const _PYO3_DEF: AddClassToModule<Self>

Source§

impl TzClass

Source§

impl TzClass

Source

fn new() -> Self

Source

fn utcoffset<'py>( &self, dt: &Bound<'py, PyDateTime>, ) -> PyResult<Bound<'py, PyDelta>>

Source

fn tzname(&self, _dt: &Bound<'_, PyDateTime>) -> String

Source

fn dst<'py>(&self, _dt: &Bound<'py, PyDateTime>) -> Option<Bound<'py, PyDelta>>

Source§

impl TzClass

Source

unsafe fn __pymethod___new____( py: Python<'_>, _slf: *mut PyTypeObject, _args: *mut PyObject, _kwargs: *mut PyObject, ) -> PyResult<*mut PyObject>

Source

unsafe fn __pymethod_utcoffset__<'py>( py: Python<'py>, _slf: *mut PyObject, _args: *const *mut PyObject, _nargs: Py_ssize_t, _kwnames: *mut PyObject, ) -> PyResult<*mut PyObject>

Source

unsafe fn __pymethod_tzname__<'py>( py: Python<'py>, _slf: *mut PyObject, _args: *const *mut PyObject, _nargs: Py_ssize_t, _kwnames: *mut PyObject, ) -> PyResult<*mut PyObject>

Source

unsafe fn __pymethod_dst__<'py>( py: Python<'py>, _slf: *mut PyObject, _args: *const *mut PyObject, _nargs: Py_ssize_t, _kwnames: *mut PyObject, ) -> PyResult<*mut PyObject>

Trait Implementations§

Source§

impl PyClass for TzClass

Source§

type Frozen = False

Whether the pyclass is frozen. Read more
Source§

impl PyClassImpl for TzClass

Source§

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = true

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

type BaseType = PyTzInfo

Base class
Source§

type ThreadChecker = SendablePyClass<TzClass>

This handles following two situations: Read more
Source§

type PyClassMutability = <<PyTzInfo as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = <<TzClass as PyClassImpl>::BaseType as PyClassBaseType>::BaseNativeType

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn doc(py: Python<'_>) -> PyResult<&'static CStr>

Rendered class doc
Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

§

fn dict_offset() -> Option<isize>

§

fn weaklist_offset() -> Option<isize>

Source§

impl PyClassNewTextSignature<TzClass> for PyClassImplCollector<TzClass>

Source§

fn new_text_signature(self) -> Option<&'static str>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a TzClass

Source§

type Holder = Option<PyRef<'py, TzClass>>

Source§

fn extract( obj: &'a Bound<'py, PyAny>, holder: &'a mut Self::Holder, ) -> PyResult<Self>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut TzClass

Source§

type Holder = Option<PyRefMut<'py, TzClass>>

Source§

fn extract( obj: &'a Bound<'py, PyAny>, holder: &'a mut Self::Holder, ) -> PyResult<Self>

Source§

impl PyMethods<TzClass> for PyClassImplCollector<TzClass>

Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl PyTypeInfo for TzClass

Source§

const NAME: &'static str = "TzClass"

Class name.
Source§

const MODULE: Option<&'static str> = ::core::option::Option::None

Module name, if any.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
§

fn type_object(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
§

fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>

👎Deprecated since 0.23.0: renamed to PyTypeInfo::type_object
Deprecated name for [PyTypeInfo::type_object].
§

fn is_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
§

fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool

👎Deprecated since 0.23.0: renamed to PyTypeInfo::is_type_of
Deprecated name for [PyTypeInfo::is_type_of].
§

fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
§

fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool

👎Deprecated since 0.23.0: renamed to PyTypeInfo::is_exact_type_of
Deprecated name for [PyTypeInfo::is_exact_type_of].
Source§

impl DerefToPyAny for TzClass

Auto Trait Implementations§

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> 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
§

impl<T, U> IntoPyCallbackOutput<'_, PyClassInitializer<T>> for U
where T: PyClass, U: Into<PyClassInitializer<T>>,

§

fn convert(self, _py: Python<'_>) -> Result<PyClassInitializer<T>, PyErr>

§

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

§

const NAME: &'static str = <T as PyTypeInfo>::NAME

Name of self. This is used in error messages, for example.
§

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
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§

#[doc(hidden)] const MAX_SLICE_LEN: usize = _

🔬This is a nightly-only experimental API. (sized_type_properties)
The largest safe length for a [Self]. Read more
§

impl<T> SomeWrap<T> for T

§

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.
§

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

§

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

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