We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97e6f97 commit cc45d05Copy full SHA for cc45d05
1 file changed
libsql-wal/src/segment/compacted.rs
@@ -52,6 +52,18 @@ pub struct CompactedSegment<F> {
52
file: F,
53
}
54
55
+impl<F> CompactedSegment<F> {
56
+ pub fn remap_file_type<FN, T>(self, f: FN) -> CompactedSegment<T>
57
+ where
58
+ FN: FnOnce(F) -> T,
59
+ {
60
+ CompactedSegment {
61
+ header: self.header,
62
+ file: f(self.file),
63
+ }
64
65
+}
66
+
67
impl<F: FileExt> CompactedSegment<F> {
68
pub(crate) async fn open(file: F) -> Result<Self> {
69
let buf = ZeroCopyBuf::new_uninit();
0 commit comments