pub fn load_stash(peer: Peer, stash: &mut [u8]) -> Option<&mut [u8]>
Expand description
Read the stash of the given peer using the passed buffer.
It’s the app’s responsibility to ensure that the passed buffer is big enough to fit the stash. If it doesn’t fit, runtime will fill the buffer and discard the rest.
The returned stash is a slice of the passed in buffer of the actual content size (up to the buffer size).
If there is no stash (which is always true before save_stash
is called for the first time ever), the result is None
.