Reword python wrapping types

This commit is contained in:
Erik Johnston
2026-08-13 16:46:59 +01:00
parent d10e22b49b
commit 94d107d6cd
2 changed files with 5 additions and 8 deletions
+3 -4
View File
@@ -22,10 +22,9 @@ use crate::runtime::RustRuntime;
/// The Python `HomeServer`, as seen from Rust.
///
/// Like [`crate::reactor::Reactor`], this is a typed facade over a foreign
/// Python object. It does no validation of the object it wraps (the Python
/// side is type-checked by mypy), but it is the single place that names the
/// `HomeServer` API surface that Rust code depends on.
/// Like [`crate::reactor::Reactor`], this is a wrapper around a foreign Python
/// object. No validation is performed, on the assumption the Python side is
/// correctly typed.
pub struct HomeServer(Py<PyAny>);
impl<'a, 'py> FromPyObject<'a, 'py> for HomeServer {
+2 -4
View File
@@ -19,10 +19,8 @@ use pyo3::{call::PyCallArgs, intern, prelude::*};
/// The Twisted reactor, as seen from Rust.
///
/// A typed facade over a foreign Python object. It does no validation of the
/// object it wraps (the Python side is type-checked by mypy), but it is the
/// single place that names the Twisted API surface that Rust code depends
/// on.
/// This is a wrapper around a foreign Python object. No validation is
/// performed, on the assumption the Python side is correctly typed.
pub struct Reactor(Py<PyAny>);
impl<'a, 'py> FromPyObject<'a, 'py> for Reactor {