from static method
Implementation
static ReadWriteMarker from({required bool read, required bool write}) {
if (read) {
if (write) {
return ReadWriteMarker.readWrite;
}
return ReadWriteMarker.readOnly;
}
if (write) {
return ReadWriteMarker.writeOnly;
}
throw Exception("illegal read & write false values for this marker");
}