trait EndpointServerLogicOps[I, E, O, -R] extends AnyRef
- Alphabetic
- By Inheritance
- EndpointServerLogicOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
serverLogic[F[_]](f: (I) ⇒ F[Either[E, O]]): ServerEndpoint[I, E, O, R, F]
Combine this endpoint description with a function, which implements the server-side logic.
Combine this endpoint description with a function, which implements the server-side logic. The logic returns a result, which is either an error or a successful output, wrapped in an effect type
F
.A server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).
Both the endpoint and logic function are considered complete, and cannot be later extended through the returned ServerEndpoint value (except for endpoint meta-data). To provide the logic in parts, see serverLogicPart and serverLogicForCurrent.
-
def
serverLogicForCurrent[U, F[_]](f: (I) ⇒ F[Either[E, U]]): PartialServerEndpoint[U, Unit, E, O, R, F]
Combine this endpoint description with a function, which implements a part of the server-side logic, for the entire input defined so far.
Combine this endpoint description with a function, which implements a part of the server-side logic, for the entire input defined so far. The partial logic returns a result, which is either an error or a success value, wrapped in an effect type
F
.Subsequently, the endpoint inputs and outputs can be extended (but not error outputs!). Then, either further parts of the server logic can be provided (again, consuming the whole input defined so far). Or, the entire remaining server logic can be provided, given a function which accepts as arguments the results of applying the part-functions, and the remaining input. The final result is then a ServerEndpoint.
A complete server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).
When using this method, each logic part consumes the whole input defined so far. To provide the server logic in parts, where only part of the input is consumed (but the endpoint cannot be later extended), see the serverLogicPart function.
An example use-case is defining an endpoint with fully-defined errors, and with authorization logic built-in. Such an endpoint can be then extended by multiple other endpoints.
-
def
serverLogicForCurrentRecoverErrors[U, F[_]](f: (I) ⇒ F[U])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E]): PartialServerEndpoint[U, Unit, E, O, R, F]
Same as serverLogicForCurrent, but requires
E
to be a throwable, and coverts failed effects of typeE
to endpoint errors. -
def
serverLogicPart[T, IR, U, F[_]](f: (T) ⇒ F[Either[E, U]])(implicit iMinusT: typelevel.ParamSubtract.Aux[I, T, IR]): ServerEndpointInParts[U, IR, I, E, O, R, F]
Combine this endpoint description with a function, which implements a part of the server-side logic.
Combine this endpoint description with a function, which implements a part of the server-side logic. The partial logic returns a result, which is either an error or a success value, wrapped in an effect type
F
.Subsequent parts of the logic can be provided later using ServerEndpointInParts.andThenPart, consuming successive input parts. Finally, the logic can be completed, given a function which accepts as arguments the results of applying on part-functions, and the remaining input. The final result is then a ServerEndpoint.
A complete server endpoint can be passed to a server interpreter. Each server interpreter supports effects of a specific type(s).
When using this method, the endpoint description is considered complete, and cannot be later extended through the returned ServerEndpointInParts value. However, each part of the server logic can consume only a part of the input. To provide the logic in parts, while still being able to extend the endpoint description, see serverLogicForCurrent.
An example use-case is providing authorization logic, followed by server logic (using an authorized user), given a complete endpoint description.
Note that the type of the
f
partial server logic function cannot be inferred, it must be explicitly given (e.g. by providing a function or method value). -
def
serverLogicPartRecoverErrors[T, IR, U, F[_]](f: (T) ⇒ F[U])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E], iMinusR: typelevel.ParamSubtract.Aux[I, T, IR]): ServerEndpointInParts[U, IR, I, E, O, R, F]
Same as serverLogicPart, but requires
E
to be a throwable, and coverts failed effects of typeE
to endpoint errors. -
def
serverLogicRecoverErrors[F[_]](f: (I) ⇒ F[O])(implicit eIsThrowable: <:<[E, Throwable], eClassTag: ClassTag[E]): ServerEndpoint[I, E, O, R, F]
Same as serverLogic, but requires
E
to be a throwable, and coverts failed effects of typeE
to endpoint errors. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated