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

Method id

crates/stdlib/src/openssl.rs:3713–3720  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

3711
3712 #[pygetset]
3713 fn id(&self, vm: &VirtualMachine) -> PyBytesRef {
3714 unsafe {
3715 let mut len: libc::c_uint = 0;
3716 let id_ptr = sys::SSL_SESSION_get_id(self.session, &mut len);
3717 let id_slice = std::slice::from_raw_parts(id_ptr, len as usize);
3718 vm.ctx.new_bytes(id_slice.to_vec())
3719 }
3720 }
3721
3722 #[pygetset]
3723 fn has_ticket(&self) -> bool {

Callers

nothing calls this directly

Calls 2

to_vecMethod · 0.80
new_bytesMethod · 0.45

Tested by

no test coverage detected