Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.caps

scala.caps

packagescala.caps

Members list

Type members

Experimental classlikes

traitCapSet

Carrier trait for capture set type parameters

Carrier trait for capture set type parameters

Attributes

Experimental
true
Source
package.scala
Supertypes
classAny

Base trait for classes that represent capabilities in the object-capability model.

Base trait for classes that represent capabilities in theobject-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 theLabel class inscala.util.boundary. It represents a capability in the sense that it gives permission tobreak to the enclosing boundary represented by theLabel. It has a scoped lifetime, since breaking to aLabel after the associatedboundary was exited gives a runtime exception.

Capability has a formal meaning whenCapture Checking is turned on. But even without capture checking, extending this trait can be useful for documenting the intended purpose of a class.

Attributes

Experimental
true
Source
package.scala
Supertypes
classAny
Known subtypes
traitExists
traitMutable
traitSharable
traitControl
classCanThrow[E]
objectcap
Show all

A marker trait for classifier capabilities that can appear in.only qualifiers. Capability classes directly extendingClassifier are treated as classifier capbilities

A marker trait for classifier capabilities that can appear in.only qualifiers. Capability classes directly extendingClassifier are treated as classifier capbilities

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
Known subtypes
traitControl
classCanThrow[E]
traitMutable
traitSharable
sealedtraitContains[+C >:CapSet <:CapSet,R <:Singleton]

A type constraint expressing that the capture setC needs to contain the capabilityR

A type constraint expressing that the capture setC needs to contain the capabilityR

Attributes

Companion
object
Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
objectContains

Attributes

Companion
trait
Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
Self type

Base trait for capabilities that capture some continuation or return point in the stack. Examples are exceptions, labels, Async, CanThrow.

Base trait for capabilities that capture some continuation or return point in the stack. Examples are exceptions, labels, Async, CanThrow.

Attributes

Experimental
true
Source
package.scala
Supertypes
traitSharable
classObject
traitMatchable
classAny
Show all
Known subtypes
classCanThrow[E]
sealedtraitExists extendsCapability

A trait that used to allow expressing existential types. Replaced by root.Result instances.

A trait that used to allow expressing existential types. Replaced by root.Result instances.

Attributes

Deprecated
true
Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny

Marker trait for classes with methods that requires an exclusive reference.

Marker trait for classes with methods that requires an exclusive reference.

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny

Marker trait for capabilities that can be safely shared in a concurrent context. During separation checking, shared capabilities are not taken into account.

Marker trait for capabilities that can be safely shared in a concurrent context. During separation checking, shared capabilities are not taken into account.

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
Known subtypes
traitControl
classCanThrow[E]
objectcap extendsCapability

The universal capture reference.

The universal capture reference.

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
Self type
cap.type
finalclassconsume extendsStaticAnnotation

An annotations on parameters and update methods. On a parameter it states that any capabilties passed in the argument are no longer available afterwards, unless they are of classSharableCapabilitty. On an update method, it states that thethis of the enclosing class is consumed, which means that any capabilities of the method prefix are no longer available afterwards.

An annotations on parameters and update methods. On a parameter it states that any capabilties passed in the argument are no longer available afterwards, unless they are of classSharableCapabilitty. On an update method, it states that thethis of the enclosing class is consumed, which means that any capabilities of the method prefix are no longer available afterwards.

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
objectinternal

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
Self type
objectunsafe

Attributes

Experimental
true
Source
package.scala
Supertypes
classObject
traitMatchable
classAny
Self type
unsafe.type
finalclassuse extendsStaticAnnotation

An annotation on parametersx stating that the method's body makes use of the reach capabilityx*. Consequently, when calling the method we need to charge the deep capture set of the actual argiment to the environment.

An annotation on parametersx stating that the method's body makes use of the reach capabilityx*. Consequently, when calling the method we need to charge the deep 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
classObject
traitMatchable
classAny
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp