Actor

Trait Actor 

Source
pub trait Actor: Object {
    // Required methods
    fn inbox(&self) -> &Url;
    fn outbox(&self) -> &Url;
    fn preferred_username(&self) -> &str;
    fn public_key_id(&self) -> &Url;
    fn name(&self) -> Option<&str>;
    fn shared_inbox(&self) -> Option<&Url>;

    // Provided methods
    fn canonical_name(&self) -> &str { ... }
    fn delivery_inbox<O: DeliverableObject>(&self, obj: &O) -> &Url { ... }
}
Expand description

A type that represents an Actor

Required Methods§

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

Provided Methods§

Source

fn canonical_name(&self) -> &str

Determine the name of an actor

Source

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

Determine which inbox an object should be delievered to

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T> Actor for &'a T
where T: Actor,

Source§

fn inbox(&self) -> &Url

Source§

fn outbox(&self) -> &Url

Source§

fn preferred_username(&self) -> &str

Source§

fn public_key_id(&self) -> &Url

Source§

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

Source§

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

Source§

impl<'a, T> Actor for &'a mut T
where T: Actor,

Source§

fn inbox(&self) -> &Url

Source§

fn outbox(&self) -> &Url

Source§

fn preferred_username(&self) -> &str

Source§

fn public_key_id(&self) -> &Url

Source§

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

Source§

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

Source§

impl<T> Actor for Box<T>
where T: Actor,

Source§

fn inbox(&self) -> &Url

Source§

fn outbox(&self) -> &Url

Source§

fn preferred_username(&self) -> &str

Source§

fn public_key_id(&self) -> &Url

Source§

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

Source§

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

Source§

impl<T> Actor for Rc<T>
where T: Actor,

Source§

fn inbox(&self) -> &Url

Source§

fn outbox(&self) -> &Url

Source§

fn preferred_username(&self) -> &str

Source§

fn public_key_id(&self) -> &Url

Source§

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

Source§

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

Source§

impl<T> Actor for Arc<T>
where T: Actor,

Source§

fn inbox(&self) -> &Url

Source§

fn outbox(&self) -> &Url

Source§

fn preferred_username(&self) -> &str

Source§

fn public_key_id(&self) -> &Url

Source§

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

Source§

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

Implementors§