mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-25 21:31:00 +00:00
Add default impl for basically everything
This commit is contained in:
parent
3e64be3a23
commit
9bf393f142
42 changed files with 110 additions and 110 deletions
|
@ -24,7 +24,7 @@ use super::{kind::AcceptType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Accept {
|
pub struct Accept {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::AddType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Add {
|
pub struct Add {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::MoveType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct AMove {
|
pub struct AMove {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::AnnounceType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Announce {
|
pub struct Announce {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::ArriveType, properties::ActivityProperties, Activity, Intransi
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Arrive {
|
pub struct Arrive {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::BlockType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Block {
|
pub struct Block {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::CreateType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Create {
|
pub struct Create {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::DeleteType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Delete {
|
pub struct Delete {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::DislikeType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Dislike {
|
pub struct Dislike {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::FlagType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Flag {
|
pub struct Flag {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::FollowType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Follow {
|
pub struct Follow {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::IgnoreType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Ignore {
|
pub struct Ignore {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::InviteType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Invite {
|
pub struct Invite {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::JoinType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Join {
|
pub struct Join {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -23,114 +23,114 @@ use serde::{
|
||||||
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Accept)]
|
#[activitystreams(Accept)]
|
||||||
pub struct AcceptType;
|
pub struct AcceptType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Add)]
|
#[activitystreams(Add)]
|
||||||
pub struct AddType;
|
pub struct AddType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Move)]
|
#[activitystreams(Move)]
|
||||||
pub struct MoveType;
|
pub struct MoveType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Announce)]
|
#[activitystreams(Announce)]
|
||||||
pub struct AnnounceType;
|
pub struct AnnounceType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Arrive)]
|
#[activitystreams(Arrive)]
|
||||||
pub struct ArriveType;
|
pub struct ArriveType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Block)]
|
#[activitystreams(Block)]
|
||||||
pub struct BlockType;
|
pub struct BlockType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Create)]
|
#[activitystreams(Create)]
|
||||||
pub struct CreateType;
|
pub struct CreateType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Delete)]
|
#[activitystreams(Delete)]
|
||||||
pub struct DeleteType;
|
pub struct DeleteType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Dislike)]
|
#[activitystreams(Dislike)]
|
||||||
pub struct DislikeType;
|
pub struct DislikeType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Flag)]
|
#[activitystreams(Flag)]
|
||||||
pub struct FlagType;
|
pub struct FlagType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Follow)]
|
#[activitystreams(Follow)]
|
||||||
pub struct FollowType;
|
pub struct FollowType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Ignore)]
|
#[activitystreams(Ignore)]
|
||||||
pub struct IgnoreType;
|
pub struct IgnoreType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Invite)]
|
#[activitystreams(Invite)]
|
||||||
pub struct InviteType;
|
pub struct InviteType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Join)]
|
#[activitystreams(Join)]
|
||||||
pub struct JoinType;
|
pub struct JoinType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Leave)]
|
#[activitystreams(Leave)]
|
||||||
pub struct LeaveType;
|
pub struct LeaveType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Like)]
|
#[activitystreams(Like)]
|
||||||
pub struct LikeType;
|
pub struct LikeType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Listen)]
|
#[activitystreams(Listen)]
|
||||||
pub struct ListenType;
|
pub struct ListenType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Offer)]
|
#[activitystreams(Offer)]
|
||||||
pub struct OfferType;
|
pub struct OfferType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Question)]
|
#[activitystreams(Question)]
|
||||||
pub struct QuestionType;
|
pub struct QuestionType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Real)]
|
#[activitystreams(Real)]
|
||||||
pub struct ReadType;
|
pub struct ReadType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Reject)]
|
#[activitystreams(Reject)]
|
||||||
pub struct RejectType;
|
pub struct RejectType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Remove)]
|
#[activitystreams(Remove)]
|
||||||
pub struct RemoveType;
|
pub struct RemoveType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(TentativeAccept)]
|
#[activitystreams(TentativeAccept)]
|
||||||
pub struct TentativeAcceptType;
|
pub struct TentativeAcceptType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(TentativeReject)]
|
#[activitystreams(TentativeReject)]
|
||||||
pub struct TentativeRejectType;
|
pub struct TentativeRejectType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Travel)]
|
#[activitystreams(Travel)]
|
||||||
pub struct TravelType;
|
pub struct TravelType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Undo)]
|
#[activitystreams(Undo)]
|
||||||
pub struct UndoType;
|
pub struct UndoType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Update)]
|
#[activitystreams(Update)]
|
||||||
pub struct UpdateType;
|
pub struct UpdateType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(View)]
|
#[activitystreams(View)]
|
||||||
pub struct ViewType;
|
pub struct ViewType;
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::LeaveType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Leave {
|
pub struct Leave {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::LikeType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Like {
|
pub struct Like {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::ListenType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Listen {
|
pub struct Listen {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::OfferType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Offer {
|
pub struct Offer {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -22,7 +22,7 @@ use serde_json;
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::Object;
|
use object::Object;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ActivityProperties {
|
pub struct ActivityProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::QuestionType, properties::ActivityProperties, Activity, Intran
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Question {
|
pub struct Question {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::ReadType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Read {
|
pub struct Read {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::RejectType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Reject {
|
pub struct Reject {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::RemoveType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Remove {
|
pub struct Remove {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::TentativeAcceptType, properties::ActivityProperties, Activity}
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct TentativeAccept {
|
pub struct TentativeAccept {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::TentativeRejectType, properties::ActivityProperties, Activity}
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct TentativeReject {
|
pub struct TentativeReject {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::TravelType, properties::ActivityProperties, Activity, Intransi
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Travel {
|
pub struct Travel {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::UndoType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Undo {
|
pub struct Undo {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::UpdateType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Update {
|
pub struct Update {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use super::{kind::ViewType, properties::ActivityProperties, Activity};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::{Object, ObjectProperties};
|
use object::{Object, ObjectProperties};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct View {
|
pub struct View {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -23,22 +23,22 @@ use serde::{
|
||||||
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Application)]
|
#[activitystreams(Application)]
|
||||||
pub struct ApplicationType;
|
pub struct ApplicationType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Group)]
|
#[activitystreams(Group)]
|
||||||
pub struct GroupType;
|
pub struct GroupType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Organization)]
|
#[activitystreams(Organization)]
|
||||||
pub struct OrganizationType;
|
pub struct OrganizationType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Person)]
|
#[activitystreams(Person)]
|
||||||
pub struct PersonType;
|
pub struct PersonType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Service)]
|
#[activitystreams(Service)]
|
||||||
pub struct ServiceType;
|
pub struct ServiceType;
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub use self::kind::*;
|
||||||
|
|
||||||
pub trait Actor: Object {}
|
pub trait Actor: Object {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Appliation {
|
pub struct Appliation {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -36,7 +36,7 @@ pub struct Appliation {
|
||||||
|
|
||||||
impl Object for Appliation {}
|
impl Object for Appliation {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Group {
|
pub struct Group {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -48,7 +48,7 @@ pub struct Group {
|
||||||
|
|
||||||
impl Object for Group {}
|
impl Object for Group {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Organization {
|
pub struct Organization {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -60,7 +60,7 @@ pub struct Organization {
|
||||||
|
|
||||||
impl Object for Organization {}
|
impl Object for Organization {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Person {
|
pub struct Person {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -72,7 +72,7 @@ pub struct Person {
|
||||||
|
|
||||||
impl Object for Person {}
|
impl Object for Person {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Service {
|
pub struct Service {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -23,18 +23,18 @@ use serde::{
|
||||||
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Collection)]
|
#[activitystreams(Collection)]
|
||||||
pub struct CollectionType;
|
pub struct CollectionType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(CollectionPage)]
|
#[activitystreams(CollectionPage)]
|
||||||
pub struct CollectionPageType;
|
pub struct CollectionPageType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(OrderedCollection)]
|
#[activitystreams(OrderedCollection)]
|
||||||
pub struct OrderedCollectionType;
|
pub struct OrderedCollectionType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(OrderedCollectionPage)]
|
#[activitystreams(OrderedCollectionPage)]
|
||||||
pub struct OrderedCollectionPageType;
|
pub struct OrderedCollectionPageType;
|
||||||
|
|
|
@ -27,7 +27,7 @@ mod properties;
|
||||||
pub use self::kind::*;
|
pub use self::kind::*;
|
||||||
pub use self::properties::*;
|
pub use self::properties::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Collection {
|
pub struct Collection {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -42,7 +42,7 @@ pub struct Collection {
|
||||||
|
|
||||||
impl Object for Collection {}
|
impl Object for Collection {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct OrderedCollection {
|
pub struct OrderedCollection {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -57,7 +57,7 @@ pub struct OrderedCollection {
|
||||||
|
|
||||||
impl Object for OrderedCollection {}
|
impl Object for OrderedCollection {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CollectionPage {
|
pub struct CollectionPage {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -75,7 +75,7 @@ pub struct CollectionPage {
|
||||||
|
|
||||||
impl Object for CollectionPage {}
|
impl Object for CollectionPage {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct OrderedCollectionPage {
|
pub struct OrderedCollectionPage {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -22,7 +22,7 @@ use serde_json;
|
||||||
use super::{Collection, CollectionPage};
|
use super::{Collection, CollectionPage};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CollectionProperties {
|
pub struct CollectionProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -42,7 +42,7 @@ pub struct CollectionProperties {
|
||||||
last: Option<serde_json::Value>,
|
last: Option<serde_json::Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CollectionPageProperties {
|
pub struct CollectionPageProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -58,7 +58,7 @@ pub struct CollectionPageProperties {
|
||||||
prev: Option<serde_json::Value>,
|
prev: Option<serde_json::Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct OrderedCollectionPageProperties {
|
pub struct OrderedCollectionPageProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use object::Object;
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CustomLink<C, L> {
|
pub struct CustomLink<C, L> {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
link: L,
|
pub link: L,
|
||||||
|
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub custom_props: C,
|
pub custom_props: C,
|
||||||
|
@ -40,7 +40,7 @@ impl<C, L: Link> CustomLink<C, L> {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CustomObject<C, O> {
|
pub struct CustomObject<C, O> {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
object: O,
|
pub object: O,
|
||||||
|
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub custom_props: C,
|
pub custom_props: C,
|
||||||
|
|
|
@ -23,6 +23,6 @@ use serde::{
|
||||||
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Mention)]
|
#[activitystreams(Mention)]
|
||||||
pub struct MentionType;
|
pub struct MentionType;
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub use self::properties::*;
|
||||||
|
|
||||||
pub trait Link: DeserializeOwned + Serialize {}
|
pub trait Link: DeserializeOwned + Serialize {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Mention {
|
pub struct Mention {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -24,7 +24,7 @@ use error::{Error, Result};
|
||||||
use link::Link;
|
use link::Link;
|
||||||
use object::Object;
|
use object::Object;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct LinkProperties {
|
pub struct LinkProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
|
|
@ -23,50 +23,50 @@ use serde::{
|
||||||
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
de::{self, Deserialize, Deserializer, Visitor}, ser::{Serialize, Serializer},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Article)]
|
#[activitystreams(Article)]
|
||||||
pub struct ArticleType;
|
pub struct ArticleType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Audio)]
|
#[activitystreams(Audio)]
|
||||||
pub struct AudioType;
|
pub struct AudioType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Document)]
|
#[activitystreams(Document)]
|
||||||
pub struct DocumentType;
|
pub struct DocumentType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Event)]
|
#[activitystreams(Event)]
|
||||||
pub struct EventType;
|
pub struct EventType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Image)]
|
#[activitystreams(Image)]
|
||||||
pub struct ImageType;
|
pub struct ImageType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Note)]
|
#[activitystreams(Note)]
|
||||||
pub struct NoteType;
|
pub struct NoteType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Page)]
|
#[activitystreams(Page)]
|
||||||
pub struct PageType;
|
pub struct PageType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Place)]
|
#[activitystreams(Place)]
|
||||||
pub struct PlaceType;
|
pub struct PlaceType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Profile)]
|
#[activitystreams(Profile)]
|
||||||
pub struct ProfileType;
|
pub struct ProfileType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Relationship)]
|
#[activitystreams(Relationship)]
|
||||||
pub struct RelationshipType;
|
pub struct RelationshipType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Tombstone)]
|
#[activitystreams(Tombstone)]
|
||||||
pub struct TombstoneType;
|
pub struct TombstoneType;
|
||||||
|
|
||||||
#[derive(Clone, Debug, UnitString)]
|
#[derive(Clone, Debug, Default, UnitString)]
|
||||||
#[activitystreams(Video)]
|
#[activitystreams(Video)]
|
||||||
pub struct VideoType;
|
pub struct VideoType;
|
||||||
|
|
|
@ -29,7 +29,7 @@ pub use self::properties::*;
|
||||||
|
|
||||||
pub trait Object: DeserializeOwned + Serialize {}
|
pub trait Object: DeserializeOwned + Serialize {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Article {
|
pub struct Article {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -41,7 +41,7 @@ pub struct Article {
|
||||||
|
|
||||||
impl Object for Article {}
|
impl Object for Article {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Audio {
|
pub struct Audio {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -53,7 +53,7 @@ pub struct Audio {
|
||||||
|
|
||||||
impl Object for Audio {}
|
impl Object for Audio {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Document {
|
pub struct Document {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -65,7 +65,7 @@ pub struct Document {
|
||||||
|
|
||||||
impl Object for Document {}
|
impl Object for Document {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Event {
|
pub struct Event {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -77,7 +77,7 @@ pub struct Event {
|
||||||
|
|
||||||
impl Object for Event {}
|
impl Object for Event {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Image {
|
pub struct Image {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -89,7 +89,7 @@ pub struct Image {
|
||||||
|
|
||||||
impl Object for Image {}
|
impl Object for Image {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Note {
|
pub struct Note {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -101,7 +101,7 @@ pub struct Note {
|
||||||
|
|
||||||
impl Object for Note {}
|
impl Object for Note {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Page {
|
pub struct Page {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -113,7 +113,7 @@ pub struct Page {
|
||||||
|
|
||||||
impl Object for Page {}
|
impl Object for Page {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Place {
|
pub struct Place {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -128,7 +128,7 @@ pub struct Place {
|
||||||
|
|
||||||
impl Object for Place {}
|
impl Object for Place {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Profile {
|
pub struct Profile {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -143,7 +143,7 @@ pub struct Profile {
|
||||||
|
|
||||||
impl Object for Profile {}
|
impl Object for Profile {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Relationship {
|
pub struct Relationship {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -164,7 +164,7 @@ pub struct Relationship {
|
||||||
|
|
||||||
impl Object for Relationship {}
|
impl Object for Relationship {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Tombstone {
|
pub struct Tombstone {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
@ -179,7 +179,7 @@ pub struct Tombstone {
|
||||||
|
|
||||||
impl Object for Tombstone {}
|
impl Object for Tombstone {}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Video {
|
pub struct Video {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
|
|
|
@ -28,7 +28,7 @@ use object::{Image, Object};
|
||||||
|
|
||||||
pub type UtcTime = DateTime<Utc>;
|
pub type UtcTime = DateTime<Utc>;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ObjectProperties {
|
pub struct ObjectProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -148,7 +148,7 @@ impl ObjectProperties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct PlaceProperties {
|
pub struct PlaceProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -172,7 +172,7 @@ pub struct PlaceProperties {
|
||||||
radius: Option<serde_json::Value>,
|
radius: Option<serde_json::Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Properties)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize, Properties)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct TombstoneProperties {
|
pub struct TombstoneProperties {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
|
Loading…
Reference in a new issue