the closeable resource to which the new methods are provided.
Uses this resource and closes it afterwards.
Uses this resource and closes it afterwards.
Any exception thrown by the code block or during the call to close()
of the AutoCloseable
resource
is caught and presented as a Failure
in return value.
the return type of the code block.
the block of code to execute using this resource
a Try
of the value returned by the code block.
Uses this resource and closes it afterwards.
Uses this resource and closes it afterwards.
the return type of the code block.
the block of code to execute using this resource
the value returned by the code block.
Implicit class that provides new methods for closeable resources.