Allows the resource to be used imperatively in yield
-ing for
-comprehensions.
Allows the resource to be used imperatively in yield
-ing for
-comprehensions.
For example
import io.tmos.arm._ for (r <- managed(new Resource)) yield { ... }
the return type of the function
the function to execute of which the resource is managed
the result of the function
Allows the resource to be used imperatively in stacked yield
-ing for
-comprehensions.
Allows the resource to be used imperatively in stacked yield
-ing for
-comprehensions.
For example
import io.tmos.arm._ for { a <- managed(new Resource1) b <- managed(new Resource2) } yield { ... }
which translates to
managed(new Resource1) flatMap { a => managed(new Resource2) map { b => ... } }
Default implementation is to call map
the return type of the function
the function to execute of which the resource is managed
the result of the function
Allows the resource to be used imperatively in for
-comprehensions.
Allows the resource to be used imperatively in for
-comprehensions.
For example
import io.tmos.arm._ for (a <- managed(new Resource1)) { ... }
Default implementation is to call map
the function to execute of which the resource is managed
(managedResource: StringAdd).self
(managedResource: StringFormat).self
(managedResource: ArrowAssoc[ManagedResource[A]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(managedResource: Ensuring[ManagedResource[A]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
A resource that is managed.
Only one implementation is provided currently DefaultManagedResource. Subclasses only need to provide ManagedResource.map
the type of the resource to manage