Struct SaveResult
Outcome of a save. Never throws — check Success instead, per serialization-format-decision.md's "must never fail to load" requirement applied to saving too.
public readonly struct SaveResult
Expand Details ...
Properties
Contents
Text that was written. Default when Success is false.
public string Contents { get; }
Property Value
- string
Exception
Reason the save failed. Null when Success is true.
public SaveException Exception { get; }
Property Value
Success
public bool Success { get; }
Property Value
- bool
Methods
Failed(SaveException)
public static SaveResult Failed(SaveException exception)
Parameters
| Type | Name | Description |
|---|---|---|
exception |
Returns
Succeeded(string)
public static SaveResult Succeeded(string contents)
Parameters
| Type | Name | Description |
|---|---|---|
contents |