forked from alemi/upub
feat(apb): Addressed auto impl for any Object
This commit is contained in:
parent
eddde7c8b9
commit
8b15ae9f4f
1 changed files with 1 additions and 2 deletions
|
@ -6,8 +6,7 @@ pub trait Addressed {
|
|||
fn addressed(&self) -> Vec<String>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "unstructured")]
|
||||
impl Addressed for serde_json::Value {
|
||||
impl<T: Object> Addressed for T {
|
||||
fn addressed(&self) -> Vec<String> {
|
||||
let mut to : Vec<String> = self.to().map(|x| x.href().to_string()).collect();
|
||||
to.append(&mut self.bto().map(|x| x.href().to_string()).collect());
|
||||
|
|
Loading…
Reference in a new issue