[][src]Struct pyo3::types::PyDate

pub struct PyDate(_, _);

Bindings around datetime.date

Methods

impl PyDate[src]

pub fn new<'p>(
    py: Python<'p>,
    year: i32,
    month: u8,
    day: u8
) -> PyResult<&'p PyDate>
[src]

pub fn from_timestamp<'p>(
    py: Python<'p>,
    timestamp: i64
) -> PyResult<&'p PyDate>
[src]

Construct a datetime.date from a POSIX timestamp

This is equivalent to datetime.date.fromtimestamp

Trait Implementations

impl AsPyPointer for PyDate[src]

fn as_ptr(&self) -> *mut PyObject[src]

Gets the underlying FFI pointer, returns a borrowed pointer.

impl AsRef<PyAny> for PyDate[src]

impl Debug for PyDate[src]

impl Display for PyDate[src]

impl<'a> From<&'a PyDate> for &'a PyAny[src]

impl PartialEq<PyDate> for PyDate[src]

impl PyDateAccess for PyDate[src]

impl PyNativeType for PyDate[src]

impl PyObjectLayout<PyDate> for PyDateTime_Date[src]

impl PyObjectSizedLayout<PyDate> for PyDateTime_Date[src]

impl PyTypeInfo for PyDate[src]

type Type = ()

Type of objects to store in PyObject struct

type BaseType = PyAny

Base class

type ConcreteLayout = PyDateTime_Date

Layout

type Initializer = PyNativeTypeInitializer<Self>

Initializer for layout

impl PyTypeObject for PyDate[src]

impl ToPyObject for PyDate[src]

Auto Trait Implementations

impl !RefUnwindSafe for PyDate

impl !Send for PyDate

impl !Sync for PyDate

impl Unpin for PyDate

impl UnwindSafe for PyDate

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> PyTypeObject for T where
    T: PyClass
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.