pub trait DataStore {
type Error: Error + Send + Sync + 'static;
// Required methods
fn insert(
&mut self,
client_id: &ClientIdentifier,
record: &LeaseRecord,
) -> Result<(), Self::Error>;
fn store_options(&mut self, opts: &[DhcpOption]) -> Result<(), Self::Error>;
fn store_parameters(
&mut self,
params: &ServerParameters,
) -> Result<(), Self::Error>;
fn delete(
&mut self,
client_id: &ClientIdentifier,
) -> Result<(), Self::Error>;
}
Expand description
An interface for storing and loading DHCP server data.
Required Associated Types§
Required Methods§
Sourcefn insert(
&mut self,
client_id: &ClientIdentifier,
record: &LeaseRecord,
) -> Result<(), Self::Error>
fn insert( &mut self, client_id: &ClientIdentifier, record: &LeaseRecord, ) -> Result<(), Self::Error>
Inserts the client record associated with the identifier.
Sourcefn store_options(&mut self, opts: &[DhcpOption]) -> Result<(), Self::Error>
fn store_options(&mut self, opts: &[DhcpOption]) -> Result<(), Self::Error>
Stores the DHCP option values served by the server.
Sourcefn store_parameters(
&mut self,
params: &ServerParameters,
) -> Result<(), Self::Error>
fn store_parameters( &mut self, params: &ServerParameters, ) -> Result<(), Self::Error>
Stores the DHCP server’s configuration parameters.