diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-06-16 14:25:59 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-03-25 10:50:14 +0100 |
commit | 201897fbfe3521d6e17465e25d991c84a5d9449d (patch) | |
tree | f869a370d06cddfc4397f8e9c0f15cfec2d75472 | |
parent | fc3243918fee9450f6be8e9a436c277718bb5cb8 (diff) |
Add helper function to get Content object
-rw-r--r-- | src/typeext/block.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/typeext/block.rs b/src/typeext/block.rs index e899082..d6931c3 100644 --- a/src/typeext/block.rs +++ b/src/typeext/block.rs @@ -4,6 +4,7 @@ use futures::stream; use futures::stream::Stream; use crate::types::block::Block; +use crate::types::content::Content; use crate::repository::Repository; /// Wrapper for Block type which holds a reference to the repository and is thus able to provide @@ -37,4 +38,8 @@ impl BlockExt { }) }) } + + pub fn content(&self) -> impl Future<Item = Content, Error = Error> { + self.repo.get_content(self.block.content().clone()) + } } |