Lines Matching +full:write +full:- +full:error
1 use std::error::Error;
23 fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> { in fmt() argument
25 Unexpected::Bool(b) => write!(f, "boolean `{}`", b), in fmt()
26 Unexpected::I64(i) => write!(f, "integer 64 bit `{}`", i), in fmt()
27 Unexpected::I128(i) => write!(f, "integer 128 bit `{}`", i), in fmt()
28 Unexpected::U64(i) => write!(f, "unsigned integer 64 bit `{}`", i), in fmt()
29 Unexpected::U128(i) => write!(f, "unsigned integer 128 bit `{}`", i), in fmt()
30 Unexpected::Float(v) => write!(f, "floating point `{}`", v), in fmt()
31 Unexpected::Str(ref s) => write!(f, "string {:?}", s), in fmt()
32 Unexpected::Unit => write!(f, "unit value"), in fmt()
33 Unexpected::Seq => write!(f, "sequence"), in fmt()
34 Unexpected::Map => write!(f, "map"), in fmt()
49 PathParse(nom::error::ErrorKind),
57 /// The captured error from attempting to parse the file in its desired format.
58 /// This is the actual error object from the library used for the parsing.
59 cause: Box<dyn Error + Send + Sync>,
76 /// error is generated).
83 /// Unadorned error from a foreign origin.
84 Foreign(Box<dyn Error + Send + Sync>),
94 ) -> Self { in invalid_type()
103 // Have a proper error fire if the root of a file is ever not a Table
106 pub fn invalid_root(origin: Option<&String>, unexpected: Unexpected) -> Box<Self> { in invalid_root()
118 pub fn extend_with_key(self, key: &str) -> Self { in extend_with_key()
137 fn prepend(self, segment: &str, add_dot: bool) -> Self { in prepend()
165 pub(crate) fn prepend_key(self, key: &str) -> Self { in prepend_key()
170 pub(crate) fn prepend_index(self, idx: usize) -> Self { in prepend_index()
175 /// Alias for a `Result` with the error type set to `ConfigError`.
180 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt()
181 write!(f, "{}", *self) in fmt()
186 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt()
188 ConfigError::Frozen => write!(f, "configuration is frozen"), in fmt()
190 ConfigError::PathParse(ref kind) => write!(f, "{}", kind.description()), in fmt()
192 ConfigError::Message(ref s) => write!(f, "{}", s), in fmt()
194 ConfigError::Foreign(ref cause) => write!(f, "{}", cause), in fmt()
197 write!(f, "configuration property {:?} not found", key) in fmt()
206 write!(f, "invalid type: {}, expected {}", unexpected, expected)?; in fmt()
209 write!(f, " for key `{}`", key)?; in fmt()
213 write!(f, " in {}", origin)?; in fmt()
220 write!(f, "{}", cause)?; in fmt()
223 write!(f, " in {}", uri)?; in fmt()
232 impl Error for ConfigError {}
234 impl de::Error for ConfigError {
235 fn custom<T: fmt::Display>(msg: T) -> Self { in custom()
240 impl ser::Error for ConfigError {
241 fn custom<T: fmt::Display>(msg: T) -> Self { in custom()