Skip to main content

Module common

Module common 

Source

Macros§

wrap_dalek_type 🔒
Wraps one of the dalek types to enforce hex serialization

Structs§

BytesPayload
A payload (see PayloadTrait) that can only hold bytes. Probably only useful for as EndpointDetails::RequestType.
CachedResponse
Cached response
CurvePoint
Wrapper around curve25519_dalek::ristretto::CompressedRistretto enforcing base16 serialization.
ErrorInfo
Information about an ErrorCode.
NoPayload
Use NoPayload as EndpointDetails::RequestType to indicate no payload is expected.
Responder
The actix_web::Responder used for almost all API endpoints, EndpointDetails together with an instance of Result<EndpointDetails::ResponseType>.
Scalar
Wrapper around curve25519_dalek::scalar::Scalar enforcing base16 serialization.
SigningKey
Wrapper around ed25519_dalek::SigningKey enforcing base16 serialization.
VerifyingKey
Wrapper around ed25519_dalek::VerifyingKey enforcing base16 serialization.

Enums§

ErrorCode
List of possible errors. We use error codes in favour of more descriptive strings, because error codes can be more easily processed by the calling code, should change less often, and can be easily translated.
Payload
Payload of a request or response to an api endpoint.

Traits§

ApiResultExt
Extension trait for Result<T,ErrorCode>.
EndpointDetails
Details on a PubHubs server endpoint
PayloadTrait
What’s expected from a EndpointDetails::RequestType.
ResultExt
Extension trait for std::result::Result.
ResultPayloadTrait
What’s expected from a EndpointDetails::ResponseType.

Type Aliases§

Result