Lines Matching defs:kind
31 mod kind;
35 pub use kind::ErrorKind;
66 kind: ErrorKind,
86 pub fn raw(kind: ErrorKind, message: impl std::fmt::Display) -> Self {
87 Self::new(kind).set_message(message.to_string())
124 pub fn new(kind: ErrorKind) -> Self {
127 kind,
173 pub fn kind(&self) -> ErrorKind {
174 self.inner.kind
186 pub fn get(&self, kind: ContextKind) -> Option<&ContextValue> {
187 self.inner.context.get(&kind)
193 pub fn insert(&mut self, kind: ContextKind, value: ContextValue) -> Option<ContextValue> {
194 self.inner.context.insert(kind, value)
204 match self.kind() {
212 /// Depending on the error kind, this either prints to `stderr` and exits with a status of `2`
227 /// Prints formatted and colored error to `stdout` or `stderr` according to its error kind
246 self.kind(),
279 fn for_app(kind: ErrorKind, cmd: &Command, styled: StyledStr) -> Self {
280 Self::new(kind).set_message(styled).with_cmd(cmd)
313 kind: ContextKind,
316 self.inner.context.insert_unchecked(kind, value);