pub struct SerialSettingsPlatform<C, F, S> {
pub interface: BestEffortInterface<S>,
pub _settings_marker: PhantomData<C>,
pub storage: F,
pub metadata: &'static ApplicationMetadata,
}
Fields§
§interface: BestEffortInterface<S>
The interface to read/write data to/from serially (via text) to the user.
_settings_marker: PhantomData<C>
§storage: F
The storage mechanism used to persist settings to between boots.
metadata: &'static ApplicationMetadata
Metadata associated with the application
Implementations§
Trait Implementations§
Source§impl<C, F, S> Platform for SerialSettingsPlatform<C, F, S>where
C: Settings,
F: NorFlash,
S: EioWrite + WriteReady + ReadReady + EioRead,
impl<C, F, S> Platform for SerialSettingsPlatform<C, F, S>where
C: Settings,
F: NorFlash,
S: EioWrite + WriteReady + ReadReady + EioRead,
Source§type Interface = BestEffortInterface<S>
type Interface = BestEffortInterface<S>
This type specifies the interface to the user, for example, a USB CDC-ACM serial port.
type Settings = C
type Error = Error<<F as ErrorType>::Error>
Source§fn fetch<'a>(
&mut self,
buf: &'a mut [u8],
key: &[u8],
) -> Result<Option<&'a [u8]>, Self::Error>
fn fetch<'a>( &mut self, buf: &'a mut [u8], key: &[u8], ) -> Result<Option<&'a [u8]>, Self::Error>
Fetch a value from persisten storage
Source§fn store(
&mut self,
buf: &mut [u8],
key: &[u8],
value: &[u8],
) -> Result<(), Self::Error>
fn store( &mut self, buf: &mut [u8], key: &[u8], value: &[u8], ) -> Result<(), Self::Error>
Store a value to persistent storage
Source§fn clear(&mut self, buf: &mut [u8], key: &[u8]) -> Result<(), Self::Error>
fn clear(&mut self, buf: &mut [u8], key: &[u8]) -> Result<(), Self::Error>
Remove a key from storage.
Source§fn interface_mut(&mut self) -> &mut Self::Interface
fn interface_mut(&mut self) -> &mut Self::Interface
Return a mutable reference to the
Interface
.Auto Trait Implementations§
impl<C, F, S> Freeze for SerialSettingsPlatform<C, F, S>
impl<C, F, S> RefUnwindSafe for SerialSettingsPlatform<C, F, S>
impl<C, F, S> Send for SerialSettingsPlatform<C, F, S>
impl<C, F, S> Sync for SerialSettingsPlatform<C, F, S>
impl<C, F, S> Unpin for SerialSettingsPlatform<C, F, S>
impl<C, F, S> UnwindSafe for SerialSettingsPlatform<C, F, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more