Trait dhcpv4::server::DataStore

source ·
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§

source

type Error: Error + Send + Sync + 'static

Required Methods§

source

fn insert( &mut self, client_id: &ClientIdentifier, record: &LeaseRecord ) -> Result<(), Self::Error>

Inserts the client record associated with the identifier.

source

fn store_options(&mut self, opts: &[DhcpOption]) -> Result<(), Self::Error>

Stores the DHCP option values served by the server.

source

fn store_parameters( &mut self, params: &ServerParameters ) -> Result<(), Self::Error>

Stores the DHCP server’s configuration parameters.

source

fn delete(&mut self, client_id: &ClientIdentifier) -> Result<(), Self::Error>

Deletes the client record associated with the identifier.

Implementors§