Atproto, add extraction of values from StrongRef
This commit is contained in:
parent
8160b161f5
commit
2fa7590271
1 changed files with 5 additions and 0 deletions
|
|
@ -73,6 +73,11 @@ impl<T> StrongRef<T> {
|
||||||
pub fn get_content(&self) -> &T {
|
pub fn get_content(&self) -> &T {
|
||||||
&self.content
|
&self.content
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn extract_content(self) -> (T, Cid) {
|
||||||
|
(self.content, self.cid)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_cid(&self) -> &Cid {
|
pub fn get_cid(&self) -> &Cid {
|
||||||
&self.cid
|
&self.cid
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue