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

Method rawmode

crates/vm/src/stdlib/_io.rs:4905–4916  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

4903
4904 impl Mode {
4905 const fn rawmode(&self) -> &'static str {
4906 match (&self.file, self.plus) {
4907 (FileMode::Read, true) => "rb+",
4908 (FileMode::Read, false) => "rb",
4909 (FileMode::Write, true) => "wb+",
4910 (FileMode::Write, false) => "wb",
4911 (FileMode::Exclusive, true) => "xb+",
4912 (FileMode::Exclusive, false) => "xb",
4913 (FileMode::Append, true) => "ab+",
4914 (FileMode::Append, false) => "ab",
4915 }
4916 }
4917 }
4918
4919 enum ParseModeError {

Callers 1

io_openFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected