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: XsdAnyUriA reference to an [ActivityStreams] OrderedCollection comprised of all the messages received by the actor.
- Range:
xsd:anyUri - Functional: true
outbox: XsdAnyUriAn 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
impl ApActorProperties
Sourcepub fn set_inbox<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_inbox<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set inbox with a type that can be cnoverted into a XsdAnyUri
Sourcepub fn get_outbox(&self) -> &XsdAnyUri
pub fn get_outbox(&self) -> &XsdAnyUri
Get the outbox as XsdAnyUri
Sourcepub fn set_outbox<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_outbox<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set outbox with a type that can be cnoverted into a XsdAnyUri
Sourcepub fn get_following(&self) -> Option<&XsdAnyUri>
pub fn get_following(&self) -> Option<&XsdAnyUri>
Get following as a XsdAnyUri
This returns None if there is no value present
Sourcepub fn set_following<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_following<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set the following with a type that can be converted into XsdAnyUri
Sourcepub fn get_followers(&self) -> Option<&XsdAnyUri>
pub fn get_followers(&self) -> Option<&XsdAnyUri>
Get followers as a XsdAnyUri
This returns None if there is no value present
Sourcepub fn set_followers<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_followers<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set the followers with a type that can be converted into XsdAnyUri
Sourcepub fn get_liked(&self) -> Option<&XsdAnyUri>
pub fn get_liked(&self) -> Option<&XsdAnyUri>
Get liked as a XsdAnyUri
This returns None if there is no value present
Sourcepub fn set_liked<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_liked<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set the liked with a type that can be converted into XsdAnyUri
Sourcepub fn get_streams(&self) -> Option<&XsdAnyUri>
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
Sourcepub fn set_streams<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_streams<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set the streams with a type that can be converted into XsdAnyUri
Sourcepub fn get_many_streams(&self) -> Option<&[XsdAnyUri]>
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
Sourcepub fn set_many_streams<T>(
&mut self,
item: Vec<T>,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn set_many_streams<T>( &mut self, item: Vec<T>, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Set the streams with a vector of types that can be converted into XsdAnyUris
Sourcepub fn add_streams<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
pub fn add_streams<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error>
Add a type that can be converted into a XsdAnyUri to the streams vec
Sourcepub fn get_preferred_username(&self) -> Option<&XsdString>
pub fn get_preferred_username(&self) -> Option<&XsdString>
Get preferred_username as a XsdString
This returns None if there is no value present
Sourcepub fn set_preferred_username<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<XsdString>>::Error>
pub fn set_preferred_username<T>( &mut self, item: T, ) -> Result<&mut Self, <T as TryInto<XsdString>>::Error>
Set the preferred_username with a type that can be converted into XsdString
Sourcepub fn get_endpoints(&self) -> Option<&EndpointProperties>
pub fn get_endpoints(&self) -> Option<&EndpointProperties>
Get endpoints as a EndpointProperties
This returns None if there is no value present
Sourcepub fn set_endpoints<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<EndpointProperties>>::Error>where
T: TryInto<EndpointProperties>,
pub fn set_endpoints<T>(
&mut self,
item: T,
) -> Result<&mut Self, <T as TryInto<EndpointProperties>>::Error>where
T: TryInto<EndpointProperties>,
Set the endpoints with a type that can be converted into EndpointProperties
Trait Implementations§
Source§impl Clone for ApActorProperties
impl Clone for ApActorProperties
Source§fn clone(&self) -> ApActorProperties
fn clone(&self) -> ApActorProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more