Struct cdb::CDBMake

source ·
pub struct CDBMake { /* private fields */ }
Expand description

Base interface for making a CDB file.

Example

fn main() -> std::io::Result<()> {
    let file = std::fs::File::create("temporary.cdb")?;
    let mut cdb = cdb::CDBMake::new(file)?;
    cdb.add(b"one", b"Hello,")?;
    cdb.add(b"two", b"world!")?;
    cdb.finish()?;
    Ok(())
}

Implementations

Create a new CDB maker.

Add a record to the CDB file.

Set the permissions on the underlying file.

Finish writing to the CDB file and flush its contents.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.