Struct couchdb::ChangeResultBuilder
[−]
[src]
pub struct ChangeResultBuilder { // some fields omitted }
Builder for constructing a change result.
Methods
impl ChangeResultBuilder
fn new<I: Into<DocumentId>>(seq: u64, doc_id: I) -> Self
Constructs a new change result builder.
The change result contained within the builder has the given sequence
number and document id. The change result's deleted
field is false
,
and the changes
field is empty.
fn unwrap(self) -> ChangeResult
Returns the change result contained within the builder.
fn deleted(self, deleted: bool) -> Self
Sets the deleted
field of the change result contained within the
builder.
fn push_change(self, change: ChangeItem) -> Self
Adds a change item to the change result contained within the builder.
fn build_change<F>(self, rev: Revision, f: F) -> Self where F: FnOnce(ChangeItemBuilder) -> ChangeItemBuilder
Constructs and adds a change item to the change result contained within the builder.
fn build_change_from_rev_str<R, F>(self, rev: R, f: F) -> Self where R: AsRef<str>, F: FnOnce(ChangeItemBuilder) -> ChangeItemBuilder
Constructs and adds a change item to the change result contained within the builder.
Panics
Panics if the revision string is invalid.