pub struct CollectionDocument {
pub id: Option<Url>,
pub ordered: bool,
pub page: bool,
pub total_items: Option<u64>,
pub next: Option<Url>,
pub prev: Option<Url>,
pub part_of: Option<Url>,
pub first: Option<Value>,
pub last: Option<Value>,
pub items: Option<Vec<Value>>,
}Expand description
An ActivityStreams collection or collection page, written as a document:
what Ojak serves a Collection as, for an application that serves one
itself, such as a collection paged by a query of its own or embedded in
another object.
It is a page when it is part of a collection (part_of) or says it is
(page), and ordered or not as ordered says. Its members are
written whenever there are items, even none; a collection that only
counts its members, or only links its pages, has None.
Fields§
§id: Option<Url>Its id. An embedded page may have none.
ordered: boolAn OrderedCollection or OrderedCollectionPage, whose members are
orderedItems, rather than a Collection or CollectionPage, whose
members are items.
page: boolA page, even with no part_of.
total_items: Option<u64>Its totalItems.
next: Option<Url>Its next page.
prev: Option<Url>Its prev page.
part_of: Option<Url>The collection it is a page of.
first: Option<Value>Its first page: a URI, or the page embedded.
last: Option<Value>Its last page: a URI, or the page embedded.
items: Option<Vec<Value>>Its members, in order: IRIs as strings, or embedded objects.
Implementations§
Trait Implementations§
Source§impl Clone for CollectionDocument
impl Clone for CollectionDocument
Source§fn clone(&self) -> CollectionDocument
fn clone(&self) -> CollectionDocument
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more