Covariant

zio.blocks.typeid.Variance.Covariant
case object Covariant extends Variance

Covariant: +A Preserves subtyping: if Dog <: Animal, then F[Dog] <: F[Animal]

Attributes

Source
Variance.scala
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Variance
class Object
trait Matchable
class Any
Show all
Self type
Covariant.type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredMonoType = this.type

The mirrored *-type.

The mirrored *-type.

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredType = this.type

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Inherited and Abstract types

type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Inherited methods

def *(other: Variance): Variance

Combines two variances. Used when a type parameter appears in a nested position.

Combines two variances. Used when a type parameter appears in a nested position.

Attributes

Inherited from:
Variance
Source
Variance.scala
def flip: Variance

Flips the variance (covariant contravariant, invariant stays).

Flips the variance (covariant contravariant, invariant stays).

Attributes

Inherited from:
Variance
Source
Variance.scala
def fromProduct(p: Product): MirroredMonoType

Creates a new instance of type T with elements taken from product p.

Creates a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
Source
Mirror.scala
def isContravariant: Boolean

Returns true if this is contravariant.

Returns true if this is contravariant.

Attributes

Inherited from:
Variance
Source
Variance.scala
def isCovariant: Boolean

Returns true if this is covariant.

Returns true if this is covariant.

Attributes

Inherited from:
Variance
Source
Variance.scala
def isInvariant: Boolean

Returns true if this is invariant.

Returns true if this is invariant.

Attributes

Inherited from:
Variance
Source
Variance.scala
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala
def symbol: String

Returns the Scala syntax for this variance annotation.

Returns the Scala syntax for this variance annotation.

Attributes

Inherited from:
Variance
Source
Variance.scala