Mention pub class in the documentation.

This commit is contained in:
Daniel Grunwald 2017-01-19 21:56:06 +01:00
parent 06cab0a925
commit fbe1a07d10

View file

@ -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.