class Pf::Set::Commit(T)

Overview

Commits allow you to compose multiple edits into one, big edit of the set. Thus you avoid creating many useless intermediate copies of the set.

Defined in:

permafrost/set.cr

Instance Method Summary

Instance Method Detail

def add(element : T) : self #

Commits the addition of element to the set.

Raises ResolvedError if this commit is used outside of the transaction (see Set#transaction) that produced it.

Raises ReadonlyError if called by a fiber other than the fiber that initiated the transaction.


[View source]
def delete(element : T) : self #

Commits the removal of element from the set.

Raises ResolvedError if this commit is used outside of the transaction (see Set#transaction) that produced it.

Raises ReadonlyError if called by a fiber other than the fiber that initiated the transaction.


[View source]
def includes?(object) : Bool #

Runs Set#includes? on the set built so far.


[View source]