diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-07-04 17:38:57 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-07-06 15:26:39 +0300 |
commit | b3876113aab992e9ac19f71171cdf8b558f74fc9 (patch) | |
tree | 7b84ab6297ccc7b16d0fda9e96ca42cc4772885d /melib/src/backends.rs | |
parent | 4721073bc3362791147bed9f569c82c65fafe9e8 (diff) |
BackendOp: return future in as_bytes()
Diffstat (limited to 'melib/src/backends.rs')
-rw-r--r-- | melib/src/backends.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/melib/src/backends.rs b/melib/src/backends.rs index 28336465..0365db09 100644 --- a/melib/src/backends.rs +++ b/melib/src/backends.rs @@ -436,7 +436,7 @@ pub trait MailBackend: ::std::fmt::Debug + Send + Sync { /// let operation = Box::new(FooOp {}); /// ``` pub trait BackendOp: ::std::fmt::Debug + ::std::marker::Send { - fn as_bytes(&mut self) -> Result<&[u8]>; + fn as_bytes(&mut self) -> ResultFuture<Vec<u8>>; fn fetch_flags(&self) -> ResultFuture<Flag>; fn set_flag(&mut self, flag: Flag, value: bool) -> ResultFuture<()>; fn set_tag(&mut self, tag: String, value: bool) -> ResultFuture<()>; @@ -458,7 +458,7 @@ impl ReadOnlyOp { } impl BackendOp for ReadOnlyOp { - fn as_bytes(&mut self) -> Result<&[u8]> { + fn as_bytes(&mut self) -> ResultFuture<Vec<u8>> { self.op.as_bytes() } fn fetch_flags(&self) -> ResultFuture<Flag> { |