activitystreams/activitystreams-ext/src/ext1.rs

233 lines
5.4 KiB
Rust
Raw Normal View History

2020-07-25 21:59:15 +00:00
use crate::Ext1;
use activitystreams::{
activity::{
2022-12-06 23:36:34 +00:00
Activity, ActivityActor, ActivityObject, AsActivity, AsActivityActor, AsActivityObject,
AsOptOrigin, AsOptTarget, AsOrigin, AsQuestion, AsTarget, OptOrigin, OptTarget, Origin,
Question, Target,
2020-07-25 21:59:15 +00:00
},
actor::{ApActor, AsApActor},
2022-12-06 23:36:34 +00:00
base::{AsBase, Base},
2020-07-25 21:59:15 +00:00
collection::{AsCollection, AsCollectionPage, Collection, CollectionPage},
markers,
object::{ApObject, AsApObject, AsObject, Object},
};
impl<Inner, A> markers::Base for Ext1<Inner, A> where Inner: markers::Base {}
impl<Inner, A> markers::Object for Ext1<Inner, A> where Inner: markers::Object {}
impl<Inner, A> markers::Collection for Ext1<Inner, A> where Inner: markers::Collection {}
impl<Inner, A> markers::CollectionPage for Ext1<Inner, A> where Inner: markers::CollectionPage {}
impl<Inner, A> markers::Actor for Ext1<Inner, A> where Inner: markers::Actor {}
impl<Inner, A> markers::Activity for Ext1<Inner, A> where Inner: markers::Activity {}
impl<Inner, A> markers::IntransitiveActivity for Ext1<Inner, A> where
Inner: markers::IntransitiveActivity
{
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsBase for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsBase,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Kind = Inner::Kind;
fn base_ref(&self) -> &Base<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.base_ref()
}
2022-12-06 23:36:34 +00:00
fn base_mut(&mut self) -> &mut Base<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.base_mut()
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsObject for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsObject,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Kind = Inner::Kind;
fn object_ref(&self) -> &Object<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.object_ref()
}
2022-12-06 23:36:34 +00:00
fn object_mut(&mut self) -> &mut Object<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.object_mut()
}
}
2022-12-06 23:47:16 +00:00
impl<Inner, A> AsApObject for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:47:16 +00:00
Inner: AsApObject,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:47:16 +00:00
type Inner = Inner::Inner;
fn ap_object_ref(&self) -> &ApObject<Self::Inner> {
2020-07-25 21:59:15 +00:00
self.inner.ap_object_ref()
}
2022-12-06 23:47:16 +00:00
fn ap_object_mut(&mut self) -> &mut ApObject<Self::Inner> {
2020-07-25 21:59:15 +00:00
self.inner.ap_object_mut()
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsCollection for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsCollection,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Kind = Inner::Kind;
fn collection_ref(&self) -> &Collection<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.collection_ref()
}
2022-12-06 23:36:34 +00:00
fn collection_mut(&mut self) -> &mut Collection<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.collection_mut()
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsCollectionPage for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsCollectionPage,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Kind = Inner::Kind;
fn collection_page_ref(&self) -> &CollectionPage<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.collection_page_ref()
}
2022-12-06 23:36:34 +00:00
fn collection_page_mut(&mut self) -> &mut CollectionPage<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.collection_page_mut()
}
}
2022-12-06 23:47:16 +00:00
impl<Inner, A> AsApActor for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:47:16 +00:00
Inner: AsApActor,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:47:16 +00:00
type Inner = Inner::Inner;
fn ap_actor_ref(&self) -> &ApActor<Self::Inner> {
2020-07-25 21:59:15 +00:00
self.inner.ap_actor_ref()
}
2022-12-06 23:47:16 +00:00
fn ap_actor_mut(&mut self) -> &mut ApActor<Self::Inner> {
2020-07-25 21:59:15 +00:00
self.inner.ap_actor_mut()
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsActivity for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsActivity,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Kind = Inner::Kind;
fn activity_ref(&self) -> &Activity<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.activity_ref()
}
2022-12-06 23:36:34 +00:00
fn activity_mut(&mut self) -> &mut Activity<Self::Kind> {
2020-07-25 21:59:15 +00:00
self.inner.activity_mut()
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsActivityActor for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsActivityActor,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Inner = Inner::Inner;
fn activity_actor_ref(&self) -> &ActivityActor<Self::Inner> {
self.inner.activity_actor_ref()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
fn activity_actor_mut(&mut self) -> &mut ActivityActor<Self::Inner> {
self.inner.activity_actor_mut()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
}
2020-07-25 21:59:15 +00:00
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsActivityObject for Ext1<Inner, A>
where
Inner: AsActivityObject,
{
type Inner = Inner::Inner;
fn activity_object_ref(&self) -> &ActivityObject<Self::Inner> {
self.inner.activity_object_ref()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
fn activity_object_mut(&mut self) -> &mut ActivityObject<Self::Inner> {
self.inner.activity_object_mut()
2020-07-25 21:59:15 +00:00
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsTarget for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsTarget,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Inner = Inner::Inner;
fn target_ref(&self) -> &Target<Self::Inner> {
self.inner.target_ref()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
fn target_mut(&mut self) -> &mut Target<Self::Inner> {
self.inner.target_mut()
2020-07-25 21:59:15 +00:00
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsOrigin for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsOrigin,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Inner = Inner::Inner;
fn origin_ref(&self) -> &Origin<Self::Inner> {
self.inner.origin_ref()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
fn origin_mut(&mut self) -> &mut Origin<Self::Inner> {
self.inner.origin_mut()
2020-07-25 21:59:15 +00:00
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsOptTarget for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsOptTarget,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Inner = Inner::Inner;
fn opt_target_ref(&self) -> &OptTarget<Self::Inner> {
self.inner.opt_target_ref()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
fn opt_target_mut(&mut self) -> &mut OptTarget<Self::Inner> {
self.inner.opt_target_mut()
2020-07-25 21:59:15 +00:00
}
}
2022-12-06 23:36:34 +00:00
impl<Inner, A> AsOptOrigin for Ext1<Inner, A>
2020-07-25 21:59:15 +00:00
where
2022-12-06 23:36:34 +00:00
Inner: AsOptOrigin,
2020-07-25 21:59:15 +00:00
{
2022-12-06 23:36:34 +00:00
type Inner = Inner::Inner;
fn opt_origin_ref(&self) -> &OptOrigin<Self::Inner> {
self.inner.opt_origin_ref()
2020-07-25 21:59:15 +00:00
}
2022-12-06 23:36:34 +00:00
fn opt_origin_mut(&mut self) -> &mut OptOrigin<Self::Inner> {
self.inner.opt_origin_mut()
2020-07-25 21:59:15 +00:00
}
}
impl<Inner, A> AsQuestion for Ext1<Inner, A>
where
Inner: AsQuestion,
{
fn question_ref(&self) -> &Question {
self.inner.question_ref()
}
fn question_mut(&mut self) -> &mut Question {
self.inner.question_mut()
}
}