pub fn error_to_string(&self, identifier: &InherentIdentifier, error: &[u8]) -> String {
		let res = self.providers.read().iter().filter_map(|p|
			if p.inherent_identifier() == identifier {
				Some(
					p.error_to_string(error)
						.unwrap_or_else(|| error_to_string_fallback(identifier))
				)
			} else {
				None
			}
		).next();

		match res {
			Some(res) => res,
			None => format!(
				"Error while checking inherent of type \"{}\", but this inherent type is unknown.",
				String::from_utf8_lossy(identifier)
			)
		}
	}
/// Converts a given encoded error into a `String`.
///
/// Useful if the implementation encouters an error for an identifier it does not know.
Converts a given encoded error into a `String`.
Useful if the implementation encouters an error for an identifier it does not know.
Converts a given encoded error into a ` String ` . Useful if the implementation encouters an error for an identifier it does not know .
pub fn error_to_string(&self, identifier: &InherentIdentifier, error: &[u8]) -> String {
		let res = self.providers.read().iter().filter_map(|p|
			if p.inherent_identifier() == identifier {
				Some(
					p.error_to_string(error)
						.unwrap_or_else(|| error_to_string_fallback(identifier))
				)
			} else {
				None
			}
		).next();
		match res {
			Some(res) => res,
			None => format!(
				"Error while checking inherent of type \"{}\", but this inherent type is unknown.",
				String::from_utf8_lossy(identifier)
			)
		}
	}
pub fn error_to_string ( & self , identifier : & InherentIdentifier , error : & [ u8 ] ) -> String { let res = self . providers . read ( ) . iter ( ) . filter_map ( | p | if p . inherent_identifier ( ) == identifier { Some ( p . error_to_string ( error ) . unwrap_or_else ( | | error_to_string_fallback ( identifier ) ) ) } else { None } ) . next ( ) ; match res { Some ( res ) => res , None => format ! ( " \" \" " String from_utf8_lossy ( identifier ) ) } }
Converts a given encoded error into a `String`.
Converts a given encoded error into a ` String ` .
&self
identifier
&InherentIdentifier
error
&[u8]
&self
identifier
&InherentIdentifier
error
&[u8]