You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guide/pyclass-parameters.md
-1
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,6 @@
21
21
|`set_all`| Generates setters for all fields of the pyclass. |
22
22
|`str`| Implements `__str__` using the `Display` implementation of the underlying Rust datatype or by passing an optional format string `str="<format string>"`. *Note: The optional format string is only allowed for structs. `name` and `rename_all` are incompatible with the optional format string. Additional details can be found in the discussion on this [PR](https://github.com/PyO3/pyo3/pull/4233).*|
23
23
|`subclass`| Allows other Python classes and `#[pyclass]` to inherit from this class. Enums cannot be subclassed. |
24
-
| <spanstyle="white-space: pre">`text_signature = "(arg1, arg2, ...)"`</span> | Sets the text signature for the Python class' `__new__` method. |
25
24
|`unsendable`| Required if your struct is not [`Send`][params-3]. Rather than using `unsendable`, consider implementing your struct in a thread-safe way by e.g. substituting [`Rc`][params-4] with [`Arc`][params-5]. By using `unsendable`, your class will panic when accessed by another thread. Also note the Python's GC is multi-threaded and while unsendable classes will not be traversed on foreign threads to avoid UB, this can lead to memory leaks. |
26
25
|`weakref`| Allows this class to be [weakly referenceable][params-6]. |
0 commit comments