set method

  1. @override
Result<(), T> set(
  1. T value
)
override

Sets the contents of the cell to value.

Implementation

@override
Result<(), T> set(T value) {
  var val = _cache[this] as T?;
  if (val != null) {
    return Err(value);
  }
  _cache[this] = value;
  return const Ok(());
}