MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / new

Method new

src/sharedref.rs:91–96  ·  view source on GitHub ↗

Creates a new `PySharedRefCell` containing `value`. can be "const fn" since Rust 1.31.0

(value: T)

Source from the content-addressed store, hash-verified

89 /// Creates a new `PySharedRefCell` containing `value`.
90 // can be "const fn" since Rust 1.31.0
91 pub fn new(value: T) -> PySharedRefCell<T> {
92 Self {
93 state: PySharedState::new(),
94 data: RefCell::new(value),
95 }
96 }
97}
98
99/// A reference to `PySharedRefCell` owned by a Python object.

Callers

nothing calls this directly

Calls 1

increase_borrow_countMethod · 0.80

Tested by

no test coverage detected