Add a CloseAction that will be executed each time the resource is closed.
Add a CloseAction that will be executed each time the resource is closed.
the action to add
a new resource instance with the close action added
Get the Resource context associated with this Resource instance.
Get the Resource context associated with this Resource instance.
the associated ResourceContext
as Resources are immutable objects a given Resource instance will always be associated with the same ResourceContext
Create a Resource instance that is configured with the new ResourceContext
Create a Resource instance that is configured with the new ResourceContext
A new ResourceContext
a new instance configured with the new context
Update the current ResourceContext and return a new Resource instance with the updated context
Update the current ResourceContext and return a new Resource instance with the updated context
A function for transforming the current context to a new context with new values.
a new instance configured with the new context
A trait allowing adding close actions to a Resource. The purpose of this trait was to allow the correct subclass type to be returned when calling the methods but keeping the Repr type from the main Resource signature
The type of object that is managed by this resource
The actual type of the concrete subclass
in standard immutable fashion the methods do not mutate the current object but return a new instance with the modified behaviour