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

Method error_msg

crates/vm/src/stdlib/_io.rs:4927–4939  ·  view source on GitHub ↗
(&self, mode_string: &str)

Source from the content-addressed store, hash-verified

4925
4926 impl ParseModeError {
4927 fn error_msg(&self, mode_string: &str) -> String {
4928 match self {
4929 Self::InvalidMode => format!("invalid mode: '{mode_string}'"),
4930 Self::MultipleFile => {
4931 "must have exactly one of create/read/write/append mode".to_owned()
4932 }
4933 Self::MultipleEncode => "can't have text and binary mode at once".to_owned(),
4934 Self::NoFile => {
4935 "Must have exactly one of create/read/write/append mode and at most one plus"
4936 .to_owned()
4937 }
4938 }
4939 }
4940 }
4941
4942 #[derive(FromArgs)]

Callers 2

io_openFunction · 0.80
initMethod · 0.80

Calls 1

to_ownedMethod · 0.45

Tested by

no test coverage detected