You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hash.rs
    path of file: ./repos/parity-ethereum/accounts/ethstore/src/json
    
    the code of the file until where you have to start completion: // Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.

// Parity Ethereum is free software: you can redistribute it and/or mo
    
			fn from_str(value: &str) -> Result<Self, Self::Err> {
				match value.from_hex() {
					Ok(ref hex) if hex.len() == $size => {
						let mut hash = [0u8; $size];
						hash.clone_from_slice(hex);
						Ok($name(hash))
					}
					_ => Err(Error::InvalidH256),
				}
			}