pub fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option<usize> {
	ext::with(|ext| ext.storage(key).map(|value| {
		let value = &value[value_offset..];
		let written = ::std::cmp::min(value.len(), value_out.len());
		value_out[..written].copy_from_slice(&value[..written]);
		value.len()
	})).expect("read_storage cannot be called outside of an Externalities-provided environment.")
}
/// Get `key` from storage, placing the value into `value_out` (as much of it as possible) and return
/// the number of bytes that the entry in storage had beyond the offset or None if the storage entry
/// doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned
/// number of bytes is not equal to the number of bytes written to the `value_out`.
Get `key` from storage, placing the value into `value_out` (as much of it as possible) and return
the number of bytes that the entry in storage had beyond the offset or None if the storage entry
doesn't exist at all. Note that if the buffer is smaller than the storage entry length, the returned
number of bytes is not equal to the number of bytes written to the `value_out`.
Get ` key ` from storage placing the value into ` value_out ` ( as much of it as possible ) and return the number of bytes that the entry in storage had beyond the offset or None if the storage entry doesn ' t exist at all . Note that if the buffer is smaller than the storage entry length the returned number of bytes is not equal to the number of bytes written to the ` value_out ` .
pub fn read_storage(key: &[u8], value_out: &mut [u8], value_offset: usize) -> Option<usize> {
	ext::with(|ext| ext.storage(key).map(|value| {
		let value = &value[value_offset..];
		let written = ::std::cmp::min(value.len(), value_out.len());
		value_out[..written].copy_from_slice(&value[..written]);
		value.len()
	})).expect("read_storage cannot be called outside of an Externalities-provided environment.")
}
pub fn read_storage ( key : & [ u8 ] , value_out : & mut [ u8 ] , value_offset : usize ) -> Option < usize > { ext :: with ( | ext | ext . storage ( key ) . map ( | value | { let value = & value [ value_offset .. ] ; let written = :: std :: cmp :: min ( value . len ( ) , value_out . len ( ) ) ; value_out [ .. written ] . copy_from_slice ( & value [ .. written ] ) ; value . len ( ) } ) ) . expect ( " " ) }
Get `key` from storage, placing the value into `value_out` (as much of it as possible) and return
the number of bytes that the entry in storage had beyond the offset or None if the storage entry
doesn't exist at all.
Get ` key ` from storage placing the value into ` value_out ` ( as much of it as possible ) and return the number of bytes that the entry in storage had beyond the offset or None if the storage entry doesn ' t exist at all .
key
&[u8]
value_out
&mut [u8]
value_offset
usize
key
&[u8]
value_out
&mut [u8]
value_offset
usize