scala.scalanative.util

Members list

Concise view

Type members

Classlikes

object And

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
And.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
Graph
Supertypes
class Object
trait Matchable
class Any
object Scope

Attributes

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

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object ScopedVar

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait ShowBuilder

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Stats

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Stats.type

Attributes

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

Attributes

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

Attributes

Graph
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any

Types

type Resource = AutoCloseable

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