pub struct FlatFileSeq {
    pub dir: PathBuf,
    pub prefix: *const u8,
    pub chunk_size: usize,
}
Expand description

| FlatFileSeq represents a sequence | of numbered files storing raw data. | This class facilitates access to and | efficient management of these files. |

Fields§

§dir: PathBuf§prefix: *const u8§chunk_size: usize

Implementations§

| Constructor | | ———– | @param dir | | The base directory that all files live | in. | ––––– | @param prefix | | A short prefix given to all file names. | ––––– | @param chunk_size | | Disk space is pre-allocated in multiples | of this amount. |

| Get the name of the file at the given position. |

| Open a handle to the file at the given | position. |

| Allocate additional space in a file | after the given starting position. | The amount allocated will be the minimum | multiple of the sequence chunk size | greater than add_size. | | ———– | @param[in] pos | | The starting position that bytes will | be allocated after. | ––––– | @param[in] add_size | | The minimum number of bytes to be allocated. | ––––– | @param[out] out_of_space | | Whether the allocation failed due to | insufficient disk space. | | ———– | @return | | The number of bytes successfully allocated. |

| Commit a file to disk, and optionally | truncate off extra pre-allocated bytes | if final. | | ———– | @param[in] pos | | The first unwritten position in the | file to be flushed. | ––––– | @param[in] finalize | | True if no more data will be written to | this file. | | ———– | @return | | true on success, false on failure. |

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. 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 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
Convert type of a const 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.