pub struct DmaStreamWriterBuilder { /* private fields */ }
Expand description

Builds a DmaStreamWriter, allowing linear access to a Direct I/O DmaFile

Implementations

Creates a new DmaStreamWriterBuilder, given a DmaFile

Various properties can be set by using its with methods.

A DmaStreamWriter can later be constructed from it by calling build

Examples
use glommio::{
    io::{DmaFile, DmaStreamWriterBuilder},
    LocalExecutor,
};

let ex = LocalExecutor::default();
ex.run(async {
    let file = DmaFile::create("myfile.txt").await.unwrap();
    let _reader = DmaStreamWriterBuilder::new(file).build();
});

Define the number of write-behind buffers that will be used by the DmaStreamWriter

Higher write-behind numbers mean more parallelism but also more memory usage. As long as there is still write-behind buffers available writing to this DmaStreamWriter will not block.

Does not issue a sync operation when closing the file. This is dangerous and in most cases may lead to data loss.

Define the buffer size that will be used by the DmaStreamWriter

Builds a DmaStreamWriter with the properties defined by this DmaStreamWriterBuilder

Trait Implementations

Formats the value using the given formatter. Read more

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more