[−][src]Struct genie_drs::ReserveDirectoryStrategy
Writer strategy that reserve space for metadata for the given amount of tables and files at the top of the file, then fills it in at the end.
Implementations
impl ReserveDirectoryStrategy
[src]
pub fn new(reserved_tables: u32, reserved_files: u32) -> Self
[src]
Create a write strategy using a reserved metadata block.
The strategy will support up to reserved_tables
tables and reserved_files
files.
The total size of the reserved metadata block will be 12 * (reserved_tables + reserved_files)
bytes.
Trait Implementations
impl Default for ReserveDirectoryStrategy
[src]
fn default() -> Self
[src]
The default strategy reserves space for 65536 files spread across 10 tables, meaning a directory size of about 768KiB.
impl<W> Strategy<W> for ReserveDirectoryStrategy where
W: Write + Seek,
[src]
W: Write + Seek,
fn open(&mut self, drs: &mut InnerDRSWriter<W>) -> Result<(), Error>
[src]
fn add_resource(
&mut self,
drs: &mut InnerDRSWriter<W>,
_table: ResourceType,
resource: DRSResource,
data: &mut dyn Read
) -> Result<DRSResource, Error>
[src]
&mut self,
drs: &mut InnerDRSWriter<W>,
_table: ResourceType,
resource: DRSResource,
data: &mut dyn Read
) -> Result<DRSResource, Error>
fn close(&mut self, drs: &mut InnerDRSWriter<W>) -> Result<(), Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ReserveDirectoryStrategy
impl Send for ReserveDirectoryStrategy
impl Sync for ReserveDirectoryStrategy
impl Unpin for ReserveDirectoryStrategy
impl UnwindSafe for ReserveDirectoryStrategy
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,