dhcpv4::server

Trait 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§