[−][src]Trait growthring::wal::WALFile
Required methods
#[must_use]fn allocate<'life0, 'async_trait>(
&'life0 self,
offset: WALPos,
length: usize
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
offset: WALPos,
length: usize
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Initialize the file space in [offset, offset + length) to zero.
#[must_use]fn write<'life0, 'async_trait>(
&'life0 self,
offset: WALPos,
data: WALBytes
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
offset: WALPos,
data: WALBytes
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Write data with offset. We assume all previous allocate
/truncate
invocations are visible
if ordered earlier (should be guaranteed by most OS). Additionally, the write caused
by each invocation of this function should be atomic (the entire single write should be
all or nothing).
fn read(&self, offset: WALPos, length: usize) -> Result<Option<WALBytes>, ()>
Read data with offset. Return Ok(None)
when it reaches EOF.
fn truncate(&self, length: usize) -> Result<(), ()>
Truncate a file to a specified length.
Implementors
impl WALFile for WALFileAIO
[src]
fn allocate<'life0, 'async_trait>(
&'life0 self,
offset: WALPos,
length: usize
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
offset: WALPos,
length: usize
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn truncate(&self, length: usize) -> Result<(), ()>
[src]
fn write<'life0, 'async_trait>(
&'life0 self,
offset: WALPos,
data: WALBytes
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
offset: WALPos,
data: WALBytes
) -> Pin<Box<dyn Future<Output = Result<(), ()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,