Struct FileNode

Source
pub struct FileNode { /* private fields */ }

Trait Implementations§

Source§

impl Clone for FileNode

Source§

fn clone(&self) -> FileNode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'source> FromPyObject<'source> for FileNode

Source§

fn extract(ob: &'source PyAny) -> PyResult<Self>

Extracts Self from the source PyObject.
Source§

impl IntoPy<PyObject> for FileNode

Source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
Source§

impl PyObjectAlloc for FileNode

Source§

unsafe fn alloc(_py: Python<'_>) -> *mut PyObject

Source§

unsafe fn dealloc(py: Python<'_>, obj: *mut PyObject)

Calls the rust destructor for the object and frees the memory (usually by calling ptr->ob_type->tp_free). This function is used as tp_dealloc implementation.
Source§

unsafe fn drop(py: Python<'_>, obj: *mut PyObject)

Calls the rust destructor for the object.
Source§

impl PyTypeInfo for FileNode

Source§

const NAME: &'static str = "FileNode"

Class name
Source§

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

Module name, if any
Source§

const DESCRIPTION: &'static str = "\u{0}"

Class doc string
Source§

const FLAGS: usize = 0usize

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)
Source§

const SIZE: usize = 432usize

Size of the rust PyObject structure (PyObject + rust structure)
Source§

const OFFSET: isize = 16isize

Type instance offset inside PyObject structure
Source§

type Type = FileNode

Type of objects to store in PyObject struct
Source§

type BaseType = PyAny

Base class
Source§

unsafe fn type_object() -> &'static mut PyTypeObject

PyTypeObject instance for this type, which might still need to be initialized
Source§

fn is_instance(object: &PyAny) -> bool

Check if *mut ffi::PyObject is instance of this type
Source§

fn is_exact_instance(object: &PyAny) -> bool

Check if *mut ffi::PyObject is exact instance of this type

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromPy<T> for T

Source§

fn from_py(t: T, _: Python<'_>) -> T

Performs the conversion.
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> IntoPy<U> for T
where U: FromPy<T>,

Source§

default fn into_py(self, py: Python<'_>) -> U

Performs the conversion.
Source§

impl<T> PyMethodsProtocol for T
where T: PyMethodsInventoryDispatch,

Source§

fn py_methods() -> Vec<&'static PyMethodDefType>

Returns all methods that are defined for a class
Source§

impl<'v, T> PyTryFrom<'v> for T
where T: PyTypeInfo,

Source§

fn try_from<V>(value: V) -> Result<&'v T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject.
Source§

fn try_from_exact<V>(value: V) -> Result<&'v T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject. With exact type check.
Source§

fn try_from_mut<V>(value: V) -> Result<&'v mut T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject.
Source§

fn try_from_mut_exact<V>(value: V) -> Result<&'v mut T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject. With exact type check.
Source§

unsafe fn try_from_unchecked<V>(value: V) -> &'v T
where V: Into<&'v PyAny>,

Cast a PyAny to a specific type of PyObject. The caller must have already verified the reference is for this type.
Source§

unsafe fn try_from_mut_unchecked<V>(value: V) -> &'v mut T
where V: Into<&'v PyAny>,

Cast a PyAny to a specific type of PyObject. The caller must have already verified the reference is for this type.
Source§

impl<T> PyTypeCreate for T

Source§

fn create(py: Python<'_>) -> Result<PyRawObject, PyErr>

Create PyRawObject which can be initialized with rust value
Source§

impl<T> PyTypeObject for T

Source§

fn init_type() -> NonNull<PyTypeObject>

This function must make sure that the corresponding type object gets initialized exactly once and return it.
Source§

fn type_object() -> Py<PyType>

Returns the safe abstraction over the type object from PyTypeObject::init_type
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.