pub trait ObjectExt: AsObject {
Show 122 methods fn attachment<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Self::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
        Self::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
        Self::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<OneOrMany<&'a AnyString>>
    where
        Self::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<OneOrMany<&'a AnyString>>
    where
        Self::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
        Self::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
        Self::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
        Self::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
        Self::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
        Self::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
        Self::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<OffsetDateTime>
    where
        Self::Kind: 'a
, { ... } fn set_start_time(&mut self, start_time: OffsetDateTime) -> &mut Self { ... } fn take_start_time(&mut self) -> Option<OffsetDateTime> { ... } fn delete_start_time(&mut self) -> &mut Self { ... } fn end_time<'a>(&'a self) -> Option<OffsetDateTime>
    where
        Self::Kind: 'a
, { ... } fn set_end_time(&mut self, end_time: OffsetDateTime) -> &mut Self { ... } fn take_end_time(&mut self) -> Option<OffsetDateTime> { ... } fn delete_end_time(&mut self) -> &mut Self { ... } fn duration<'a>(&'a self) -> Option<Duration>
    where
        Self::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<OffsetDateTime>
    where
        Self::Kind: 'a
, { ... } fn set_published(&mut self, published: OffsetDateTime) -> &mut Self { ... } fn take_published(&mut self) -> Option<OffsetDateTime> { ... } fn delete_published(&mut self) -> &mut Self { ... } fn updated<'a>(&'a self) -> Option<OffsetDateTime>
    where
        Self::Kind: 'a
, { ... } fn set_updated(&mut self, updated: OffsetDateTime) -> &mut Self { ... } fn take_updated(&mut self) -> Option<OffsetDateTime> { ... } fn delete_updated(&mut self) -> &mut Self { ... } fn in_reply_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>
    where
        Self::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
        Self::Kind: 'a
, { ... } fn set_reply<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_reply<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
        Self::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
        Self::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
        Self::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
        Self::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 { ... }
}
Expand description

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§

Fetch the attachment for the current object

use activitystreams::prelude::*;

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

Set the attachment for the current object

This overwrites the contents of attachment

use activitystreams::prelude::*;

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

Set many attachments for the current object

This overwrites the contents of attachment

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_attachment(iri!("https://example.com/two"));

Take the attachment from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the attachment from the current object

use activitystreams::prelude::*;

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

Fetch the attributed_to for the current object

use activitystreams::prelude::*;

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

Set the attributed_to for the current object

This overwrites the contents of attributed_to

use activitystreams::prelude::*;

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

Set many attributed_tos for the current object

This overwrites the contents of attributed_to

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_attributed_to(iri!("https://example.com/two"));

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);
}

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());

Fetch the audience for the current object

use activitystreams::prelude::*;

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

Set the audience for the current object

This overwrites the contents of audience

use activitystreams::prelude::*;

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

This overwrites the contents of audience

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_audience(iri!("https://example.com/two"));

Take the audience from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the audience from the current object

use activitystreams::prelude::*;

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

Fetch the content for the current object

use activitystreams::prelude::*;

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

Set the content for the current object

This overwrites the contents of content

use activitystreams::prelude::*;

video.set_content("hi");

Set many contents for the current object

This overwrites the contents of content

use activitystreams::prelude::*;

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

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");

Take the content from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the content from the current object

use activitystreams::prelude::*;

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

Fetch the summary for the current object

use activitystreams::prelude::*;

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

Set the summary for the current object

This overwrites the contents of summary

use activitystreams::prelude::*;

video.set_summary("hi");

Set many summaries for the current object

This overwrites the contents of summary

use activitystreams::prelude::*;

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

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");

Take the summary from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the summary from the current object

use activitystreams::prelude::*;

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

Fetch the url for the current object

use activitystreams::prelude::*;

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

Set the url for the current object

This overwrites the contents of url

use activitystreams::prelude::*;

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

Set many urls for the current object

This overwrites the contents of url

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_url(iri!("https://example.com/two"));

Take the url from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the url from the current object

use activitystreams::prelude::*;

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

Fetch the generator for the current object

use activitystreams::prelude::*;

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

Set the generator for the current object

This overwrites the contents of generator

use activitystreams::prelude::*;

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

Set many generators for the current object

This overwrites the contents of generator

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_generator(iri!("https://example.com/two"));

Take the generator from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the generator from the current object

use activitystreams::prelude::*;

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

Fetch the icon for the current object

use activitystreams::prelude::*;

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

Set the icon for the current object

This overwrites the contents of icon

use activitystreams::prelude::*;

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

Set many icons for the current object

This overwrites the contents of icon

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_icon(iri!("https://example.com/two"));

Take the icon from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the icon from the current object

use activitystreams::prelude::*;

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

Fetch the image for the current object

