MCPcopy Index your code
hub / github.com/RustPython/RustPython / num_tickets

Method num_tickets

crates/stdlib/src/openssl.rs:1307–1319  ·  view source on GitHub ↗
(&self, _vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1305
1306 #[pygetset]
1307 fn num_tickets(&self, _vm: &VirtualMachine) -> PyResult<usize> {
1308 // Only supported for TLS 1.3
1309 #[cfg(ossl110)]
1310 {
1311 let ctx = self.ctx();
1312 let num = unsafe { sys::SSL_CTX_get_num_tickets(ctx.as_ptr()) };
1313 Ok(num)
1314 }
1315 #[cfg(not(ossl110))]
1316 {
1317 Ok(0)
1318 }
1319 }
1320 #[pygetset(setter)]
1321 fn set_num_tickets(&self, value: isize, vm: &VirtualMachine) -> PyResult<()> {
1322 // Check for negative values

Callers

nothing calls this directly

Calls 2

ctxMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected