clone method
Returns a shallow copy of this result.
The result wrapper is copied, but mutable values and errors are shared. Error stack traces are preserved. For creating new results, prefer Ok or Err constructors directly.
Implementation
Result<T, E> clone() => switch (this) {
Err<T, E>(:final error, :final stackTrace) => .err(error, stackTrace),
Ok<T, E>(:final value) => .ok(value),
};