[][src]Module activitystreams::collection

Types and traits for dealing with Collection attributes

use activitystreams::{
    collection::OrderedCollection,
    context,
    prelude::*,
    uri,
};

let mut collection = OrderedCollection::new();

collection
    .set_items(uri!("https://example.com/notes/1234"))
    .set_total_items(1u64)
    .set_current(uri!("https://example.com/notes/1234"))
    .set_first(uri!("https://example.com/notes/1234"))
    .set_last(uri!("https://example.com/notes/1234"))
    .set_id(uri!("https://example.com/collections/1234"))
    .set_context(context());

Modules

kind

Kinds of collections defined by the spec

Structs

Collection

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

CollectionPage

Used to represent distinct subsets of items from a Collection.

OrderedCollectionPage

Used to represent ordered subsets of items from an OrderedCollection.

Traits

AsCollection

Implementation trait for deriving Collection methods for a type

AsCollectionPage

Implementation trait for deriving Collection methods for a type

AsOrderedCollectionPage

Implementation trait for deriving Collection methods for a type

CollectionExt

Helper methods for interacting with Collection types

CollectionPageExt

Helper methods for interacting with CollectionPage types

OrderedCollectionPageExt

Type Definitions

OrderedCollection

A subtype of Collection in which members of the logical collection are assumed to always be strictly ordered.

UnorderedCollection

The default Collection type.

UnorderedCollectionPage

Used to represent distinct subsets of items from a Collection.