fn try_read_overlay_value<H, B>(overlay: &OverlayedChanges, backend: &B, key: &[u8])
	-> Result<Option<Vec<u8>>, Box<Error>>
where
	H: Hasher,

	B: Backend<H>,
{
	match overlay.storage(key).map(|x| x.map(|x| x.to_vec())) {
		Some(value) => Ok(value),
		None => backend.storage(key)
			.map_err(|err| Box::new(ExecutionError::Backend(format!("{}", err))) as Box<Error>),
	}
}
/// Reads storage value from overlay or from the backend.
Reads storage value from overlay or from the backend.
Reads storage value from overlay or from the backend .
fn try_read_overlay_value<H, B>(overlay: &OverlayedChanges, backend: &B, key: &[u8])
	-> Result<Option<Vec<u8>>, Box<Error>>
where
	H: Hasher,
	B: Backend<H>,
{
	match overlay.storage(key).map(|x| x.map(|x| x.to_vec())) {
		Some(value) => Ok(value),
		None => backend.storage(key)
			.map_err(|err| Box::new(ExecutionError::Backend(format!("{}", err))) as Box<Error>),
	}
}
fn try_read_overlay_value < H , B > ( overlay : & OverlayedChanges , backend : & B , key : & [ u8 ] ) -> Result < Option < Vec < u8 > > , Box < Error > > where H : Hasher , B : Backend < H > , { match overlay . storage ( key ) . map ( | x | x . map ( | x | x . to_vec ( ) ) ) { Some ( value ) => Ok ( value ) , None => backend . storage ( key ) . map_err ( | err | Box :: new ( ExecutionError :: Backend ( format ! ( " " err ) ) ) as Box < Error > ) , } }
Reads storage value from overlay or from the backend.
Reads storage value from overlay or from the backend .
overlay
&OverlayedChanges
backend
&B
key
&[u8]
overlay
&OverlayedChanges
backend
&B
key
&[u8]