diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-04-29 21:51:52 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-04-29 21:51:52 +0200 |
commit | 236ff7fe93063c2f1204df523476ffbb47b37e3c (patch) | |
tree | 0f1d582dd0993df19da28d91aafc5d75f10e9b62 | |
parent | 55f737f2ade8349acc7f837dd4fc855f5f7fd20c (diff) |
Add getters
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | src/types/block.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/types/block.rs b/src/types/block.rs index ccab9af..1f0fffd 100644 --- a/src/types/block.rs +++ b/src/types/block.rs @@ -69,3 +69,17 @@ pub struct LoadedBlock { content: LoadedContent, } +impl LoadedBlock { + pub fn version(&self) -> &Version { + &self.version + } + + pub fn parents(&self) -> Vec<IPFSHash> { + &self.parents + } + + pub fn content(&self) -> &LoadedContent { + &self.content + } +} + |