[][src]Struct activitystreams::actor::properties::ApActorProperties

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>,
}

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

impl ApActorProperties[src]

pub fn get_inbox(&self) -> &XsdAnyUri[src]

Get the inbox as XsdAnyUri

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

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

pub fn get_outbox(&self) -> &XsdAnyUri[src]

Get the outbox as XsdAnyUri

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

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

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

Get following as a XsdAnyUri

This returns None if there is no value present

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

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

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

Get followers as a XsdAnyUri

This returns None if there is no value present

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

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

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

Get liked as a XsdAnyUri

This returns None if there is no value present

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

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

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

Get streams as a XsdAnyUri

This returns None if

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

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

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

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

Get streams as a slice of XsdAnyUris

This returns None if

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

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

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

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

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

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

Get preferred_username as a XsdString

This returns None if there is no value present

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

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

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

Get endpoints as a EndpointProperties

This returns None if there is no value present

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

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

Trait Implementations

impl Clone for ApActorProperties[src]

impl Debug for ApActorProperties[src]

impl Default for ApActorProperties[src]

impl<'de> Deserialize<'de> for ApActorProperties[src]

impl<T> Extension<T> for ApActorProperties where
    T: Actor
[src]

impl Serialize for ApActorProperties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.