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.
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 Params
- 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