Trait pyo3::class::context::PyContextProtocol [−][src]
pub trait PyContextProtocol<'p>: PyTypeInfo { fn __enter__(&'p mut self) -> Self::Result
where
Self: PyContextEnterProtocol<'p>, { ... } fn __exit__(
&'p mut self,
exc_type: Option<Self::ExcType>,
exc_value: Option<Self::ExcValue>,
traceback: Option<Self::Traceback>
) -> Self::Result
where
Self: PyContextExitProtocol<'p>, { ... } }
Context manager interface
Provided Methods
fn __enter__(&'p mut self) -> Self::Result where
Self: PyContextEnterProtocol<'p>,
Self: PyContextEnterProtocol<'p>,
fn __exit__(
&'p mut self,
exc_type: Option<Self::ExcType>,
exc_value: Option<Self::ExcValue>,
traceback: Option<Self::Traceback>
) -> Self::Result where
Self: PyContextExitProtocol<'p>,
&'p mut self,
exc_type: Option<Self::ExcType>,
exc_value: Option<Self::ExcValue>,
traceback: Option<Self::Traceback>
) -> Self::Result where
Self: PyContextExitProtocol<'p>,