Using the pre-defined path segments in PathSegment can be cumbersome if you have to constantly specify the error
type A, for example in the PathSegment.segment or PathSegment.root methods. Therefore, you can invoke an
implementation of this class and import its members instead.
We don't redefine PathSegment.intSegment and PathSegment.stringSegment since they can be easily and
conveniently invoked using the segment
method below.
- Type parameters:
- A
type of error.
- Example:
val pathSegmentImpl = PathSegmentImpl[DummyError] import pathSegmentImpl._ root / "hello" // this is of type PathSegment[Unit, DummyError] thanks to the import above. (note that in this case there is already a PathSegmentImpl for [[urldsl.errors.DummyError]] in the [[PathSegment]] companion object)
- Companion:
- object
Value members
Concrete methods
def oneOf[T](t: T, ts: T*)(implicit fromString: FromString[T, A], printer: Printer[T]): PathSegment[Unit, A]
Concrete fields
Implicits
Implicits
implicit def unaryPathSegment[T](t: T)(implicit fromString: FromString[T, A], printer: Printer[T]): PathSegment[Unit, A]