Skip to main content

SimpleActor

Struct SimpleActor 

Source
pub struct SimpleActor {
    pub id: Url,
    pub kind: String,
    pub inbox: Url,
    pub outbox: Url,
    pub preferred_username: String,
    pub public_key: SimplePublicKey,
    pub name: Option<String>,
    pub endpoints: Option<SimpleEndpoints>,
    pub rest: Map<String, Value>,
}

Fields§

§id: Url§kind: String§inbox: Url§outbox: Url§preferred_username: String§public_key: SimplePublicKey§name: Option<String>§endpoints: Option<SimpleEndpoints>§rest: Map<String, Value>

Trait Implementations§

Source§

impl Actor for SimpleActor

Source§

fn inbox(&self) -> &Url

The actor’s inbox
Source§

fn outbox(&self) -> &Url

The actor’s outbox
Source§

fn preferred_username(&self) -> &str

The actor’s preferred username (handle)
Source§

fn public_key_id(&self) -> &Url

The actor’s public key ID
Source§

fn name(&self) -> Option<&str>

The actor’s display name
Source§

fn shared_inbox(&self) -> Option<&Url>

The actor’s shared inbox
Source§

fn canonical_name(&self) -> &str

Determine the name of an actor
Source§

fn delivery_inbox<O>(&self, obj: &O) -> &Url

Determine which inbox an object should be delievered to
Source§

impl ActorExt for SimpleActor

Source§

type PublicKeyId = PublicKeyId

The Public Key ID for dereferencing a Public key
Source§

fn public_key(&self) -> Option<Out<Self::PublicKeyId>>

Attempt to pull the public key off the actor
Source§

fn dereference_public_key<'life0, 'async_trait, I, R, S>( &'life0 self, actor_id: <I as Ingest<<Self::PublicKeyId as Dereference>::Output>>::ActorId, ingest: I, remote_repo: R, session: S, ) -> Pin<Box<dyn Future<Output = Result<Option<<Self::PublicKeyId as Dereference>::Output>, <I as Ingest<<Self::PublicKeyId as Dereference>::Output>>::Error>> + 'async_trait>>
where 'life0: 'async_trait, <I as Ingest<<Self::PublicKeyId as Dereference>::Output>>::Error: From<<R as Repo>::Error>, <I as Ingest<<Self::PublicKeyId as Dereference>::Output>>::ActorId: From<Url> + 'static, I: 'async_trait + Ingest<<Self::PublicKeyId as Dereference>::Output>, R: 'async_trait + Repo, S: 'async_trait + Session, Self: 'async_trait,

Pull the public key off the acctor, or fetch it from a repo if it isn’t present
Source§

impl Clone for SimpleActor

Source§

fn clone(&self) -> SimpleActor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SimpleActor

Source§

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

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

impl<'de> Deserialize<'de> for SimpleActor

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 Object for SimpleActor

Source§

type Kind = String

The Kind of object, e.g. Note, Video, Image, etc.
Source§

fn id(&self) -> &Url

The Object’s ID
Source§

fn kind(&self) -> &Self::Kind

The kind of Object
Source§

impl Serialize for SimpleActor

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.