Skip to main content

Module shared

Module shared 

Source
Expand description

Impl-level shared values (transports DESIGN §2.1, X2).

A controller-level value = expr is built once, in the Handlers::mount #[handlers] generates, into an Arc, and every handler’s mount function receives the same ::ulo::__private::Shared((Arc<V0>, Arc<V1>, ..)). #[handlers] cannot name a value’s type, so each Vi is a type parameter of the mount function, inferred at its call. The position of a value entry, in the order written across the impl’s three enhancer attributes and counting entries scoped to other transports, is part of the __handler contract: shared_values computes it the same way in #[handlers] and in every transport attribute.

Structs§

SharedValue
One controller-level value entry.

Functions§

construct
What Handlers::mount evaluates once: ::ulo::__private::Shared((Arc::new(e0), ..,)), or Shared(()) with no value.
mount_generics
The mount function’s generic parameters and the type of its shared parameter for a handler of the transport key: <__UloV0: ::ulo::Guard<Marker>, __UloV1> and &::ulo::__private::Shared<(Arc<__UloV0>, Arc<__UloV1>,)>. A value that applies to this transport is bounded by its role, spanned at the handler’s name, so a value lacking the role fails E0277 at Handlers::mount’s call of this handler’s mount function.
shared_ident
__ulo_shared, the mount function’s parameter and Handlers::mount’s local.
shared_values
The controller tier’s value entries, in order.
type_param
__UloV<index>, the mount function’s type parameter for value index.