Domain

world.id.domain$package.Domain
object Domain

Parsing, forms, and comparison for Domain.

Attributes

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

Members list

Type members

Classlikes

sealed abstract class Invalid(message: String) extends WorldError

Why a name was refused: a label that is not one, or a name past the size limits, which RFC 5321 states in octets rather than characters.

Why a name was refused: a label that is not one, or a name past the size limits, which RFC 5321 states in octets rather than characters.

Attributes

Companion
object
Supertypes
class WorldError
class TypedError
trait NoStackTrace
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Label
class TooLong
object Invalid

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Invalid.type

Value members

Concrete methods

def parse(raw: String): Either[Invalid, Domain]

Parses a name and lower-cases its ASCII. Internationalised labels are kept as written: UTS 46 case folding and the NFC form RFC 5891 requires are the caller's to apply before parsing.

Parses a name and lower-cases its ASCII. Internationalised labels are kept as written: UTS 46 case folding and the NFC form RFC 5891 requires are the caller's to apply before parsing.

Attributes

def same(d: Domain, o: Domain): Boolean

Givens

Extensions

Extensions

extension (d: Domain)
def ascii: Domain

The all-ASCII form, every label through Punycode. Always available, unlike an address's, because every domain has one.

The all-ASCII form, every label through Punycode. Always available, unlike an address's, because every domain has one.

Attributes

def international: Boolean

Whether any label is non-ASCII, so transport needs the internationalised profile.

Whether any label is non-ASCII, so transport needs the internationalised profile.

Attributes

def labels: Vector[String]
def same(o: Domain): Boolean

Whether both names are the same domain, whichever way each was written. == answers the narrower question of whether they were written alike.

Whether both names are the same domain, whichever way each was written. == answers the narrower question of whether they were written alike.

Attributes

def value: String

The name as stored, lower-cased - what Domain.parse reads back.

The name as stored, lower-cased - what Domain.parse reads back.

Attributes