mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-13 13:51:08 +00:00
Add AsApActor, Actor impls for ApObject
This commit is contained in:
parent
767a70ba97
commit
b99daa1e1d
4 changed files with 22 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 <asonix@asonix.dog>"]
|
||||
repository = "https://git.asonix.dog/Aardwolf/activitystreams"
|
||||
|
|
|
@ -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
|
||||
|
|
15
src/actor.rs
15
src/actor.rs
|
@ -1504,6 +1504,8 @@ impl<Inner> markers::Base for ApActor<Inner> where Inner: markers::Base {}
|
|||
impl<Inner> markers::Object for ApActor<Inner> where Inner: markers::Object {}
|
||||
impl<Inner> markers::Actor for ApActor<Inner> where Inner: markers::Actor {}
|
||||
|
||||
impl<Inner> markers::Actor for ApObject<Inner> where Inner: markers::Actor {}
|
||||
|
||||
impl<Inner, Kind, Error> Extends<Kind> for ApActor<Inner>
|
||||
where
|
||||
Inner: Extends<Kind, Error = Error> + UnparsedMut + markers::Actor,
|
||||
|
@ -1622,3 +1624,16 @@ impl<Kind> AsObject<Kind> for Actor<Kind> {
|
|||
}
|
||||
|
||||
impl<T, Inner> ApActorExt<Inner> for T where T: AsApActor<Inner> {}
|
||||
|
||||
impl<Inner1, Inner2> AsApActor<Inner2> for ApObject<Inner1>
|
||||
where
|
||||
Inner1: AsApActor<Inner2>,
|
||||
{
|
||||
fn ap_actor_ref(&self) -> &ApActor<Inner2> {
|
||||
self.inner().ap_actor_ref()
|
||||
}
|
||||
|
||||
fn ap_actor_mut(&mut self) -> &mut ApActor<Inner2> {
|
||||
self.inner_mut().ap_actor_mut()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue