LoadBitmapConvenienceSyntax

doodle.syntax.LoadBitmapConvenienceSyntax

Attributes

Source
LoadBitmapConvenienceSyntax.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object all

Members list

Extensions

Extensions

extension (companion: LoadBitmap.type)
def loadOrDefault[S, B](specifier: S, default: => B)(using loader: LoadBitmap[S, B], runtime: IORuntime): B

Load a bitmap synchronously, returning a default value on any error.

Load a bitmap synchronously, returning a default value on any error.

Value parameters

default

the bitmap to return if loading fails (evaluated lazily)

loader

implicit LoadBitmap instance for the types

runtime

explicit IORuntime for executing the IO

specifier

the location/identifier of the bitmap

Attributes

Returns

the loaded bitmap or the default

Source
LoadBitmapConvenienceSyntax.scala

Load a bitmap synchronously with partial error recovery.

Load a bitmap synchronously with partial error recovery.

Value parameters

loader

implicit LoadBitmap instance for the types

recover

partial function to handle specific BitmapError cases

runtime

explicit IORuntime for executing the IO

specifier

the location/identifier of the bitmap

Attributes

Returns

the loaded bitmap or recovery result

Throws
Throwable

if the error is not handled by recover

Source
LoadBitmapConvenienceSyntax.scala
def loadUnsafe[S, B](specifier: S)(using loader: LoadBitmap[S, B], runtime: IORuntime): B

Load a bitmap synchronously, throwing any errors that occur.

Load a bitmap synchronously, throwing any errors that occur.

Value parameters

loader

implicit LoadBitmap instance for the types

runtime

explicit IORuntime for executing the IO

specifier

the location/identifier of the bitmap

Attributes

Returns

the loaded bitmap

Throws
BitmapError

if loading fails

Source
LoadBitmapConvenienceSyntax.scala