diff --git a/CHANGELOG.md b/CHANGELOG.md index b80ded7..2b1e1b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Unreleased + +# 0.7.0-alpha.6 +- Add Actor and AsApActor impls for ApObject + # 0.7.0-alpha.5 - Add orderedItems field to collections - Document URL functions from crate root diff --git a/Cargo.toml b/Cargo.toml index 81da331..c7f78c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "activitystreams" description = "A set of core types and traits for activitystreams data" -version = "0.7.0-alpha.5" +version = "0.7.0-alpha.6" license = "GPL-3.0" authors = ["asonix "] repository = "https://git.asonix.dog/Aardwolf/activitystreams" diff --git a/README.md b/README.md index 4044e56..af46865 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ _A set of Traits and Types that make up the ActivityStreams and ActivityPub spec First, add ActivityStreams to your dependencies ```toml [dependencies] -activitystreams = "0.7.0-alpha.4" +activitystreams = "0.7.0-alpha.6" ``` ### Types diff --git a/src/actor.rs b/src/actor.rs index 52a735d..9e89658 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -1504,6 +1504,8 @@ impl markers::Base for ApActor where Inner: markers::Base {} impl markers::Object for ApActor where Inner: markers::Object {} impl markers::Actor for ApActor where Inner: markers::Actor {} +impl markers::Actor for ApObject where Inner: markers::Actor {} + impl Extends for ApActor where Inner: Extends + UnparsedMut + markers::Actor, @@ -1622,3 +1624,16 @@ impl AsObject for Actor { } impl ApActorExt for T where T: AsApActor {} + +impl AsApActor for ApObject +where + Inner1: AsApActor, +{ + fn ap_actor_ref(&self) -> &ApActor { + self.inner().ap_actor_ref() + } + + fn ap_actor_mut(&mut self) -> &mut ApActor { + self.inner_mut().ap_actor_mut() + } +}