Resource
A sealed class representing different states of a resource, typically used for data fetching operations.
The Resource class has three subclasses:
Loading: Indicates that the data is currently being loaded.
Success: Indicates that the data has been successfully loaded.
Error: Indicates that an error occurred during data loading, with an associated error message.
Parameters
T
The type of data held by the resource.