From fbe1a07d1029efeccf5e6a9244e666d99dfc22d1 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 19 Jan 2017 21:56:06 +0100 Subject: [PATCH] Mention `pub class` in the documentation. --- src/py_class/py_class.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/py_class/py_class.rs b/src/py_class/py_class.rs index b294d471..65acb067 100644 --- a/src/py_class/py_class.rs +++ b/src/py_class/py_class.rs @@ -23,8 +23,9 @@ Additionally, it generates a Rust struct of the same name, which allows accessin instances of that Python class from Rust. # Syntax -`py_class!(class MyType |py| { ... })` +`py_class!(pub class MyType |py| { ... })` +* `pub` makes the generated Rust struct visible outside the current module. It has no effect on the visibility from Python. * `MyType` is the name of the Python class. * `py` is an identifier that will be made available as a variable of type `Python` in all function bodies.