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

Method set_alpn_protocols

crates/stdlib/src/ssl.rs:1485–1493  ·  view source on GitHub ↗
(&self, protocols: PyListRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1483
1484 #[pymethod]
1485 fn set_alpn_protocols(&self, protocols: PyListRef, vm: &VirtualMachine) -> PyResult<()> {
1486 let mut alpn_list = Vec::new();
1487 for item in protocols.borrow_vec().iter() {
1488 let bytes = ArgBytesLike::try_from_object(vm, item.clone())?;
1489 alpn_list.push(bytes.borrow_buf().to_vec());
1490 }
1491 *self.alpn_protocols.write() = alpn_list;
1492 Ok(())
1493 }
1494
1495 #[pymethod]
1496 fn _set_alpn_protocols(&self, protos: ArgBytesLike, vm: &VirtualMachine) -> PyResult<()> {

Callers

nothing calls this directly

Calls 8

newFunction · 0.85
borrow_vecMethod · 0.80
to_vecMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45
pushMethod · 0.45
borrow_bufMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected