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

Method with_subtype

crates/vm/src/exceptions.rs:1277–1293  ·  view source on GitHub ↗
(
        exc_type: PyTypeRef,
        errno: Option<i32>,
        strerror: impl ToPyObject,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

1275impl OSErrorBuilder {
1276 #[must_use]
1277 pub fn with_subtype(
1278 exc_type: PyTypeRef,
1279 errno: Option<i32>,
1280 strerror: impl ToPyObject,
1281 vm: &VirtualMachine,
1282 ) -> Self {
1283 let strerror = strerror.to_pyobject(vm);
1284 Self {
1285 exc_type,
1286 errno,
1287 strerror: Some(strerror),
1288 filename: None,
1289 #[cfg(windows)]
1290 winerror: None,
1291 filename2: None,
1292 }
1293 }
1294
1295 #[must_use]
1296 pub fn with_errno(errno: i32, strerror: impl ToPyObject, vm: &VirtualMachine) -> Self {

Callers

nothing calls this directly

Calls 2

SomeClass · 0.50
to_pyobjectMethod · 0.45

Tested by

no test coverage detected