mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-22 23:10:17 +00:00
Reword python wrapping types
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user