use activitystreams::prelude::*;

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

Set the image for the current object

This overwrites the contents of image

use activitystreams::prelude::*;

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

Set many images for the current object

This overwrites the contents of image

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_image(iri!("https://example.com/two"));

Take the image from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the image from the current object

use activitystreams::prelude::*;

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

Fetch the location for the current object

use activitystreams::prelude::*;

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

Set the location for the current object

This overwrites the contents of location

use activitystreams::prelude::*;

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

Set many locations for the current object

This overwrites the contents of location

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_location(iri!("https://example.com/two"));

Take the location from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the location from the current object

use activitystreams::prelude::*;

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

Fetch the tag for the current object

use activitystreams::prelude::*;

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

Set the tag for the current object

This overwrites the contents of tag

use activitystreams::prelude::*;

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

Set many tags for the current object

This overwrites the contents of tag

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_tag(iri!("https://example.com/two"));

Take the tag from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the tag from the current object

use activitystreams::prelude::*;

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

Fetch the start_time for the current object

use activitystreams::prelude::*;

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

Set the start_time for the current object

This overwrites the contents of start_time

use activitystreams::prelude::*;

video.set_start_time(datetime!("2020-04-20T04:20:00Z"));

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);
}

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());

Fetch the end_time for the current object

use activitystreams::prelude::*;

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

Set the end_time for the current object

This overwrites the contents of end_time

use activitystreams::prelude::*;

video.set_end_time(datetime!("2020-04-20T04:20:00-05:00"));

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);
}

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());

Fetch the duration for the current object

use activitystreams::prelude::*;

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

Set the duration for the current object

This overwrites the contents of duration

use activitystreams::prelude::*;
use time::Duration;

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

Take the duration from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the duration from the current object

use activitystreams::prelude::*;

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

Fetch the published for the current object

use activitystreams::prelude::*;

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

Set the published for the current object

This overwrites the contents of published

use activitystreams::prelude::*;

video.set_published(datetime!("2020-04-20T04:20:00Z"));

Take the published from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the published from the current object

use activitystreams::prelude::*;

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

Fetch the updated for the current object

use activitystreams::prelude::*;

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

Set the updated for the current object

This overwrites the contents of updated

use activitystreams::prelude::*;

video.set_updated(datetime!("2020-04-20T04:20:00Z"));

Take the updated from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the updated from the current object

use activitystreams::prelude::*;

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

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);
}

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(iri!("https://example.com"));

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![
    iri!("https://example.com/one"),
    iri!("https://example.com/two"),
]);

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(iri!("https://example.com/one"))
    .add_in_reply_to(iri!("https://example.com/two"));

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);
}

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());

Fetch the replies for the current object

use activitystreams::prelude::*;

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

Set the replies for the current object

This overwrites the contents of replies

use activitystreams::prelude::*;

video.set_reply(iri!("https://example.com"));

Set many replies for the current object

This overwrites the contents of replies

use activitystreams::prelude::*;

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

Add a replies to the current object

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

use activitystreams::prelude::*;

video
    .add_reply(iri!("https://example.com/one"))
    .add_reply(iri!("https://example.com/two"));

Take the replies from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the replies from the current object

use activitystreams::prelude::*;

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

Fetch the to for the current object

use activitystreams::prelude::*;

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

Set the to for the current object

This overwrites the contents of to

use activitystreams::prelude::*;

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

Set many tos for the current object

This overwrites the contents of to

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_to(iri!("https://example.com/two"));

Take the to from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the to from the current object

use activitystreams::prelude::*;

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

Fetch the bto for the current object

use activitystreams::prelude::*;

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

Set the bto for the current object

This overwrites the contents of bto

use activitystreams::prelude::*;

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

Set many btos for the current object

This overwrites the contents of bto

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_bto(iri!("https://example.com/two"));

Take the bto from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the bto from the current object

use activitystreams::prelude::*;

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

Fetch the cc for the current object

use activitystreams::prelude::*;

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

Set the cc for the current object

This overwrites the contents of cc

use activitystreams::prelude::*;

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

Set many ccs for the current object

This overwrites the contents of cc

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_cc(iri!("https://example.com/two"));

Take the cc from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the cc from the current object

use activitystreams::prelude::*;

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

Fetch the bcc for the current object

use activitystreams::prelude::*;

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

Set the bcc for the current object

This overwrites the contents of bcc

use activitystreams::prelude::*;

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

Set many bcc for the current object

This overwrites the contents of bcc

use activitystreams::prelude::*;

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

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(iri!("https://example.com/one"))
    .add_bcc(iri!("https://example.com/two"));

Take the bcc from the current object, leaving nothing

use activitystreams::prelude::*;

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

Delete the bcc from the current object

use activitystreams::prelude::*;

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

Implementors§