Trait activitystreams::object::ObjectExt
source · 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§
sourcefn attachment<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn attachment<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the attachment for the current object
use activitystreams::prelude::*;
if let Some(attachment) = video.attachment() {
println!("{:?}", attachment);
}
sourcefn set_attachment<T>(&mut self, attachment: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_attachment<T>(&mut self, attachment: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the attachment for the current object
This overwrites the contents of attachment
use activitystreams::prelude::*;
video.set_attachment(iri!("https://example.com"));
sourcefn set_many_attachments<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_attachments<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_attachment<T>(&mut self, attachment: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_attachment<T>(&mut self, attachment: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_attachment(iri!("https://example.com/two"));
sourcefn take_attachment(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_attachment(&mut self) -> &mut Self
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());
sourcefn attributed_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn attributed_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the attributed_to for the current object
use activitystreams::prelude::*;
if let Some(attributed_to) = video.attributed_to() {
println!("{:?}", attributed_to);
}
sourcefn set_attributed_to<T>(&mut self, attributed_to: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_attributed_to<T>(&mut self, attributed_to: T) -> &mut Selfwhere
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(iri!("https://example.com"));
sourcefn set_many_attributed_tos<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_attributed_tos<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_attributed_to<T>(&mut self, attributed_to: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_attributed_to<T>(&mut self, attributed_to: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_attributed_to(iri!("https://example.com/two"));
sourcefn take_attributed_to(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_attributed_to(&mut self) -> &mut Self
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());
sourcefn audience<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn audience<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the audience for the current object
use activitystreams::prelude::*;
if let Some(audience) = video.audience() {
println!("{:?}", audience);
}
sourcefn set_audience<T>(&mut self, audience: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_audience<T>(&mut self, audience: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the audience for the current object
This overwrites the contents of audience
use activitystreams::prelude::*;
video.set_audience(iri!("https://example.com"));
sourcefn set_many_audiences<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_audiences<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
This overwrites the contents of audience
use activitystreams::prelude::*;
video.set_many_audiences(vec![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_audience<T>(&mut self, audience: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_audience<T>(&mut self, audience: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_audience(iri!("https://example.com/two"));
sourcefn take_audience(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_audience(&mut self) -> &mut Self
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());
sourcefn content<'a>(&'a self) -> Option<OneOrMany<&'a AnyString>>where
Self::Kind: 'a,
fn content<'a>(&'a self) -> Option<OneOrMany<&'a AnyString>>where
Self::Kind: 'a,
Fetch the content for the current object
use activitystreams::prelude::*;
if let Some(content) = video.content() {
println!("{:?}", content);
}
sourcefn set_content<T>(&mut self, content: T) -> &mut Selfwhere
T: Into<AnyString>,
fn set_content<T>(&mut self, content: T) -> &mut Selfwhere
T: Into<AnyString>,
Set the content for the current object
This overwrites the contents of content
use activitystreams::prelude::*;
video.set_content("hi");
sourcefn set_many_contents<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyString>,
fn set_many_contents<I, T>(&mut self, items: I) -> &mut Selfwhere
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"]);
sourcefn add_content<T>(&mut self, content: T) -> &mut Selfwhere
T: Into<AnyString>,
fn add_content<T>(&mut self, content: T) -> &mut Selfwhere
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");
sourcefn take_content(&mut self) -> Option<OneOrMany<AnyString>>
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);
}
sourcefn delete_content(&mut self) -> &mut Self
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());
sourcefn summary<'a>(&'a self) -> Option<OneOrMany<&'a AnyString>>where
Self::Kind: 'a,
fn summary<'a>(&'a self) -> Option<OneOrMany<&'a AnyString>>where
Self::Kind: 'a,
Fetch the summary for the current object
use activitystreams::prelude::*;
if let Some(summary) = video.summary() {
println!("{:?}", summary);
}
sourcefn set_summary<T>(&mut self, summary: T) -> &mut Selfwhere
T: Into<AnyString>,
fn set_summary<T>(&mut self, summary: T) -> &mut Selfwhere
T: Into<AnyString>,
Set the summary for the current object
This overwrites the contents of summary
use activitystreams::prelude::*;
video.set_summary("hi");
sourcefn set_many_summaries<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyString>,
fn set_many_summaries<I, T>(&mut self, items: I) -> &mut Selfwhere
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"]);
sourcefn add_summary<T>(&mut self, summary: T) -> &mut Selfwhere
T: Into<AnyString>,
fn add_summary<T>(&mut self, summary: T) -> &mut Selfwhere
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");
sourcefn take_summary(&mut self) -> Option<OneOrMany<AnyString>>
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);
}
sourcefn delete_summary(&mut self) -> &mut Self
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());
sourcefn url<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn url<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the url for the current object
use activitystreams::prelude::*;
if let Some(url) = video.url() {
println!("{:?}", url);
}
sourcefn set_url<T>(&mut self, url: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_url<T>(&mut self, url: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the url for the current object
This overwrites the contents of url
use activitystreams::prelude::*;
video.set_url(iri!("https://example.com"));
sourcefn set_many_urls<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_urls<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_url<T>(&mut self, url: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_url<T>(&mut self, url: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_url(iri!("https://example.com/two"));
sourcefn take_url(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_url(&mut self) -> &mut Self
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());
sourcefn generator<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn generator<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the generator for the current object
use activitystreams::prelude::*;
if let Some(generator) = video.generator() {
println!("{:?}", generator);
}
sourcefn set_generator<T>(&mut self, generator: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_generator<T>(&mut self, generator: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the generator for the current object
This overwrites the contents of generator
use activitystreams::prelude::*;
video.set_generator(iri!("https://example.com"));
sourcefn set_many_generators<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_generators<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_generator<T>(&mut self, generator: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_generator<T>(&mut self, generator: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_generator(iri!("https://example.com/two"));
sourcefn take_generator(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_generator(&mut self) -> &mut Self
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());
sourcefn icon<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn icon<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the icon for the current object
use activitystreams::prelude::*;
if let Some(icon) = video.icon() {
println!("{:?}", icon);
}
sourcefn set_icon<T>(&mut self, icon: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_icon<T>(&mut self, icon: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the icon for the current object
This overwrites the contents of icon
use activitystreams::prelude::*;
video.set_icon(iri!("https://example.com"));
sourcefn set_many_icons<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_icons<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_icon<T>(&mut self, icon: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_icon<T>(&mut self, icon: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_icon(iri!("https://example.com/two"));
sourcefn take_icon(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_icon(&mut self) -> &mut Self
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());
sourcefn image<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn image<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the image for the current object
use activitystreams::prelude::*;
if let Some(image) = video.image() {
println!("{:?}", image);
}
sourcefn set_image<T>(&mut self, image: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_image<T>(&mut self, image: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the image for the current object
This overwrites the contents of image
use activitystreams::prelude::*;
video.set_image(iri!("https://example.com"));
sourcefn set_many_images<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_images<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_image<T>(&mut self, image: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_image<T>(&mut self, image: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_image(iri!("https://example.com/two"));
sourcefn take_image(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_image(&mut self) -> &mut Self
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());
sourcefn location<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn location<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the location for the current object
use activitystreams::prelude::*;
if let Some(location) = video.location() {
println!("{:?}", location);
}
sourcefn set_location<T>(&mut self, location: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_location<T>(&mut self, location: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the location for the current object
This overwrites the contents of location
use activitystreams::prelude::*;
video.set_location(iri!("https://example.com"));
sourcefn set_many_locations<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_locations<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_location<T>(&mut self, location: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_location<T>(&mut self, location: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_location(iri!("https://example.com/two"));
sourcefn take_location(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_location(&mut self) -> &mut Self
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());
sourcefn tag<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn tag<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the tag for the current object
use activitystreams::prelude::*;
if let Some(tag) = video.tag() {
println!("{:?}", tag);
}
sourcefn set_tag<T>(&mut self, tag: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_tag<T>(&mut self, tag: T) -> &mut Selfwhere
T: Into<AnyBase>,
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"),
]);
sourcefn add_tag<T>(&mut self, tag: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_tag<T>(&mut self, tag: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_tag(iri!("https://example.com/two"));
sourcefn take_tag(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_tag(&mut self) -> &mut Self
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());
sourcefn start_time<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
fn start_time<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
Fetch the start_time for the current object
use activitystreams::prelude::*;
if let Some(start_time) = video.start_time() {
println!("{:?}", start_time);
}
sourcefn set_start_time(&mut self, start_time: OffsetDateTime) -> &mut Self
fn set_start_time(&mut self, start_time: OffsetDateTime) -> &mut Self
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"));
sourcefn take_start_time(&mut self) -> Option<OffsetDateTime>
fn take_start_time(&mut self) -> Option<OffsetDateTime>
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);
}
sourcefn delete_start_time(&mut self) -> &mut Self
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());
sourcefn end_time<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
fn end_time<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
Fetch the end_time for the current object
use activitystreams::prelude::*;
if let Some(end_time) = video.end_time() {
println!("{:?}", end_time);
}
sourcefn set_end_time(&mut self, end_time: OffsetDateTime) -> &mut Self
fn set_end_time(&mut self, end_time: OffsetDateTime) -> &mut Self
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"));
sourcefn take_end_time(&mut self) -> Option<OffsetDateTime>
fn take_end_time(&mut self) -> Option<OffsetDateTime>
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);
}
sourcefn delete_end_time(&mut self) -> &mut Self
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());
sourcefn duration<'a>(&'a self) -> Option<Duration>where
Self::Kind: 'a,
fn duration<'a>(&'a self) -> Option<Duration>where
Self::Kind: 'a,
Fetch the duration for the current object
use activitystreams::prelude::*;
if let Some(duration) = video.duration() {
println!("{:?}", duration);
}
sourcefn set_duration(&mut self, duration: Duration) -> &mut Self
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 time::Duration;
video.set_duration(Duration::minutes(4) + Duration::seconds(20));
sourcefn take_duration(&mut self) -> Option<Duration>
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);
}
sourcefn delete_duration(&mut self) -> &mut Self
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());
sourcefn published<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
fn published<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
Fetch the published for the current object
use activitystreams::prelude::*;
if let Some(published) = video.published() {
println!("{:?}", published);
}
sourcefn set_published(&mut self, published: OffsetDateTime) -> &mut Self
fn set_published(&mut self, published: OffsetDateTime) -> &mut Self
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"));
sourcefn take_published(&mut self) -> Option<OffsetDateTime>
fn take_published(&mut self) -> Option<OffsetDateTime>
Take the published from the current object, leaving nothing
use activitystreams::prelude::*;
if let Some(published) = video.take_published() {
println!("{:?}", published);
}
sourcefn delete_published(&mut self) -> &mut Self
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());
sourcefn updated<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
fn updated<'a>(&'a self) -> Option<OffsetDateTime>where
Self::Kind: 'a,
Fetch the updated for the current object
use activitystreams::prelude::*;
if let Some(updated) = video.updated() {
println!("{:?}", updated);
}
sourcefn set_updated(&mut self, updated: OffsetDateTime) -> &mut Self
fn set_updated(&mut self, updated: OffsetDateTime) -> &mut Self
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"));
sourcefn take_updated(&mut self) -> Option<OffsetDateTime>
fn take_updated(&mut self) -> Option<OffsetDateTime>
Take the updated from the current object, leaving nothing
use activitystreams::prelude::*;
if let Some(updated) = video.take_updated() {
println!("{:?}", updated);
}
sourcefn delete_updated(&mut self) -> &mut Self
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());
sourcefn in_reply_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn in_reply_to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::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);
}
sourcefn set_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Selfwhere
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(iri!("https://example.com"));
sourcefn set_many_in_reply_tos<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_in_reply_tos<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_in_reply_to<T>(&mut self, in_reply_to: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_in_reply_to(iri!("https://example.com/two"));
sourcefn take_in_reply_to(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_in_reply_to(&mut self) -> &mut Self
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());
sourcefn replies<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn replies<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the replies for the current object
use activitystreams::prelude::*;
if let Some(replies) = video.replies() {
println!("{:?}", replies);
}
sourcefn set_reply<T>(&mut self, replies: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_reply<T>(&mut self, replies: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the replies for the current object
This overwrites the contents of replies
use activitystreams::prelude::*;
video.set_reply(iri!("https://example.com"));
sourcefn set_many_replies<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_replies<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_reply<T>(&mut self, replies: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_reply<T>(&mut self, replies: T) -> &mut Selfwhere
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_reply(iri!("https://example.com/one"))
.add_reply(iri!("https://example.com/two"));
sourcefn take_replies(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_replies(&mut self) -> &mut Self
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());
sourcefn to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn to<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the to for the current object
use activitystreams::prelude::*;
if let Some(to) = video.to() {
println!("{:?}", to);
}
sourcefn set_to<T>(&mut self, to: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_to<T>(&mut self, to: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the to for the current object
This overwrites the contents of to
use activitystreams::prelude::*;
video.set_to(iri!("https://example.com"));
sourcefn set_many_tos<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_tos<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_to<T>(&mut self, to: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_to<T>(&mut self, to: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_to(iri!("https://example.com/two"));
sourcefn take_to(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_to(&mut self) -> &mut Self
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());
sourcefn bto<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn bto<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the bto for the current object
use activitystreams::prelude::*;
if let Some(bto) = video.bto() {
println!("{:?}", bto);
}
sourcefn set_bto<T>(&mut self, bto: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_bto<T>(&mut self, bto: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the bto for the current object
This overwrites the contents of bto
use activitystreams::prelude::*;
video.set_bto(iri!("https://example.com"));
sourcefn set_many_btos<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_btos<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_bto<T>(&mut self, bto: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_bto<T>(&mut self, bto: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_bto(iri!("https://example.com/two"));
sourcefn take_bto(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_bto(&mut self) -> &mut Self
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());
sourcefn cc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn cc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the cc for the current object
use activitystreams::prelude::*;
if let Some(cc) = video.cc() {
println!("{:?}", cc);
}
sourcefn set_cc<T>(&mut self, cc: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_cc<T>(&mut self, cc: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the cc for the current object
This overwrites the contents of cc
use activitystreams::prelude::*;
video.set_cc(iri!("https://example.com"));
sourcefn set_many_ccs<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_ccs<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_cc<T>(&mut self, cc: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_cc<T>(&mut self, cc: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_cc(iri!("https://example.com/two"));
sourcefn take_cc(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_cc(&mut self) -> &mut Self
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());
sourcefn bcc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
fn bcc<'a>(&'a self) -> Option<&'a OneOrMany<AnyBase>>where
Self::Kind: 'a,
Fetch the bcc for the current object
use activitystreams::prelude::*;
if let Some(bcc) = video.bcc() {
println!("{:?}", bcc);
}
sourcefn set_bcc<T>(&mut self, bcc: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn set_bcc<T>(&mut self, bcc: T) -> &mut Selfwhere
T: Into<AnyBase>,
Set the bcc for the current object
This overwrites the contents of bcc
use activitystreams::prelude::*;
video.set_bcc(iri!("https://example.com"));
sourcefn set_many_bcc<I, T>(&mut self, items: I) -> &mut Selfwhere
I: IntoIterator<Item = T>,
T: Into<AnyBase>,
fn set_many_bcc<I, T>(&mut self, items: I) -> &mut Selfwhere
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![
iri!("https://example.com/one"),
iri!("https://example.com/two"),
]);
sourcefn add_bcc<T>(&mut self, bcc: T) -> &mut Selfwhere
T: Into<AnyBase>,
fn add_bcc<T>(&mut self, bcc: T) -> &mut Selfwhere
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(iri!("https://example.com/one"))
.add_bcc(iri!("https://example.com/two"));
sourcefn take_bcc(&mut self) -> Option<OneOrMany<AnyBase>>
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);
}
sourcefn delete_bcc(&mut self) -> &mut Self
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());