Skip to main content

ApActorProperties

Struct ApActorProperties 

Source
pub struct ApActorProperties {
    pub inbox: XsdAnyUri,
    pub outbox: XsdAnyUri,
    pub following: Option<XsdAnyUri>,
    pub followers: Option<XsdAnyUri>,
    pub liked: Option<XsdAnyUri>,
    pub streams: Option<ApActorPropertiesStreamsEnum>,
    pub preferred_username: Option<XsdString>,
    pub endpoints: Option<EndpointProperties>,
}
Expand description

Define activitypub properties for the Actor type as described by the Activity Pub vocabulary.

Fields§

§inbox: XsdAnyUri

A reference to an [ActivityStreams] OrderedCollection comprised of all the messages received by the actor.

  • Range: xsd:anyUri
  • Functional: true
§outbox: XsdAnyUri

An ActivityStreams] OrderedCollection comprised of all the messages produced by the actor.

  • Range: xsd:anyUri
  • Functional: true
§following: Option<XsdAnyUri>

A link to an [ActivityStreams] collection of the actors that this actor is following.

  • Range: xsd:anyUri
  • Functional: true
§followers: Option<XsdAnyUri>

A link to an [ActivityStreams] collection of the actors that follow this actor.

  • Range: xsd:anyUri
  • Functional: true
§liked: Option<XsdAnyUri>

A link to an [ActivityStreams] collection of objects this actor has liked.

  • Range: xsd:anyUri
  • Functional: true
§streams: Option<ApActorPropertiesStreamsEnum>

A list of supplementary Collections which may be of interest.

  • Range: xsd:anyUri
  • Functional: false
§preferred_username: Option<XsdString>

A short username which may be used to refer to the actor, with no uniqueness guarantees.

  • Range: xsd:string
  • Functional: true
§endpoints: Option<EndpointProperties>

A json object which maps additional (typically server/domain-wide) endpoints which may be useful either for this actor or someone referencing this actor.

This mapping may be nested inside the actor document as the value or may be a link to a JSON-LD document with these properties.

  • Range: Endpoint
  • Functional: true

Implementations§

Source§

impl ApActorProperties

Source

pub fn get_inbox(&self) -> &XsdAnyUri

Get the inbox as XsdAnyUri

Source

pub fn set_inbox<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set inbox with a type that can be cnoverted into a XsdAnyUri

Source

pub fn get_outbox(&self) -> &XsdAnyUri

Get the outbox as XsdAnyUri

Source

pub fn set_outbox<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set outbox with a type that can be cnoverted into a XsdAnyUri

Source

pub fn get_following(&self) -> Option<&XsdAnyUri>

Get following as a XsdAnyUri

This returns None if there is no value present

Source

pub fn set_following<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set the following with a type that can be converted into XsdAnyUri

Source

pub fn get_followers(&self) -> Option<&XsdAnyUri>

Get followers as a XsdAnyUri

This returns None if there is no value present

Source

pub fn set_followers<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set the followers with a type that can be converted into XsdAnyUri

Source

pub fn get_liked(&self) -> Option<&XsdAnyUri>

Get liked as a XsdAnyUri

This returns None if there is no value present

Source

pub fn set_liked<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set the liked with a type that can be converted into XsdAnyUri

Source

pub fn get_streams(&self) -> Option<&XsdAnyUri>

Get streams as a XsdAnyUri

This returns None if

  • There is no value present
  • There is more than one value present
Source

pub fn set_streams<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set the streams with a type that can be converted into XsdAnyUri

Source

pub fn get_many_streams(&self) -> Option<&[XsdAnyUri]>

Get streams as a slice of XsdAnyUris

This returns None if

  • There is no value present
  • There is only one value present
Source

pub fn set_many_streams<T>( &mut self, item: Vec<T>, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Set the streams with a vector of types that can be converted into XsdAnyUris

Source

pub fn add_streams<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
where T: TryInto<XsdAnyUri>,

Add a type that can be converted into a XsdAnyUri to the streams vec

Source

pub fn get_preferred_username(&self) -> Option<&XsdString>

Get preferred_username as a XsdString

This returns None if there is no value present

Source

pub fn set_preferred_username<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdString>>::Error>
where T: TryInto<XsdString>,

Set the preferred_username with a type that can be converted into XsdString

Source

pub fn get_endpoints(&self) -> Option<&EndpointProperties>

Get endpoints as a EndpointProperties

This returns None if there is no value present

Source

pub fn set_endpoints<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<EndpointProperties>>::Error>

Set the endpoints with a type that can be converted into EndpointProperties

Trait Implementations§

Source§

impl Clone for ApActorProperties

Source§

fn clone(&self) -> ApActorProperties

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApActorProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ApActorProperties

Source§

fn default() -> ApActorProperties

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ApActorProperties

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Extension<T> for ApActorProperties
where T: Actor,

Source§

fn extends(self, base: T) -> Ext<T, Self>
where Self: Sized,

A default implementation that simply returns the Ext type with Self and the base type inside of it.
Source§

impl Serialize for ApActorProperties

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,