Lines Matching refs:Err
18 pub type IResult<I, O, E = error::Error<I>> = Result<(I, O), Err<E>>;
39 Err(Err::Error(e)) | Err(Err::Failure(e)) => Err(e), in finish()
40 Err(Err::Incomplete(_)) => { in finish()
97 pub enum Err<E> { enum
108 impl<E> Err<E> { implementation
111 if let Err::Incomplete(_) = self { in is_incomplete()
119 pub fn map<E2, F>(self, f: F) -> Err<E2> in map()
124 Err::Incomplete(n) => Err::Incomplete(n), in map()
125 Err::Failure(t) => Err::Failure(f(t)), in map()
126 Err::Error(t) => Err::Error(f(t)), in map()
131 pub fn convert<F>(e: Err<F>) -> Self in convert()
139 impl<T> Err<(T, ErrorKind)> { implementation
141 pub fn map_input<U, F>(self, f: F) -> Err<(U, ErrorKind)> in map_input()
146 Err::Incomplete(n) => Err::Incomplete(n), in map_input()
147 Err::Failure((input, k)) => Err::Failure((f(input), k)), in map_input()
148 Err::Error((input, k)) => Err::Error((f(input), k)), in map_input()
153 impl<T> Err<error::Error<T>> { impl
155 pub fn map_input<U, F>(self, f: F) -> Err<error::Error<U>> in map_input()
160 Err::Incomplete(n) => Err::Incomplete(n), in map_input()
161 Err::Failure(error::Error { input, code }) => Err::Failure(error::Error { in map_input()
165 Err::Error(error::Error { input, code }) => Err::Error(error::Error { in map_input()
176 impl Err<(&[u8], ErrorKind)> { implementation
179 pub fn to_owned(self) -> Err<(Vec<u8>, ErrorKind)> { in to_owned()
185 impl Err<(&str, ErrorKind)> { implementation
188 pub fn to_owned(self) -> Err<(String, ErrorKind)> { in to_owned()
194 impl Err<error::Error<&[u8]>> { impl
197 pub fn to_owned(self) -> Err<error::Error<Vec<u8>>> { in to_owned()
203 impl Err<error::Error<&str>> { impl
206 pub fn to_owned(self) -> Err<error::Error<String>> { in to_owned()
211 impl<E: Eq> Eq for Err<E> {} implementation
213 impl<E> fmt::Display for Err<E> implementation
219 Err::Incomplete(Needed::Size(u)) => write!(f, "Parsing requires {} bytes/chars", u), in fmt()
220 Err::Incomplete(Needed::Unknown) => write!(f, "Parsing requires more data"), in fmt()
221 Err::Failure(c) => write!(f, "Parsing Failure: {:?}", c), in fmt()
222 Err::Error(c) => write!(f, "Parsing Error: {:?}", c), in fmt()
231 impl<E> Error for Err<E> implementation
350 Err(e) => Err(e), in parse()
420 Err(Err::Error(e1)) => match self.g.parse(i) { in parse()
421 Err(Err::Error(e2)) => Err(Err::Error(e1.or(e2))), in parse()
452 Err(Err::Error(e)) => Err(Err::Error(e.into())), in parse()
453 Err(Err::Failure(e)) => Err(Err::Failure(e.into())), in parse()
454 Err(Err::Incomplete(e)) => Err(Err::Incomplete(e)), in parse()
478 assert_size!(Err<u32>, 16); in size_test()
484 let e = Err::Error(1); in err_map_test()
485 assert_eq!(e.map(|v| v + 1), Err::Error(2)); in err_map_test()