scala.caps
Members list
Type members
Classlikes
Base trait for classes that represent capabilities in the [object-capability model](https://en.wikipedia.org/wiki/Object-capability_model).
Base trait for classes that represent capabilities in the [object-capability model](https://en.wikipedia.org/wiki/Object-capability_model).
A capability is a value representing a permission, access right, resource or effect. Capabilities are typically passed to code as parameters; they should not be global objects. Often, they come with access restrictions such as scoped lifetimes or limited sharing.
An example is the Label class in scala.util.boundary. It represents a capability in the sense that it gives permission to break to the enclosing boundary represented by the Label
. It has a scoped lifetime, since breaking to a Label
after the associated boundary
was exited gives a runtime exception.
Capability has a formal meaning when Capture Checking is turned on. But even without capture checking, extending this trait can be useful for documenting the intended purpose of a class.
Attributes
- Source
- package.scala
- Supertypes
-
class Any
- Known subtypes
-
trait ExclusiveCapabilitytrait Mutabletrait Readtrait Existstrait SharedCapabilitytrait Controlclass ReturnThrowable[T]class Label[T]class CanThrow[E]object capShow all
A marker trait for classifier capabilities that can appear in .only
qualifiers.
A marker trait for classifier capabilities that can appear in .only
qualifiers. Capability classes directly extending Classifier
are treated as classifier capbilities.
Classifier has a formal meaning when Capture Checking is turned on. It should not be used outside of capture checking.
Attributes
- Source
- package.scala
- Supertypes
- Known subtypes
-
trait Controlclass ReturnThrowable[T]class Label[T]class CanThrow[E]trait ExclusiveCapabilitytrait Mutabletrait Readtrait SharedCapabilityShow all
Marker trait for capabilities that capture some continuation or return point in the stack.
Marker trait for capabilities that capture some continuation or return point in the stack. Examples are exceptions, labels, CanThrow or Async contexts.
Control has a formal meaning when Capture Checking is turned on.
Attributes
- Source
- package.scala
- Supertypes
-
trait SharedCapabilitytrait Classifiertrait Capabilityclass Objecttrait Matchableclass AnyShow all
- Known subtypes
A marker trait that declares that all inheriting classes are "pure" in the sense that their values retain no capabilities including capabilities needed to perform effects.
A marker trait that declares that all inheriting classes are "pure" in the sense that their values retain no capabilities including capabilities needed to perform effects. This has formal meaning only under capture checking.
NOTE: If an upper bound is Pure, we check that an argument conforms to it only in sources where capture checking is enabled. For instance,
def f[C <: Pure]() f[Object]()
would give an error only under capture checking. Pure is also dropped in upper bounds if it forms part of an &-type, or is under a type lambda.
Attributes
- Source
- Pure.scala
- Supertypes
-
class Any
- Known subtypes
-
class ArraySeq[A]class ofBooleanclass ofByteclass ofCharclass ofDoubleclass ofFloatclass ofIntclass ofLongclass ofRef[T]class ofShortclass ofUnittrait IndexedSeq[A]class NumericRange[T]class Exclusive[T]class Inclusive[T]class Rangeclass Exclusiveclass Inclusiveclass Vector[A]class WrappedStringclass IntMap[T]class LongMap[T]class LazyList[A]trait LinearSeq[A]class List[A]class ::[A]object Nilclass Queue[A]class Stream[A]class Cons[A]object Emptytrait Seq[A]class AbstractSeq[A]class ArrayBuffer[A]class ArrayDeque[A]class Queue[A]class Stack[A]class ArraySeq[T]class ofBooleanclass ofByteclass ofCharclass ofDoubleclass ofFloatclass ofIntclass ofLongclass ofRef[T]class ofShortclass ofUnittrait IndexedBuffer[A]trait IndexedSeq[T]class StringBuilderclass LongMap[V]class SystemPropertiestrait Buffer[A]class AbstractBuffer[A]class ListBuffer[A]class UnrolledBuffer[T]trait Seq[A]class AbstractSeq[A]class AnyAccumulator[A]class DoubleAccumulatorclass IntAccumulatorclass LongAccumulatortrait ClassTagIterableFactory[CC]class Delegate[CC]class Delegate[CC]trait ClassTagSeqFactory[CC]trait StrictOptimizedClassTagSeqFactory[CC]object ArraySeqobject ArraySeqobject UnrolledBufferclass Delegate[CC]object SortedSetobject SortedSetobject SortedSettrait SortedIterableFactory[CC]object TreeSetobject PriorityQueueobject TreeSettrait IndexedSeq[A]trait IterableFactory[CC]object HashSetobject LazyListIterableobject ListSetobject Setobject HashSetobject LinkedHashSetclass AnyIterableDelegate[CC]class AnySeqDelegate[CC]class Delegate[CC]object Iterableobject Iterableobject Setobject Iterableobject Setobject Iteratortrait SeqFactory[CC]object LazyListobject Streamclass Delegate[CC]object IndexedSeqobject LinearSeqobject Seqobject Bufferobject IndexedBufferobject IndexedSeqobject Seqobject IndexedSeqobject LinearSeqobject Seqtrait StrictOptimizedSeqFactory[CC]object Listobject Queueobject Vectorobject ArrayBufferobject ArrayDequeobject ListBufferobject Queueobject Stackobject AnyAccumulatorobject Viewtrait LinearSeq[A]trait Seq[A]class AbstractSeq[A]trait Set[A]trait Set[A]class AbstractSet[A]class BitSetclass BitSet1class BitSet2class BitSetNclass HashSet[A]class ListSet[A]class Set1[A]class Set2[A]class Set3[A]class Set4[A]class TreeSet[A]trait SortedSet[A]trait Set[A]class AbstractSet[A]class BitSetclass HashSet[A]class LinkedHashSet[A]class TreeSet[A]trait SortedSet[A]class AbstractSet[A]trait SortedSet[A]trait BitSettrait BitSetOps[C]Show all
- Self type
Marker trait for capabilities that can be safely shared in a concurrent context.
Marker trait for capabilities that can be safely shared in a concurrent context.
SharedCapability has a formal meaning when Capture Checking is turned on. During separation checking, shared capabilities are not taken into account.
Attributes
- Source
- package.scala
- Supertypes
- Known subtypes
Experimental classlikes
Carrier trait for capture set type parameters
Carrier trait for capture set type parameters
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
class Any
A type constraint expressing that the capture set C
needs to contain the capability R
A type constraint expressing that the capture set C
needs to contain the capability R
Attributes
- Companion
- object
- Experimental
- true
- Source
- package.scala
- Supertypes
Marker trait for capabilities that should only be used by one concurrent process at a given time.
Marker trait for capabilities that should only be used by one concurrent process at a given time. For example, write-access to a shared mutable buffer.
ExclusiveCapability has a formal meaning when Capture Checking is turned on. During separation checking, exclusive usage of marked capabilities will be enforced.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Known subtypes
A trait that used to allow expressing existential types.
A trait that used to allow expressing existential types. Replaced by root.Result instances.
Attributes
- Deprecated
- true
- Experimental
- true
- Source
- package.scala
- Supertypes
Marker trait for classes with methods that require an exclusive reference.
Marker trait for classes with methods that require an exclusive reference.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
trait ExclusiveCapabilitytrait Classifiertrait Capabilityclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait Read
Marker trait for classes with reader methods, typically extended by Mutable classes
Marker trait for classes with reader methods, typically extended by Mutable classes
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
-
trait Mutabletrait ExclusiveCapabilitytrait Classifiertrait Capabilityclass Objecttrait Matchableclass AnyShow all
The universal capture reference.
The universal capture reference.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Self type
-
cap.type
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Self type
-
internal.type
An annotation on capset parameters C
stating that the method's body does not have C
in its use-set.
An annotation on capset parameters C
stating that the method's body does not have C
in its use-set. C
might be accessed under a box in the method or in the result type of the method. Consequently, when calling the method we do not need to charge the capture set of the actual argiment to the environment.
Note: This should go into annotations. For now it is here, so that we can experiment with it quickly between minor releases
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes
- Self type
-
unsafe.type
Allowed only for source versions up to 3.7: An annotation on parameters x
stating that the method's body makes use of the reach capability x*
.
Allowed only for source versions up to 3.7: An annotation on parameters x
stating that the method's body makes use of the reach capability x*
. Consequently, when calling the method we need to charge the deep capture set of the actual argiment to the environment.
Attributes
- Experimental
- true
- Source
- package.scala
- Supertypes