# PyWeakReference in pyo3::ffi - Rust
API documentation for the Rust `PyWeakReference` struct in crate `pyo3`.

pyo3::ffi

# Struct PyWeakReference

Source

    pub struct PyWeakReference {
        pub ob_base: PyObject,
        pub wr_object: *mut PyObject,
        pub wr_callback: *mut PyObject,
        pub hash: isize,
        pub wr_prev: *mut _PyWeakReference,
        pub wr_next: *mut _PyWeakReference,
        pub vectorcall: Option<unsafe extern "C" fn(_: *mut PyObject, _: *const *mut PyObject, _: usize, _: *mut PyObject) -> *mut PyObject>,
    }

## Fields§

§ `ob_base: PyObject` § `wr_object: *mut PyObject` § `wr_callback: *mut PyObject` § `hash: isize` § `wr_prev: *mut _PyWeakReference` § `wr_next: *mut _PyWeakReference` § `vectorcall: Option<unsafe extern "C" fn(_: *mut PyObject, _: *const *mut PyObject, _: usize, _: *mut PyObject) -> *mut PyObject>`

## Trait Implementations§

Source §

### impl PyLayout<PyWeakrefReference> for PyWeakReference

Source §

### impl PySizedLayout<PyWeakrefReference> for PyWeakReference

## Auto Trait Implementations§

§

### impl Freeze for _PyWeakReference

§

### impl RefUnwindSafe for _PyWeakReference

§

### impl !Send for _PyWeakReference

§

### impl !Sync for _PyWeakReference

§

### impl Unpin for _PyWeakReference

§

### impl UnwindSafe for _PyWeakReference

## 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, 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.