Packages

object codecs extends PlatformSpecificInstances

Defines default instances for StringEncoder and StringDecoder.

Source
codecs.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. codecs
  2. PlatformSpecificInstances
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. implicit val bigDecimalStringCodec: StringCodec[BigDecimal]

    Defines a StringCodec instance for BigDecimal.

    Defines a StringCodec instance for BigDecimal.

    Example:
    1. // Decoding example
      scala> StringDecoder[BigDecimal].decode("2")
      res1: StringResult[BigDecimal] = Right(2)
      
      // Encoding example
      scala> StringEncoder[BigDecimal].encode(BigDecimal(2D))
      res2: String = 2.0
  6. implicit val bigIntStringCodec: StringCodec[BigInt]

    Defines a StringCodec instance for BigInt.

    Defines a StringCodec instance for BigInt.

    Example:
    1. // Decoding example
      scala> StringDecoder[BigInt].decode("2")
      res1: StringResult[BigInt] = Right(2)
      
      // Encoding example
      scala> StringEncoder[BigInt].encode(BigInt(2))
      res2: String = 2
  7. implicit val booleanStringCodec: StringCodec[Boolean]

    Defines a StringCodec instance for Boolean.

    Defines a StringCodec instance for Boolean.

    Example:
    1. // Decoding example
      scala> StringDecoder[Boolean].decode("true")
      res1: StringResult[Boolean] = Right(true)
      
      // Encoding example
      scala> StringEncoder[Boolean].encode(true)
      res2: String = true
  8. implicit val byteStringCodec: StringCodec[Byte]

    Defines a StringCodec instance for Byte.

    Defines a StringCodec instance for Byte.

    Example:
    1. // Decoding example
      scala> StringDecoder[Byte].decode("2")
      res1: StringResult[Byte] = Right(2)
      
      // Encoding example
      scala> StringEncoder[Byte].encode(2)
      res2: String = 2
  9. implicit val charStringCodec: StringCodec[Char]

    Defines a StringCodec instance for Char.

    Defines a StringCodec instance for Char.

    Example:
    1. // Decoding example
      scala> StringDecoder[Char].decode("a")
      res1: StringResult[Char] = Right(a)
      
      // Encoding example
      scala> StringEncoder[Char].encode('a')
      res2: String = a
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. implicit val doubleStringCodec: StringCodec[Double]

    Defines a StringCodec instance for Double.

    Defines a StringCodec instance for Double.

    Example:
    1. // Decoding example
      scala> StringDecoder[Double].decode("2")
      res1: StringResult[Double] = Right(2.0)
      
      // Encoding example
      scala> StringEncoder[Double].encode(2D)
      res2: String = 2.0
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. implicit val fileStringCodec: StringCodec[File]

    Defines a StringCodec instance for java.io.File.

    Defines a StringCodec instance for java.io.File.

    Definition Classes
    PlatformSpecificInstances
    Example:
    1. // Decoding example
      scala> import java.io.File
      
      scala> StringDecoder[File].decode("/home/nrinaudo")
      res1: StringResult[File] = Right(/home/nrinaudo)
      
      // Encoding example
      scala> StringEncoder[File].encode(new File("/home/nrinaudo"))
      res2: String = /home/nrinaudo
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. implicit val floatStringCodec: StringCodec[Float]

    Defines a StringCodec instance for Float.

    Defines a StringCodec instance for Float.

    Example:
    1. // Decoding example
      scala> StringDecoder[Float].decode("2")
      res1: StringResult[Float] = Right(2.0)
      
      // Encoding example
      scala> StringEncoder[Float].encode(2F)
      res2: String = 2.0
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. implicit val intStringCodec: StringCodec[Int]

    Defines a StringCodec instance for Int.

    Defines a StringCodec instance for Int.

    Example:
    1. // Decoding example
      scala> StringDecoder[Int].decode("2")
      res1: StringResult[Int] = Right(2)
      
      // Encoding example
      scala> StringEncoder[Int].encode(2)
      res2: String = 2
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. implicit def javaEnumStringCodec[T <: Enum[T]](implicit tag: ClassTag[T]): StringCodec[T]

    Defines a StringCodec instance for Java enumerations.

    Defines a StringCodec instance for Java enumerations.

    Annotations
    @SuppressWarnings()
    Example:
    1. scala> import java.nio.file.AccessMode
      
      // Decoding example
      scala> StringDecoder[AccessMode].decode("READ")
      res1: StringResult[AccessMode] = Right(READ)
      
      // Encoding example
      scala> StringEncoder[AccessMode].encode(AccessMode.READ)
      res2: String = READ
  22. implicit val longStringCodec: StringCodec[Long]

    Defines a StringCodec instance for Long.

    Defines a StringCodec instance for Long.

    Example:
    1. // Decoding example
      scala> StringDecoder[Long].decode("2")
      res1: StringResult[Long] = Right(2)
      
      // Encoding example
      scala> StringEncoder[Long].encode(2L)
      res2: String = 2
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. implicit val pathStringCodec: StringCodec[Path]

    Defines a StringCodec instance for java.nio.file.Path.

    Defines a StringCodec instance for java.nio.file.Path.

    Definition Classes
    PlatformSpecificInstances
    Annotations
    @SuppressWarnings()
    Example:
    1. // Decoding example
      scala> import java.nio.file.{Path, Paths}
      
      scala> StringDecoder[Path].decode("/home/nrinaudo")
      res1: StringResult[Path] = Right(/home/nrinaudo)
      
      // Encoding example
      scala> StringEncoder[Path].encode(Paths.get("/home/nrinaudo"))
      res2: String = /home/nrinaudo
  27. implicit val patternStringCodec: StringCodec[Pattern]

    Defines a StringCodec instance for Pattern.

    Defines a StringCodec instance for Pattern.

    Example:
    1. scala> import java.util.regex.Pattern
      
      // Decoding example
      scala> StringDecoder[Pattern].decode("[a-z]")
      res1: StringResult[Pattern] = Right([a-z])
      
      // Encoding example
      scala> StringEncoder[Pattern].encode(Pattern.compile("[a-z]"))
      res2: String = [a-z]
  28. implicit val regexStringCodec: StringCodec[Regex]

    Defines a StringCodec instance for Regex.

    Defines a StringCodec instance for Regex.

    Example:
    1. scala> import scala.util.matching.Regex
      
      // Decoding example
      scala> StringDecoder[Regex].decode("[a-z]")
      res1: StringResult[Regex] = Right([a-z])
      
      // Encoding example
      scala> StringEncoder[Regex].encode("[a-z]".r)
      res2: String = [a-z]
  29. implicit val shortStringCodec: StringCodec[Short]

    Defines a StringCodec instance for Short.

    Defines a StringCodec instance for Short.

    Example:
    1. // Decoding example
      scala> StringDecoder[Short].decode("2")
      res1: StringResult[Short] = Right(2)
      
      // Encoding example
      scala> StringEncoder[Short].encode(2.toShort)
      res2: String = 2
  30. implicit val stringStringCodec: StringCodec[String]

    Defines a StringCodec instance for String.

    Defines a StringCodec instance for String.

    Example:
    1. // Decoding example
      scala> StringDecoder[String].decode("foobar")
      res1: StringResult[String] = Right(foobar)
      
      // Encoding example
      scala> StringEncoder[String].encode("foobar")
      res2: String = foobar
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. implicit val uriStringCodec: StringCodec[URI]

    Defines a StringCodec instance for java.net.URI.

    Defines a StringCodec instance for java.net.URI.

    Definition Classes
    PlatformSpecificInstances
    Example:
    1. // Decoding example
      scala> import java.net.URI
      
      scala> StringDecoder[URI].decode("http://localhost:8080")
      res1: StringResult[URI] = Right(http://localhost:8080)
      
      // Encoding example
      scala> StringEncoder[URI].encode(new URI("http://localhost:8080"))
      res2: String = http://localhost:8080
  34. implicit val urlStringCodec: StringCodec[URL]

    Defines a StringCodec instance for java.net.URL.

    Defines a StringCodec instance for java.net.URL.

    Definition Classes
    PlatformSpecificInstances
    Example:
    1. // Decoding example
      scala> import java.net.URL
      
      scala> StringDecoder[URL].decode("http://localhost:8080")
      res1: StringResult[URL] = Right(http://localhost:8080)
      
      // Encoding example
      scala> StringEncoder[URL].encode(new URL("http://localhost:8080"))
      res2: String = http://localhost:8080
  35. implicit val uuidStringCodec: StringCodec[UUID]

    Defines a StringCodec instance for java.util.UUID.

    Defines a StringCodec instance for java.util.UUID.

    Example:
    1. // Decoding example
      scala> import java.util.UUID
      
      scala> StringDecoder[UUID].decode("123e4567-e89b-12d3-a456-426655440000")
      res1: StringResult[UUID] = Right(123e4567-e89b-12d3-a456-426655440000)
      
      // Encoding example
      scala> StringEncoder[UUID].encode(UUID.fromString("123e4567-e89b-12d3-a456-426655440000"))
      res2: String = 123e4567-e89b-12d3-a456-426655440000
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped