[−]Struct pyconnect6::macro_def::PyPolicy
Methods
impl PyPolicy
pub fn __call__(
&self,
py: Python,
_turn: PyObject,
boards: PyObject
) -> PyResult<PyObject>
&self,
py: Python,
_turn: PyObject,
boards: PyObject
) -> PyResult<PyObject>
Trait Implementations
impl PythonObject for PyPolicy
fn as_object(&self) -> &PyObject
fn into_object(self) -> PyObject
unsafe fn unchecked_downcast_from(obj: PyObject) -> Self
Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.
unsafe fn unchecked_downcast_borrow_from<'a>(obj: &'a PyObject) -> &'a Self
Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.
impl PythonObjectWithCheckedDowncast for PyPolicy
fn downcast_from<'p>(
py: Python<'p>,
obj: PyObject
) -> Result<PyPolicy, PythonObjectDowncastError<'p>>
py: Python<'p>,
obj: PyObject
) -> Result<PyPolicy, PythonObjectDowncastError<'p>>
fn downcast_borrow_from<'a, 'p>(
py: Python<'p>,
obj: &'a PyObject
) -> Result<&'a PyPolicy, PythonObjectDowncastError<'p>>
py: Python<'p>,
obj: &'a PyObject
) -> Result<&'a PyPolicy, PythonObjectDowncastError<'p>>
impl PythonObjectWithTypeObject for PyPolicy
fn type_object(py: Python) -> PyType
impl ToPyObject for PyPolicy
Identity conversion: allows using existing PyObject
instances where
T: ToPyObject
is expected.
type ObjectType = PyPolicy
fn to_py_object(&self, py: Python) -> PyPolicy
fn into_py_object(self, _py: Python) -> PyPolicy
fn with_borrowed_ptr<F, R>(&self, _py: Python, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,
F: FnOnce(*mut PyObject) -> R,
impl<'source> FromPyObject<'source> for PyPolicy
impl<'source> FromPyObject<'source> for &'source PyPolicy
impl PythonObjectFromPyClassMacro for PyPolicy
fn initialize(py: Python, module_name: Option<&str>) -> PyResult<PyType>
fn add_to_module(py: Python, module: &PyModule) -> PyResult<()>
impl BaseObject for PyPolicy
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T> Erased for T
impl<T> PyClone for T where
T: PythonObject,
T: PythonObject,
fn clone_ref(&self, py: Python) -> T
impl<T> PyDrop for T where
T: PythonObject,
T: PythonObject,
fn release_ref(self, _py: Python)
impl<T> RefFromPyObject for T where
T: ?Sized,
&'a T: FromPyObject<'a>,
T: ?Sized,
&'a T: FromPyObject<'a>,
fn with_extracted<F, R>(py: Python, obj: &PyObject, f: F) -> Result<R, PyErr> where
F: FnOnce(&T) -> R,
F: FnOnce(&T) -> R,