[][src]Struct activitystreams_new::collection::Collection

pub struct Collection<Kind> { /* fields omitted */ }

A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances.

The items within a Collection can be ordered or unordered. The OrderedCollection type MAY be used to identify a Collection whose items are always ordered. In the JSON serialization, the unordered items of a Collection are represented using the items property while ordered items are represented using the orderedItems property.


impl<Kind> Collection<Kind>[src]

pub fn new<T>(items: T) -> Self where
    T: Into<OneOrMany<AnyBase>>,
    Kind: Default

Create a new Collection

use activitystreams_new::collection::Collection;

let collection = Collection::<String>::new(vec![]);

Trait Implementations

impl<Kind> AsBase<Kind> for Collection<Kind>[src]

impl<Kind> AsCollection<Kind> for Collection<Kind>[src]

impl<Kind> AsObject<Kind> for Collection<Kind>[src]

impl<Kind> Base for Collection<Kind>[src]

impl<Kind: Clone> Clone for Collection<Kind>[src]

impl<Kind> Collection for Collection<Kind>[src]

impl<Kind: Debug> Debug for Collection<Kind>[src]

impl<'de, Kind> Deserialize<'de> for Collection<Kind> where
    Kind: Deserialize<'de>, 

impl<Kind> Extends<Kind> for Collection<Kind>[src]

type Error = Error

The erro produced must be a StdError

impl<Kind> Object for Collection<Kind>[src]

impl<Kind> Serialize for Collection<Kind> where
    Kind: Serialize

impl<Kind> TryFrom<Collection<Kind>> for Object<Kind>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<Kind> TryFrom<Object<Kind>> for Collection<Kind>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<Kind> UnparsedMut for Collection<Kind>[src]

Auto Trait Implementations

impl<Kind> RefUnwindSafe for Collection<Kind> where
    Kind: RefUnwindSafe

impl<Kind> Send for Collection<Kind> where
    Kind: Send

impl<Kind> Sync for Collection<Kind> where
    Kind: Sync

impl<Kind> Unpin for Collection<Kind> where
    Kind: Unpin

impl<Kind> UnwindSafe for Collection<Kind> where
    Kind: UnwindSafe

Blanket Implementations

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

impl<T, Kind> BaseExt<Kind> for T where
    T: AsBase<Kind>, 

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T, Kind> CollectionExt<Kind> for T where
    T: AsCollection<Kind>, 

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

impl<T, Kind> ExtendsExt<Kind> for T where
    T: Extends<Kind>,
    <T as Extends<Kind>>::Error: From<Error>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, Kind> ObjectExt<Kind> for T where
    T: AsObject<Kind>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> UnparsedMutExt for T where
    T: UnparsedMut