Method
error_msg
(&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)] |
Tested by
no test coverage detected