This commit is contained in:
Yuriy Dupyn 2024-02-05 23:35:49 +01:00
parent c25c6edc6a
commit 588db169f8
8 changed files with 15 additions and 55 deletions

View file

@ -5,7 +5,7 @@ use tokio::io::{AsyncReadExt, AsyncSeekExt, AsyncWriteExt, SeekFrom};
use crate::store::{FilePosition, Result};
#[async_trait]
pub(crate) trait CursorCanRead<T> {
pub trait CursorCanRead<T> {
fn file(&mut self) -> &mut File;
fn eof_file_position(&self) -> FilePosition;
@ -55,7 +55,7 @@ pub(crate) trait CursorCanRead<T> {
}
#[async_trait]
pub(crate) trait CursorCanWrite<T>: CursorCanRead<T> {
pub trait CursorCanWrite<T>: CursorCanRead<T> {
async fn write_bytes(&mut self, bytes: &[u8]) -> Result<usize> {
Ok(self.file().write(bytes).await?)
}