SenderTable class final

Which kinds each user may send: a line per user, the user's name or id and then the kinds, separated by spaces. Blank lines and lines starting with # are skipped.

A line attaching: <kinds> names the kinds that attach: a chain started by one of them names its parent entry on its first body line and joins that entry's trajectory (see LogbookService). No user name holds a :, so the line cannot be read as a user's.

Properties

attaching → Set<Kind>
The kinds that attach.
final
bytes → Uint8List
The table as it was read, which the started entry holds.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allows(UserId user, Kind kind) → bool
Whether user may send kind.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

attachingIn(Uint8List bytes) → Set<Kind>
The attaching kinds of the table bytes, as a started entry holds it, read back without looking any user up: what attached when an entry was added is what the table in force then said. Never throws: a kind it cannot read attaches nothing.
parse(Uint8List bytes, {UserId? uidOf(String user) = _uidOfUser}) → SenderTable
bytes as a table. Throws a FormatException naming the line when a line has no kinds, a kind is not one Kind.parse takes, an attaching kind is one whose body the service reads (such as Kind.missionEnded), or a user is not one uidOf finds. uidOf defaults to a number as itself and a name as id -u prints it, and a user UserId.parse refuses (65534, nobody) is not one it finds.