implicit final class RichInput extends AnyVal
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RichInput
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- val input: Input
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def stringSubField(key: String, pipeline: Rule[String] = Validated.Valid(_)): Validated[ErrorTree, String]
Extract a string from a child element
- def subField[A](key: String, pipeline: Transformation[String, A]): Validated[ErrorTree, A]
Extract a string from a child element, then transform it into the desired datatype
- def toField[A](pipeline: Transformation[String, A]): Validated[ErrorTree, A]
Take the string at the root of the input tree and pass it through the transformation pipeline provided.
Take the string at the root of the input tree and pass it through the transformation pipeline provided. This is usually done when constructing a codec for a datatype.
For example -
val someBool: Validated[ErrorTree, Boolean] = someInput.toField[Boolean]{x: String => Validated.catchOnly[IllegalArgumentException]( x.toBoolean ).leftMap(_ => ErrorMsg("invalid").toTree) }
- def toString(): String
- Definition Classes
- Any
- def toStringField(pipeline: Rule[String] = Validated.Valid(_)): Validated[ErrorTree, String]
Extract a string from the root of the Input tree.
Extract a string from the root of the Input tree. A more specialised version of toField that only handles strings.
- def toUrlEncodedString: String
Generate a UTF-8 URL encoded String.