[−][src]Struct activitystreams::ext::Ext
Defines an extension to an activitystreams object or link
This type provides two fields, the first field, base
, should always the be base
ActivityStreams type. As long as base
implements an ActivityStreams trait, Ext will also.
For example, the type Ext<Video, HashMap<String, String>>
will implement the Object
trait,
because Video
implements that trait.
Additionally, AsRef and AsMut have been implemented for Ext. If type type
Ext<Ext<Follow, SomeTime>, AnotherType>
exists, that will implement
AsRef<ActivityProperties>
just like the innermost Follow
.
Usage:
use activitystreams::object::Video; fn main() -> Result<(), Box<dyn std::error::Error>> { let mut video = Video::full(); // AsMut works even though this is an Ext<Video, ApObjectProperties> video .as_mut() .set_id("https://example.com")?; // set information on the extension video .extension .set_source_xsd_any_uri("https://example.com")?; Ok(()) }
Fields
base: T
The ActivityStreams base type, or another extension containing one
extension: U
The extension being applied to the type
Trait Implementations
impl<T, U> Activity for Ext<T, U> where
T: Activity,
U: Debug,
[src]
T: Activity,
U: Debug,
impl<T, U> Actor for Ext<T, U> where
T: Actor,
U: Debug,
[src]
T: Actor,
U: Debug,
impl<T, U, V> AsMut<V> for Ext<T, U> where
T: Base + AsMut<V>,
U: Extension<T> + Debug,
[src]
T: Base + AsMut<V>,
U: Extension<T> + Debug,
impl<T, U, V> AsRef<V> for Ext<T, U> where
T: Base + AsRef<V>,
U: Extension<T> + Debug,
[src]
T: Base + AsRef<V>,
U: Extension<T> + Debug,
impl<T, U> Base for Ext<T, U> where
T: Base,
U: Debug,
[src]
T: Base,
U: Debug,
impl<T: Clone, U: Clone> Clone for Ext<T, U>
[src]
impl<T, U> Collection for Ext<T, U> where
T: Collection,
U: Debug,
[src]
T: Collection,
U: Debug,
impl<T, U> CollectionPage for Ext<T, U> where
T: CollectionPage,
U: Debug,
[src]
T: CollectionPage,
U: Debug,
impl<T: Debug, U: Debug> Debug for Ext<T, U>
[src]
impl<T: Default, U: Default> Default for Ext<T, U>
[src]
impl<'de, T, U> Deserialize<'de> for Ext<T, U> where
T: Deserialize<'de>,
U: Deserialize<'de>,
[src]
T: Deserialize<'de>,
U: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T, U> IntransitiveActivity for Ext<T, U> where
T: IntransitiveActivity,
U: Debug,
[src]
T: IntransitiveActivity,
U: Debug,
impl<T, U> Link for Ext<T, U> where
T: Link,
U: Debug,
[src]
T: Link,
U: Debug,
impl<T, U> Object for Ext<T, U> where
T: Object,
U: Debug,
[src]
T: Object,
U: Debug,
impl<T, U> Serialize for Ext<T, U> where
T: Serialize,
U: Serialize,
[src]
T: Serialize,
U: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T, U> TryFrom<Ext<T, U>> for BaseBox where
T: Base + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: Base + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for ObjectBox where
T: Object + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: Object + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for LinkBox where
T: Link + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: Link + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for CollectionBox where
T: Collection + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: Collection + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for CollectionPageBox where
T: CollectionPage + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: CollectionPage + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for ActivityBox where
T: Activity + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: Activity + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for IntransitiveActivityBox where
T: IntransitiveActivity + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: IntransitiveActivity + Serialize,
U: Extension<T> + Serialize + Debug,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(e: Ext<T, U>) -> Result<Self, Self::Error>
[src]
impl<T, U> TryFrom<Ext<T, U>> for ActorBox where
T: Actor + Serialize,
U: Extension<T> + Serialize + Debug,
[src]
T: Actor + Serialize,
U: Extension<T> + Serialize + Debug,
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Ext<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Ext<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for Ext<T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<T, U> Unpin for Ext<T, U> where
T: Unpin,
U: Unpin,
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for Ext<T, U> where
T: UnwindSafe,
U: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T, U> Extensible<U> for T where
T: Base,
U: Extension<T>,
[src]
T: Base,
U: Extension<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,