Struct glommio::io::ImmutableFilePreSealSink[][src]

pub struct ImmutableFilePreSealSink { /* fields omitted */ }
Expand description

Sink portion of the ImmutableFile

To build it, use build_sink on the ImmutableFileBuilder

Implementations

Seals the file for further writes.

Once this is called, it is no longer possible to write to the resulting ImmutableFile

Waits for all currently in-flight buffers to be written to the underlying storage.

This does not include the current buffer if it is not full. If all data must be flushed, use flush.

Returns the flushed position of the file.

Waits for all currently in-flight buffers to be written to the underlying storage, and ensures they are safely persisted.

This does not include the current buffer if it is not full. If all data must be synced, use Self::sync.

Returns the flushed position of the file at the time the sync started.

Waits for all buffers to be written to the underlying storage, and ensures they are safely persisted.

This includes the current buffer even if it is not full, by padding it. The padding will get over-written by future writes, or truncated upon Self::seal or close.

Returns the flushed position of the file at the time the sync started.

Acquires the current position of this ImmutableFilePreSealSink.

Acquires the current position of this ImmutableFilePreSealSink that is flushed to the underlying media.

Warning: the position reported by this API is not restart or crash safe. You need to call ImmutableFilePreSealSink::sync for that. Although the ImmutableFilePreSealSink uses Direct I/O, modern storage devices have their own caches and may still lose data that sits on those caches upon a restart until ImmutableFilePreSealSink::sync is called (Note that ImmutableFilePreSealSink::seal implies a sync).

However within the same session, new readers trying to read from any position before what we return in this method will be guaranteed to read the data we just wrote.

Trait Implementations

Attempt to write bytes from buf into the object. Read more

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more

Attempt to close the object. Read more

Attempt to write bytes from bufs into the object using vectored IO operations. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Writes some bytes into the byte stream. Read more

Like write(), except that it writes a slice of buffers. Read more

Writes an entire buffer into the byte stream. Read more

Flushes the stream to ensure that all buffered contents reach their destination. Read more

Closes the writer. Read more

Boxes the writer and changes its type to dyn AsyncWrite + Send + 'a. 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