[][src]Struct actix_webfinger::Webfinger

pub struct Webfinger {
    pub aliases: Vec<String>,
    pub links: Vec<Link>,
    pub subject: String,
}

The webfinger type

Webfinger data has three parts

  • aliases
  • links
  • subject

subject defines the name or primary identifier of the object being looked up. aliases are alternate names for the object. links are references to more information about the subject, and can be in a variety of formats. For example, some links will reference activitypub person objects, and others will contain public key data.

This type can be serialized and deserialized

Fields

aliases: Vec<String>links: Vec<Link>subject: String

Methods

impl Webfinger
[src]

pub fn new(subject: &str) -> Self
[src]

Create a new Webfinger with the given subject

pub fn add_aliases(&mut self, aliases: &[String]) -> &mut Self
[src]

Add multiple aliases to the Webfinger

pub fn add_alias(&mut self, alias: &str) -> &mut Self
[src]

Add a single alias to the Webfinger

pub fn aliases(&self) -> &[String]
[src]

Get the aliases for this Webfinger

Add multiple Links to this Webfinger

Add single Link to this Webfinger

Get the Links from this Webfinger

pub fn add_activitypub(&mut self, href: &str) -> &mut Self
[src]

Add an Activitypub link to this Webfinger

pub fn activitypub(&self) -> Option<&Link>
[src]

Get an Activitypub link from this Webfinger

pub fn add_profile(&mut self, href: &str) -> &mut Self
[src]

Add a profile link to this Webfinger

pub fn profile(&self) -> Option<&Link>
[src]

Get a profile link from this Webfinger

pub fn add_atom(&mut self, href: &str) -> &mut Self
[src]

Add an atom link to this Webfinger

pub fn atom(&self) -> Option<&Link>
[src]

Get an atom link from this Webfinger

pub fn set_salmon(&mut self, href: &str) -> &mut Self
[src]

Set a salmon link from this Webfinger

pub fn salmon(&self) -> Option<&Link>
[src]

Get a salmon link from this Webfinger

pub fn set_magic_public_key(&mut self, magic_public_key: &str) -> &mut Self
[src]

Set a magic public key link for this Webfinger

pub fn magic_public_key(&self) -> Option<&Link>
[src]

Get a magic public key link from this Webfinger

pub fn set_ostatus(&mut self, template: &str) -> &mut Self
[src]

Set an ostatus link for this Webfinger

pub fn ostatus(&self) -> Option<&Link>
[src]

Get an ostatus link from this Webfinger

pub fn respond(self) -> HttpResponse
[src]

Turn this Webfinger into an actix web HttpResponse

pub fn fetch(
    conn: Addr<ClientConnector>,
    user: &str,
    domain: &str,
    https: bool
) -> Box<dyn Future<Item = Self, Error = Error>>
[src]

Fetch a webfinger with subject user from a given domain

This method takes an Addr<ClientConnector> so derivative works can provide their own SSL connector implemenation (currently with OpenSSL or Rustls)

Trait Implementations

impl Clone for Webfinger
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Webfinger
[src]

impl Serialize for Webfinger
[src]

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

Auto Trait Implementations

impl Send for Webfinger

impl Sync for Webfinger

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Erased for T

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