[−][src]Struct retworkx::PyDAG
Methods
impl PyDAG
[src]
pub fn edges(&self, py: Python) -> PyObject
[src]
pub fn nodes(&self, py: Python) -> PyObject
[src]
pub fn successors(&self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn predecessors(&self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn get_edge_data(&self, node_a: usize, node_b: usize) -> PyResult<&PyObject>
[src]
pub fn remove_node(&mut self, node: usize) -> PyResult<()>
[src]
pub fn add_edge(
&mut self,
parent: usize,
child: usize,
edge: PyObject
) -> PyResult<()>
[src]
&mut self,
parent: usize,
child: usize,
edge: PyObject
) -> PyResult<()>
pub fn add_node(&mut self, obj: PyObject) -> usize
[src]
pub fn add_child(
&mut self,
parent: usize,
obj: PyObject,
edge: PyObject
) -> usize
[src]
&mut self,
parent: usize,
obj: PyObject,
edge: PyObject
) -> usize
pub fn add_parent(
&mut self,
child: usize,
obj: PyObject,
edge: PyObject
) -> usize
[src]
&mut self,
child: usize,
obj: PyObject,
edge: PyObject
) -> usize
pub fn adj(&mut self, py: Python, node: usize) -> PyResult<PyObject>
[src]
pub fn adj_direction(
&mut self,
py: Python,
node: usize,
direction: bool
) -> PyResult<PyObject>
[src]
&mut self,
py: Python,
node: usize,
direction: bool
) -> PyResult<PyObject>
pub fn in_degree(&self, node: usize) -> usize
[src]
Trait Implementations
impl IntoPyObject for PyDAG
[src]
fn into_object(self, py: Python) -> PyObject
[src]
impl PyTypeInfo for PyDAG
[src]
type Type = PyDAG
Type of objects to store in PyObject struct
type BaseType = PyAny
Base class
const NAME: &'static str
[src]
const DESCRIPTION: &'static str
[src]
const FLAGS: usize
[src]
const SIZE: usize
[src]
const OFFSET: isize
[src]
unsafe fn type_object() -> &'static mut PyTypeObject
[src]
fn is_instance(object: &PyAny) -> bool
[src]
Check if *mut ffi::PyObject
is instance of this type
fn is_exact_instance(object: &PyAny) -> bool
[src]
Check if *mut ffi::PyObject
is exact instance of this type
impl PyMethodsInventoryDispatch for PyDAG
[src]
type InventoryType = PyDAGGeneratedPyo3Inventory
This allows us to get the inventory type when only the pyclass is in scope
impl PyObjectAlloc for PyDAG
[src]
unsafe fn alloc(_py: Python) -> *mut PyObject
[src]
unsafe fn dealloc(py: Python, obj: *mut PyObject)
[src]
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. Read more
unsafe fn drop(py: Python, obj: *mut PyObject)
[src]
Calls the rust destructor for the object.
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> PyTypeObject for T where
T: PyTypeInfo + PyMethodsProtocol + PyObjectAlloc,
[src]
T: PyTypeInfo + PyMethodsProtocol + PyObjectAlloc,
fn init_type() -> NonNull<PyTypeObject>
[src]
fn type_object() -> Py<PyType>
[src]
Returns the safe abstraction over the type object from [PyTypeObject::init_type]
impl<T> PyMethodsProtocol for T where
T: PyMethodsInventoryDispatch,
[src]
T: PyMethodsInventoryDispatch,
fn py_methods() -> Vec<&'static PyMethodDefType>
[src]
impl<T> FromPy<T> for T
[src]
impl<T, U> IntoPy<U> for T where
U: FromPy<T>,
[src]
U: FromPy<T>,
impl<'v, T> PyTryFrom<'v> for T where
T: PyTypeInfo,
[src]
T: PyTypeInfo,
fn try_from<V>(value: V) -> Result<&'v T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
fn try_from_exact<V>(value: V) -> Result<&'v T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
fn try_from_mut<V>(value: V) -> Result<&'v mut T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
fn try_from_mut_exact<V>(value: V) -> Result<&'v mut T, PyDowncastError> where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
unsafe fn try_from_unchecked<V>(value: V) -> &'v T where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
unsafe fn try_from_mut_unchecked<V>(value: V) -> &'v mut T where
V: Into<&'v PyAny>,
[src]
V: Into<&'v PyAny>,
impl<T> PyObjectAlloc for T where
T: PyObjectWithFreeList,
[src]
T: PyObjectWithFreeList,
unsafe fn alloc(_py: Python) -> *mut PyObject
[src]
unsafe fn dealloc(py: Python, obj: *mut PyObject)
[src]
unsafe fn drop(py: Python, obj: *mut PyObject)
[src]
Calls the rust destructor for the object.
impl<T> PyTypeCreate for T where
T: PyObjectAlloc + PyTypeObject,
[src]
T: PyObjectAlloc + PyTypeObject,