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 loadOrDefaultAsync[S, B](specifier: S, default: => B)(using loader: LoadBitmap[S, B], runtime: IORuntime): Future[B]

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

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

Value parameters

default

the bitmap to return if loading fails

loader

implicit LoadBitmap instance for the types

runtime

explicit IORuntime for executing the IO

specifier

the URL of the bitmap

Attributes

Returns

Future containing the loaded bitmap or the default

Source
LoadBitmapConvenienceSyntax.scala
def loadOrRecoverAsync[S, B](specifier: S)(recover: PartialFunction[BitmapError, B])(using loader: LoadBitmap[S, B], runtime: IORuntime): Future[B]

Load a bitmap asynchronously with partial error recovery.

Load a bitmap asynchronously 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 URL of the bitmap

Attributes

Returns

Future containing the loaded bitmap or recovery result

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

Load a bitmap asynchronously.

Load a bitmap asynchronously.

Value parameters

loader

implicit LoadBitmap instance for the types

runtime

explicit IORuntime for executing the IO

specifier

the URL of the bitmap

Attributes

Returns

Future containing the loaded bitmap or failure

Source
LoadBitmapConvenienceSyntax.scala