StoreBackend::Data: don't require Sized
This commit is contained in:
parent
4db466ffc4
commit
c3e294d211
@ -1,6 +1,6 @@
|
||||
#![no_std]
|
||||
|
||||
use core::{mem::size_of, str};
|
||||
use core::str;
|
||||
use byteorder::{ByteOrder, BigEndian};
|
||||
#[cfg(feature = "postcard-values")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -14,12 +14,12 @@ mod test;
|
||||
|
||||
/// Backend interface for `Store`
|
||||
pub trait StoreBackend {
|
||||
type Data: Sized + AsRef<[u8]>;
|
||||
type Data: ?Sized + AsRef<[u8]>;
|
||||
|
||||
/// Memory-mapped
|
||||
fn data(&self) -> &Self::Data;
|
||||
fn len(&self) -> usize {
|
||||
size_of::<Self::Data>()
|
||||
self.data().as_ref().len()
|
||||
}
|
||||
|
||||
type Error;
|
||||
|
Loading…
Reference in New Issue
Block a user