pub struct PeerView<F, M>where
F: MultiwriteNorFlash + 'static,
M: RawMutex + 'static,{ /* private fields */ }Expand description
View implementing [umsh_hal::PeerStore] on top of a shared
FlashStore. Follows the same view-type pattern as
KeyValueView and CounterView.
Implementations§
Source§impl<F, M> PeerView<F, M>where
F: MultiwriteNorFlash + 'static,
M: RawMutex + 'static,
impl<F, M> PeerView<F, M>where
F: MultiwriteNorFlash + 'static,
M: RawMutex + 'static,
Sourcepub fn new(storage: &'static FlashStore<F, M>) -> Self
pub fn new(storage: &'static FlashStore<F, M>) -> Self
Construct a peer-store view over the shared static storage.
Trait Implementations§
Source§impl<F, M> PeerStore for PeerView<F, M>where
F: MultiwriteNorFlash + 'static,
M: RawMutex + 'static,
impl<F, M> PeerStore for PeerView<F, M>where
F: MultiwriteNorFlash + 'static,
M: RawMutex + 'static,
type Error = Error<<F as ErrorType>::Error>
Source§async fn store_peer(
&self,
key: &[u8; 32],
alias: Option<&[u8]>,
) -> Result<(), Self::Error>
async fn store_peer( &self, key: &[u8; 32], alias: Option<&[u8]>, ) -> Result<(), Self::Error>
Upsert the peer record for
key. alias, if present, is a UTF-8
display label; passing None removes any existing alias.