scala.scalanative.util

Members list

Type members

Classlikes

object And

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
And.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
trait Scope

Scoped implicit lifetime.

Scoped implicit lifetime.

The main idea behind the Scope is to encode resource lifetimes through a concept of an implicit scope. Scopes are necessary to acquire resources. They are responsible for disposal of the resources once the evaluation exits the demarkated block in the source code.

See https://www.youtube.com/watch?v=MV2eJkwarT4 for details.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Scope

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Scope.type
class ScopedVar[A]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object ScopedVar

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ScopedVar.type
sealed trait ShowBuilder

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ShowBuilder

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object StringUtils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case object UnreachableException extends Exception

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class UnsupportedException(msg: String) extends Exception

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Types

Scope-managed resource.

Scope-managed resource.

Attributes

Value members

Concrete methods

def acquire[R <: Resource](res: R)(implicit in: Scope): R

Acquire given resource in implicit scope.

Acquire given resource in implicit scope.

Attributes

def defer(f: => Unit)(implicit in: Scope): Unit

Defer cleanup until the scope closes.

Defer cleanup until the scope closes.

Attributes

def partitionBy[T](elems: Seq[T])(f: T => Any): Map[Int, Seq[T]]
def partitionBy[T](elems: Seq[T], batches: Int)(f: T => Any): Map[Int, Seq[T]]
def procs: Int
def time[T](msg: String)(f: => T): T

Print running time of closure to stdout.

Print running time of closure to stdout.

Attributes

def unreachable: Nothing

Marker methods, called whenever a specific control-flow branch should never happen.

Marker methods, called whenever a specific control-flow branch should never happen.

Attributes

def unsupported(v: Any): Nothing

Marker method, called whenever a specific control-flow branch is not supported.

Marker method, called whenever a specific control-flow branch is not supported.

Attributes

def unsupported(s: String): Nothing