Module PocketMeshPeer.PeersGroups

Represents a list of all local groups.

type t;

Type for list of groups of peers.

let findOpt: PeersGroup.Id.t => t => option(PeersGroup.t);

Tries to find a group with specified id.

let fold: ('acc => PeersGroup.t => 'acc) => 'acc => t => 'acc;

fold(f, acc, t) can be used to iterate through all groups and accumulate a value.

let isPeerInAGroup: Peer.Id.t => t => bool;

isPeerInAGroup(p, t) returns true if peer p is member of one or more groups.