TypeWrapper
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Type members
Types
Value members
Abstract methods
WARNING! Creates a new instance of the newtype without performing any validation. ONLY USE THIS IF YOU KNOW WHAT YOU'RE DOING.
WARNING! Creates a new instance of the newtype without performing any validation. ONLY USE THIS IF YOU KNOW WHAT YOU'RE DOING.
This method should be used with caution, as it bypasses any validation defined in the validate
method. It is recommended to use the apply
method instead, which performs compile-time validation of the input.
Attributes
WARNING! This casts an F[A]
to an F[Type]
without performing any validation. ONLY USE THIS IF YOU KNOW WHAT YOU'RE DOING.
WARNING! This casts an F[A]
to an F[Type]
without performing any validation. ONLY USE THIS IF YOU KNOW WHAT YOU'RE DOING.
If, for instance, you have a List[A]
and you want to convert it to a List[Type]
, you can use this method to do so.
Attributes
Concrete methods
Creates a new instance of the newtype.
Creates a new instance of the newtype.
If the validate
method is not defined for this, it will simply wrap the input in the neotype.
If validate
is defined, it will be called at compile-time to check if the input is valid. If it fails, it will raise a compile-time error. input should be a literal or a constant expression, a compile-time known value—otherwise, you should use the make
method instead.
Attributes
Creates a list of newtype instances.
Creates a list of newtype instances.
This will essentially call apply
for each value in the list, performing the same compile-time validation for each element.
If any of the elements fail validation, it will raise a compile-time error. Otherwise, it will return a list of newtype instances.
Attributes
Validates the input and returns a boolean or an error message.
Validates the input and returns a boolean or an error message.