[][src]Trait activitystreams::object::ObjectExt

pub trait ObjectExt<Kind>: AsObject<Kind> {
    fn attachment<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_attachment<T>(&mut self, attachment: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_attachments<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_attachment<T>(&mut self, attachment: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_attachment(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_attachment(&mut self) -> &mut Self { ... }
fn attributed_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_attributed_to<T>(&mut self, attributed_to: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_attributed_tos<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_attributed_to<T>(&mut self, attributed_to: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_attributed_to(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_attributed_to(&mut self) -> &mut Self { ... }
fn audience<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_audience<T>(&mut self, audience: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_audiences<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_audience<T>(&mut self, audience: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_audience(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_audience(&mut self) -> &mut Self { ... }
fn content<'a>(&'a self) -> Option<&'a OneOrMany<AnyString>>
    where
        Kind: 'a
, { ... }
fn set_content<T>(&mut self, content: T) -> &mut Self
    where
        T: Into<AnyString>
, { ... }
fn set_many_contents<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyString>
, { ... }
fn add_content<T>(&mut self, content: T) -> &mut Self
    where
        T: Into<AnyString>
, { ... }
fn take_content(&mut self) -> Option<OneOrMany<AnyString>> { ... }
fn delete_content(&mut self) -> &mut Self { ... }
fn summary<'a>(&'a self) -> Option<&'a OneOrMany<AnyString>>
    where
        Kind: 'a
, { ... }
fn set_summary<T>(&mut self, summary: T) -> &mut Self
    where
        T: Into<AnyString>
, { ... }
fn set_many_summaries<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyString>
, { ... }
fn add_summary<T>(&mut self, summary: T) -> &mut Self
    where
        T: Into<AnyString>
, { ... }
fn take_summary(&mut self) -> Option<OneOrMany<AnyString>> { ... }
fn delete_summary(&mut self) -> &mut Self { ... }
fn url<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_url<T>(&mut self, url: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_urls<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_url<T>(&mut self, url: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_url(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_url(&mut self) -> &mut Self { ... }
fn generator<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_generator<T>(&mut self, generator: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_generators<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_generator<T>(&mut self, generator: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_generator(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_generator(&mut self) -> &mut Self { ... }
fn icon<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_icon<T>(&mut self, icon: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_icons<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_icon<T>(&mut self, icon: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_icon(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_icon(&mut self) -> &mut Self { ... }
fn image<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_image<T>(&mut self, image: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_images<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_image<T>(&mut self, image: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_image(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_image(&mut self) -> &mut Self { ... }
fn location<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_location<T>(&mut self, location: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_locations<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_location<T>(&mut self, location: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_location(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_location(&mut self) -> &mut Self { ... }
fn tag<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_tag<T>(&mut self, tag: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_tags<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_tag<T>(&mut self, tag: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_tag(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_tag(&mut self) -> &mut Self { ... }
fn start_time<'a>(&'a self) -> Option<DateTime<FixedOffset>>
    where
        Kind: 'a
, { ... }
fn set_start_time(&mut self, start_time: DateTime<FixedOffset>) -> &mut Self { ... }
fn take_start_time(&mut self) -> Option<DateTime<FixedOffset>> { ... }
fn delete_start_time(&mut self) -> &mut Self { ... }
fn end_time<'a>(&'a self) -> Option<DateTime<FixedOffset>>
    where
        Kind: 'a
, { ... }
fn set_end_time(&mut self, end_time: DateTime<FixedOffset>) -> &mut Self { ... }
fn take_end_time(&mut self) -> Option<DateTime<FixedOffset>> { ... }
fn delete_end_time(&mut self) -> &mut Self { ... }
fn duration<'a>(&'a self) -> Option<Duration>
    where
        Kind: 'a
, { ... }
fn set_duration(&mut self, duration: Duration) -> &mut Self { ... }
fn take_duration(&mut self) -> Option<Duration> { ... }
fn delete_duration(&mut self) -> &mut Self { ... }
fn published<'a>(&'a self) -> Option<DateTime<FixedOffset>>
    where
        Kind: 'a
, { ... }
fn set_published(&mut self, published: DateTime<FixedOffset>) -> &mut Self { ... }
fn take_published(&mut self) -> Option<DateTime<FixedOffset>> { ... }
fn delete_published(&mut self) -> &mut Self { ... }
fn updated<'a>(&'a self) -> Option<DateTime<FixedOffset>>
    where
        Kind: 'a
, { ... }
fn set_updated(&mut self, updated: DateTime<FixedOffset>) -> &mut Self { ... }
fn take_updated(&mut self) -> Option<DateTime<FixedOffset>> { ... }
fn delete_updated(&mut self) -> &mut Self { ... }
fn in_reply_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_in_reply_tos<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_in_reply_to(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_in_reply_to(&mut self) -> &mut Self { ... }
fn replies<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_replies<T>(&mut self, replies: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_replies<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_replies<T>(&mut self, replies: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_replies(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_replies(&mut self) -> &mut Self { ... }
fn to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_to<T>(&mut self, to: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_tos<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_to<T>(&mut self, to: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_to(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_to(&mut self) -> &mut Self { ... }
fn bto<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_bto<T>(&mut self, bto: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_btos<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_bto<T>(&mut self, bto: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_bto(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_bto(&mut self) -> &mut Self { ... }
fn cc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_cc<T>(&mut self, cc: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_ccs<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_cc<T>(&mut self, cc: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_cc(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_cc(&mut self) -> &mut Self { ... }
fn bcc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Kind: 'a
, { ... }
fn set_bcc<T>(&mut self, bcc: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn set_many_bcc<I, T>(&mut self, items: I) -> &mut Self
    where
        I: IntoIterator<Item = T>,
        T: Into<AnyBase>
, { ... }
fn add_bcc<T>(&mut self, bcc: T) -> &mut Self
    where
        T: Into<AnyBase>
, { ... }
fn take_bcc(&mut self) -> Option<OneOrMany<AnyBase>> { ... }
fn delete_bcc(&mut self) -> &mut Self { ... } }

Helper methods for interacting with Object types

This trait represents methods valid for any ActivityStreams Object.

Documentation for the fields related to these methods can be found on the Object struct

Provided methods

fn attachment<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the attachment for the current object

use activitystreams::prelude::*;

if let Some(attachment) = video.attachment() {
    println!("{:?}", attachment);
}

fn set_attachment<T>(&mut self, attachment: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the attachment for the current object

This overwrites the contents of attachment

use activitystreams::prelude::*;

video.set_attachment(uri!("https://example.com"));

fn set_many_attachments<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many attachments for the current object

This overwrites the contents of attachment

use activitystreams::prelude::*;

video.set_many_attachments(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_attachment<T>(&mut self, attachment: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a attachment to the current object

This does not overwrite the contents of attachment, only appends an item

use activitystreams::prelude::*;

video
    .add_attachment(uri!("https://example.com/one"))
    .add_attachment(uri!("https://example.com/two"));

fn take_attachment(&mut self) -> Option<OneOrMany<AnyBase>>

Take the attachment from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(attachment) = video.take_attachment() {
    println!("{:?}", attachment);
}

fn delete_attachment(&mut self) -> &mut Self

Delete the attachment from the current object

use activitystreams::prelude::*;

assert!(video.attachment().is_some());
video.delete_attachment();
assert!(video.attachment().is_none());

fn attributed_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the attributed_to for the current object

use activitystreams::prelude::*;

if let Some(attributed_to) = video.attributed_to() {
    println!("{:?}", attributed_to);
}

fn set_attributed_to<T>(&mut self, attributed_to: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the attributed_to for the current object

This overwrites the contents of attributed_to

use activitystreams::prelude::*;

video.set_attributed_to(uri!("https://example.com"));

fn set_many_attributed_tos<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many attributed_tos for the current object

This overwrites the contents of attributed_to

use activitystreams::prelude::*;

video.set_many_attributed_tos(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_attributed_to<T>(&mut self, attributed_to: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a attributed_to to the current object

This does not overwrite the contents of attributed_to, only appends an item

use activitystreams::prelude::*;

video
    .add_attributed_to(uri!("https://example.com/one"))
    .add_attributed_to(uri!("https://example.com/two"));

fn take_attributed_to(&mut self) -> Option<OneOrMany<AnyBase>>

Take the attributed_to from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(attributed_to) = video.take_attributed_to() {
    println!("{:?}", attributed_to);
}

fn delete_attributed_to(&mut self) -> &mut Self

Delete the attributed_to from the current object

use activitystreams::prelude::*;

assert!(video.attributed_to().is_some());
video.delete_attributed_to();
assert!(video.attributed_to().is_none());

fn audience<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the audience for the current object

use activitystreams::prelude::*;

if let Some(audience) = video.audience() {
    println!("{:?}", audience);
}

fn set_audience<T>(&mut self, audience: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the audience for the current object

This overwrites the contents of audience

use activitystreams::prelude::*;

video.set_audience(uri!("https://example.com"));

fn set_many_audiences<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

This overwrites the contents of audience

use activitystreams::prelude::*;

video.set_many_audiences(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_audience<T>(&mut self, audience: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a audience to the current object

This does not overwrite the contents of audience, only appends an item

use activitystreams::prelude::*;

video
    .add_audience(uri!("https://example.com/one"))
    .add_audience(uri!("https://example.com/two"));

fn take_audience(&mut self) -> Option<OneOrMany<AnyBase>>

Take the audience from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(audience) = video.take_audience() {
    println!("{:?}", audience);
}

fn delete_audience(&mut self) -> &mut Self

Delete the audience from the current object

use activitystreams::prelude::*;

assert!(video.audience().is_some());
video.delete_audience();
assert!(video.audience().is_none());

fn content<'a>(&'a self) -> Option<&'a OneOrMany<AnyString>> where
    Kind: 'a, 

Fetch the content for the current object

use activitystreams::prelude::*;

if let Some(content) = video.content() {
    println!("{:?}", content);
}

fn set_content<T>(&mut self, content: T) -> &mut Self where
    T: Into<AnyString>, 

Set the content for the current object

This overwrites the contents of content

use activitystreams::prelude::*;

video.set_content("hi");

fn set_many_contents<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyString>, 

Set many contents for the current object

This overwrites the contents of content

use activitystreams::prelude::*;

video.set_many_contents(vec!["hi", "hello"]);

fn add_content<T>(&mut self, content: T) -> &mut Self where
    T: Into<AnyString>, 

Add a content to the current object

This does not overwrite the contents of content, only appends an item

use activitystreams::prelude::*;

video
    .add_content("hi")
    .add_content("hello");

fn take_content(&mut self) -> Option<OneOrMany<AnyString>>

Take the content from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(content) = video.take_content() {
    println!("{:?}", content);
}

fn delete_content(&mut self) -> &mut Self

Delete the content from the current object

use activitystreams::prelude::*;

assert!(video.content().is_some());
video.delete_content();
assert!(video.content().is_none());

fn summary<'a>(&'a self) -> Option<&'a OneOrMany<AnyString>> where
    Kind: 'a, 

Fetch the summary for the current object

use activitystreams::prelude::*;

if let Some(summary) = video.summary() {
    println!("{:?}", summary);
}

fn set_summary<T>(&mut self, summary: T) -> &mut Self where
    T: Into<AnyString>, 

Set the summary for the current object

This overwrites the contents of summary

use activitystreams::prelude::*;

video.set_summary("hi");

fn set_many_summaries<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyString>, 

Set many summaries for the current object

This overwrites the contents of summary

use activitystreams::prelude::*;

video.set_many_summaries(vec![ "hi", "hello"]);

fn add_summary<T>(&mut self, summary: T) -> &mut Self where
    T: Into<AnyString>, 

Add a summary to the current object

This does not overwrite the contents of summary, only appends an item

use activitystreams::prelude::*;

video
    .add_summary("hi")
    .add_summary("hello");

fn take_summary(&mut self) -> Option<OneOrMany<AnyString>>

Take the summary from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(summary) = video.take_summary() {
    println!("{:?}", summary);
}

fn delete_summary(&mut self) -> &mut Self

Delete the summary from the current object

use activitystreams::prelude::*;

assert!(video.summary().is_some());
video.delete_summary();
assert!(video.summary().is_none());

fn url<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the url for the current object

use activitystreams::prelude::*;

if let Some(url) = video.url() {
    println!("{:?}", url);
}

fn set_url<T>(&mut self, url: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the url for the current object

This overwrites the contents of url

use activitystreams::prelude::*;

video.set_url(uri!("https://example.com"));

fn set_many_urls<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many urls for the current object

This overwrites the contents of url

use activitystreams::prelude::*;

video.set_many_urls(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_url<T>(&mut self, url: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a url to the current object

This does not overwrite the contents of url, only appends an item

use activitystreams::prelude::*;

video
    .add_url(uri!("https://example.com/one"))
    .add_url(uri!("https://example.com/two"));

fn take_url(&mut self) -> Option<OneOrMany<AnyBase>>

Take the url from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(url) = video.take_url() {
    println!("{:?}", url);
}

fn delete_url(&mut self) -> &mut Self

Delete the url from the current object

use activitystreams::prelude::*;

assert!(video.url().is_some());
video.delete_url();
assert!(video.url().is_none());

fn generator<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the generator for the current object

use activitystreams::prelude::*;

if let Some(generator) = video.generator() {
    println!("{:?}", generator);
}

fn set_generator<T>(&mut self, generator: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the generator for the current object

This overwrites the contents of generator

use activitystreams::prelude::*;

video.set_generator(uri!("https://example.com"));

fn set_many_generators<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many generators for the current object

This overwrites the contents of generator

use activitystreams::prelude::*;

video.set_many_generators(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_generator<T>(&mut self, generator: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a generator to the current object

This does not overwrite the contents of generator, only appends an item

use activitystreams::prelude::*;

video
    .add_generator(uri!("https://example.com/one"))
    .add_generator(uri!("https://example.com/two"));

fn take_generator(&mut self) -> Option<OneOrMany<AnyBase>>

Take the generator from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(generator) = video.take_generator() {
    println!("{:?}", generator);
}

fn delete_generator(&mut self) -> &mut Self

Delete the generator from the current object

use activitystreams::prelude::*;

assert!(video.generator().is_some());
video.delete_generator();
assert!(video.generator().is_none());

fn icon<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the icon for the current object

use activitystreams::prelude::*;

if let Some(icon) = video.icon() {
    println!("{:?}", icon);
}

fn set_icon<T>(&mut self, icon: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the icon for the current object

This overwrites the contents of icon

use activitystreams::prelude::*;

video.set_icon(uri!("https://example.com"));

fn set_many_icons<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many icons for the current object

This overwrites the contents of icon

use activitystreams::prelude::*;

video.set_many_icons(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_icon<T>(&mut self, icon: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a icon to the current object

This does not overwrite the contents of icon, only appends an item

use activitystreams::prelude::*;

video
    .add_icon(uri!("https://example.com/one"))
    .add_icon(uri!("https://example.com/two"));

fn take_icon(&mut self) -> Option<OneOrMany<AnyBase>>

Take the icon from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(icon) = video.take_icon() {
    println!("{:?}", icon);
}

fn delete_icon(&mut self) -> &mut Self

Delete the icon from the current object

use activitystreams::prelude::*;

assert!(video.icon().is_some());
video.delete_icon();
assert!(video.icon().is_none());

fn image<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the image for the current object

use activitystreams::prelude::*;

if let Some(image) = video.image() {
    println!("{:?}", image);
}

fn set_image<T>(&mut self, image: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the image for the current object

This overwrites the contents of image

use activitystreams::prelude::*;

video.set_image(uri!("https://example.com"));

fn set_many_images<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many images for the current object

This overwrites the contents of image

use activitystreams::prelude::*;

video.set_many_images(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_image<T>(&mut self, image: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a image to the current object

This does not overwrite the contents of image, only appends an item

use activitystreams::prelude::*;

video
    .add_image(uri!("https://example.com/one"))
    .add_image(uri!("https://example.com/two"));

fn take_image(&mut self) -> Option<OneOrMany<AnyBase>>

Take the image from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(image) = video.take_image() {
    println!("{:?}", image);
}

fn delete_image(&mut self) -> &mut Self

Delete the image from the current object

use activitystreams::prelude::*;

assert!(video.image().is_some());
video.delete_image();
assert!(video.image().is_none());

fn location<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the location for the current object

use activitystreams::prelude::*;

if let Some(location) = video.location() {
    println!("{:?}", location);
}

fn set_location<T>(&mut self, location: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the location for the current object

This overwrites the contents of location

use activitystreams::prelude::*;

video.set_location(uri!("https://example.com"));

fn set_many_locations<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many locations for the current object

This overwrites the contents of location

use activitystreams::prelude::*;

video.set_many_locations(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_location<T>(&mut self, location: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a location to the current object

This does not overwrite the contents of location, only appends an item

use activitystreams::prelude::*;

video
    .add_location(uri!("https://example.com/one"))
    .add_location(uri!("https://example.com/two"));

fn take_location(&mut self) -> Option<OneOrMany<AnyBase>>

Take the location from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(location) = video.take_location() {
    println!("{:?}", location);
}

fn delete_location(&mut self) -> &mut Self

Delete the location from the current object

use activitystreams::prelude::*;

assert!(video.location().is_some());
video.delete_location();
assert!(video.location().is_none());

fn tag<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the tag for the current object

use activitystreams::prelude::*;

if let Some(tag) = video.tag() {
    println!("{:?}", tag);
}

fn set_tag<T>(&mut self, tag: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the tag for the current object

This overwrites the contents of tag

use activitystreams::prelude::*;

video.set_tag(uri!("https://example.com"));

fn set_many_tags<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many tags for the current object

This overwrites the contents of tag

use activitystreams::prelude::*;

video.set_many_tags(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_tag<T>(&mut self, tag: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a tag to the current object

This does not overwrite the contents of tag, only appends an item

use activitystreams::prelude::*;

video
    .add_tag(uri!("https://example.com/one"))
    .add_tag(uri!("https://example.com/two"));

fn take_tag(&mut self) -> Option<OneOrMany<AnyBase>>

Take the tag from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(tag) = video.take_tag() {
    println!("{:?}", tag);
}

fn delete_tag(&mut self) -> &mut Self

Delete the tag from the current object

use activitystreams::prelude::*;

assert!(video.tag().is_some());
video.delete_tag();
assert!(video.tag().is_none());

fn start_time<'a>(&'a self) -> Option<DateTime<FixedOffset>> where
    Kind: 'a, 

Fetch the start_time for the current object

use activitystreams::prelude::*;

if let Some(start_time) = video.start_time() {
    println!("{:?}", start_time);
}

fn set_start_time(&mut self, start_time: DateTime<FixedOffset>) -> &mut Self

Set the start_time for the current object

This overwrites the contents of start_time

use activitystreams::prelude::*;

video.set_start_time("2020-04-20T04:20:00Z".parse()?);

fn take_start_time(&mut self) -> Option<DateTime<FixedOffset>>

Take the start_time from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(start_time) = video.take_start_time() {
    println!("{:?}", start_time);
}

fn delete_start_time(&mut self) -> &mut Self

Delete the start_time from the current object

use activitystreams::prelude::*;

assert!(video.start_time().is_some());
video.delete_start_time();
assert!(video.start_time().is_none());

fn end_time<'a>(&'a self) -> Option<DateTime<FixedOffset>> where
    Kind: 'a, 

Fetch the end_time for the current object

use activitystreams::prelude::*;

if let Some(end_time) = video.end_time() {
    println!("{:?}", end_time);
}

fn set_end_time(&mut self, end_time: DateTime<FixedOffset>) -> &mut Self

Set the end_time for the current object

This overwrites the contents of end_time

use activitystreams::prelude::*;

video.set_end_time("2020-04-20T04:20:00-05:00".parse()?);

fn take_end_time(&mut self) -> Option<DateTime<FixedOffset>>

Take the end_time from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(end_time) = video.take_end_time() {
    println!("{:?}", end_time);
}

fn delete_end_time(&mut self) -> &mut Self

Delete the end_time from the current object

use activitystreams::prelude::*;

assert!(video.end_time().is_some());
video.delete_end_time();
assert!(video.end_time().is_none());

fn duration<'a>(&'a self) -> Option<Duration> where
    Kind: 'a, 

Fetch the duration for the current object

use activitystreams::prelude::*;

if let Some(duration) = video.duration() {
    println!("{:?}", duration);
}

fn set_duration(&mut self, duration: Duration) -> &mut Self

Set the duration for the current object

This overwrites the contents of duration

use activitystreams::prelude::*;
use chrono::Duration;

video.set_duration(Duration::minutes(4) + Duration::seconds(20));

fn take_duration(&mut self) -> Option<Duration>

Take the duration from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(duration) = video.take_duration() {
    println!("{:?}", duration);
}

fn delete_duration(&mut self) -> &mut Self

Delete the duration from the current object

use activitystreams::prelude::*;

assert!(video.duration().is_some());
video.delete_duration();
assert!(video.duration().is_none());

fn published<'a>(&'a self) -> Option<DateTime<FixedOffset>> where
    Kind: 'a, 

Fetch the published for the current object

use activitystreams::prelude::*;

if let Some(published) = video.published() {
    println!("{:?}", published);
}

fn set_published(&mut self, published: DateTime<FixedOffset>) -> &mut Self

Set the published for the current object

This overwrites the contents of published

use activitystreams::prelude::*;

video.set_published("2020-04-20T04:20:00Z".parse()?);

fn take_published(&mut self) -> Option<DateTime<FixedOffset>>

Take the published from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(published) = video.take_published() {
    println!("{:?}", published);
}

fn delete_published(&mut self) -> &mut Self

Delete the published from the current object

use activitystreams::prelude::*;

assert!(video.published().is_some());
video.delete_published();
assert!(video.published().is_none());

fn updated<'a>(&'a self) -> Option<DateTime<FixedOffset>> where
    Kind: 'a, 

Fetch the updated for the current object

use activitystreams::prelude::*;

if let Some(updated) = video.updated() {
    println!("{:?}", updated);
}

fn set_updated(&mut self, updated: DateTime<FixedOffset>) -> &mut Self

Set the updated for the current object

This overwrites the contents of updated

use activitystreams::prelude::*;

video.set_updated("2020-04-20T04:20:00Z".parse()?);

fn take_updated(&mut self) -> Option<DateTime<FixedOffset>>

Take the updated from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(updated) = video.take_updated() {
    println!("{:?}", updated);
}

fn delete_updated(&mut self) -> &mut Self

Delete the updated from the current object

use activitystreams::prelude::*;

assert!(video.updated().is_some());
video.delete_updated();
assert!(video.updated().is_none());

fn in_reply_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the in_reply_to for the current object

use activitystreams::prelude::*;

if let Some(in_reply_to) = video.in_reply_to() {
    println!("{:?}", in_reply_to);
}

fn set_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the in_reply_to for the current object

This overwrites the contents of in_reply_to

use activitystreams::prelude::*;

video.set_in_reply_to(uri!("https://example.com"));

fn set_many_in_reply_tos<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many in_reply_tos for the current object

This overwrites the contents of in_reply_to

use activitystreams::prelude::*;

video.set_many_in_reply_tos(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a in_reply_to to the current object

This does not overwrite the contents of in_reply_to, only appends an item

use activitystreams::prelude::*;

video
    .add_in_reply_to(uri!("https://example.com/one"))
    .add_in_reply_to(uri!("https://example.com/two"));

fn take_in_reply_to(&mut self) -> Option<OneOrMany<AnyBase>>

Take the in_reply_to from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(in_reply_to) = video.take_in_reply_to() {
    println!("{:?}", in_reply_to);
}

fn delete_in_reply_to(&mut self) -> &mut Self

Delete the in_reply_to from the current object

use activitystreams::prelude::*;

assert!(video.in_reply_to().is_some());
video.delete_in_reply_to();
assert!(video.in_reply_to().is_none());

fn replies<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the replies for the current object

use activitystreams::prelude::*;

if let Some(replies) = video.replies() {
    println!("{:?}", replies);
}

fn set_replies<T>(&mut self, replies: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the replies for the current object

This overwrites the contents of replies

use activitystreams::prelude::*;

video.set_replies(uri!("https://example.com"));

fn set_many_replies<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many replies for the current object

This overwrites the contents of replies

use activitystreams::prelude::*;

video.set_many_replies(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_replies<T>(&mut self, replies: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a replies to the current object

This does not overwrite the contents of replies, only appends an item

use activitystreams::prelude::*;

video
    .add_replies(uri!("https://example.com/one"))
    .add_replies(uri!("https://example.com/two"));

fn take_replies(&mut self) -> Option<OneOrMany<AnyBase>>

Take the replies from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(replies) = video.take_replies() {
    println!("{:?}", replies);
}

fn delete_replies(&mut self) -> &mut Self

Delete the replies from the current object

use activitystreams::prelude::*;

assert!(video.replies().is_some());
video.delete_replies();
assert!(video.replies().is_none());

fn to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the to for the current object

use activitystreams::prelude::*;

if let Some(to) = video.to() {
    println!("{:?}", to);
}

fn set_to<T>(&mut self, to: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the to for the current object

This overwrites the contents of to

use activitystreams::prelude::*;

video.set_to(uri!("https://example.com"));

fn set_many_tos<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many tos for the current object

This overwrites the contents of to

use activitystreams::prelude::*;

video.set_many_tos(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_to<T>(&mut self, to: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a to to the current object

This does not overwrite the contents of to, only appends an item

use activitystreams::prelude::*;

video
    .add_to(uri!("https://example.com/one"))
    .add_to(uri!("https://example.com/two"));

fn take_to(&mut self) -> Option<OneOrMany<AnyBase>>

Take the to from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(to) = video.take_to() {
    println!("{:?}", to);
}

fn delete_to(&mut self) -> &mut Self

Delete the to from the current object

use activitystreams::prelude::*;

assert!(video.to().is_some());
video.delete_to();
assert!(video.to().is_none());

fn bto<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the bto for the current object

use activitystreams::prelude::*;

if let Some(bto) = video.bto() {
    println!("{:?}", bto);
}

fn set_bto<T>(&mut self, bto: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the bto for the current object

This overwrites the contents of bto

use activitystreams::prelude::*;

video.set_bto(uri!("https://example.com"));

fn set_many_btos<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many btos for the current object

This overwrites the contents of bto

use activitystreams::prelude::*;

video.set_many_btos(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_bto<T>(&mut self, bto: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a bto to the current object

This does not overwrite the contents of bto, only appends an item

use activitystreams::prelude::*;

video
    .add_bto(uri!("https://example.com/one"))
    .add_bto(uri!("https://example.com/two"));

fn take_bto(&mut self) -> Option<OneOrMany<AnyBase>>

Take the bto from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(bto) = video.take_bto() {
    println!("{:?}", bto);
}

fn delete_bto(&mut self) -> &mut Self

Delete the bto from the current object

use activitystreams::prelude::*;

assert!(video.bto().is_some());
video.delete_bto();
assert!(video.bto().is_none());

fn cc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the cc for the current object

use activitystreams::prelude::*;

if let Some(cc) = video.cc() {
    println!("{:?}", cc);
}

fn set_cc<T>(&mut self, cc: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the cc for the current object

This overwrites the contents of cc

use activitystreams::prelude::*;

video.set_cc(uri!("https://example.com"));

fn set_many_ccs<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many ccs for the current object

This overwrites the contents of cc

use activitystreams::prelude::*;

video.set_many_ccs(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_cc<T>(&mut self, cc: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a cc to the current object

This does not overwrite the contents of cc, only appends an item

use activitystreams::prelude::*;

video
    .add_cc(uri!("https://example.com/one"))
    .add_cc(uri!("https://example.com/two"));

fn take_cc(&mut self) -> Option<OneOrMany<AnyBase>>

Take the cc from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(cc) = video.take_cc() {
    println!("{:?}", cc);
}

fn delete_cc(&mut self) -> &mut Self

Delete the cc from the current object

use activitystreams::prelude::*;

assert!(video.cc().is_some());
video.delete_cc();
assert!(video.cc().is_none());

fn bcc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>> where
    Kind: 'a, 

Fetch the bcc for the current object

use activitystreams::prelude::*;

if let Some(bcc) = video.bcc() {
    println!("{:?}", bcc);
}

fn set_bcc<T>(&mut self, bcc: T) -> &mut Self where
    T: Into<AnyBase>, 

Set the bcc for the current object

This overwrites the contents of bcc

use activitystreams::prelude::*;

video.set_bcc(uri!("https://example.com"));

fn set_many_bcc<I, T>(&mut self, items: I) -> &mut Self where
    I: IntoIterator<Item = T>,
    T: Into<AnyBase>, 

Set many bcc for the current object

This overwrites the contents of bcc

use activitystreams::prelude::*;

video.set_many_bcc(vec![
    uri!("https://example.com/one"),
    uri!("https://example.com/two"),
]);

fn add_bcc<T>(&mut self, bcc: T) -> &mut Self where
    T: Into<AnyBase>, 

Add a bcc to the current object

This does not overwrite the contents of bcc, only appends an item

use activitystreams::prelude::*;

video
    .add_bcc(uri!("https://example.com/one"))
    .add_bcc(uri!("https://example.com/two"));

fn take_bcc(&mut self) -> Option<OneOrMany<AnyBase>>

Take the bcc from the current object, leaving nothing

use activitystreams::prelude::*;

if let Some(bcc) = video.take_bcc() {
    println!("{:?}", bcc);
}

fn delete_bcc(&mut self) -> &mut Self

Delete the bcc from the current object

use activitystreams::prelude::*;

assert!(video.bcc().is_some());
video.delete_bcc();
assert!(video.bcc().is_none());
Loading content...

Implementors

impl<T, Kind> ObjectExt<Kind> for T where
    T: AsObject<Kind>, 
[src]

Loading content...