InitializableFromSource
A type that can be initialized from another type
protocol InitializableFromSource<Source> : Sendable
Browse conforming typesA type that can be initialized from another type
protocol InitializableFromSource<Source> : Sendable
import Hummingbird
associatedtype Source
protocol Sendable
A thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(source: Self.Source)
Initialise from source type
protocol ChildRequestContext<ParentContext> : RequestContext where Self.Source == Never
A RequestContext that can be initialized from another RequestContext.
protocol RemoteAddressRequestContext : RequestContext
Protocol for request context that stores the remote address of connected client.
protocol RequestContext : InitializableFromSource, RequestContextSource where Self.Source : RequestContextSource
Protocol that all request contexts should conform to. A RequestContext is a statically typed metadata container for information that is associated with a Request
, and is therefore instantiated alongside the request.
import HummingbirdRouter
protocol RouterRequestContext : RequestContext
Protocol that all request contexts used with RouterBuilder should conform to.