pub struct Ports {Show 15 fields
pub config: Arc<dyn Config>,
pub db: Option<Arc<dyn Database>>,
pub mailer: Option<Arc<dyn Mailer>>,
pub captcha: Option<Arc<dyn Captcha>>,
pub rate_limiter: Option<Arc<dyn RateLimiter>>,
pub signer: Option<Arc<dyn Signer>>,
pub kv: Option<Arc<dyn KeyValue>>,
pub blob: Option<Arc<dyn Blob>>,
pub push: Option<Arc<dyn Push>>,
pub payments: Option<Arc<dyn Payments>>,
pub http: Option<Arc<dyn HttpClient>>,
pub clock: Option<Arc<dyn Clock>>,
pub id_gen: Option<Arc<dyn IdGen>>,
pub defer: Option<Arc<dyn Defer>>,
pub dispatcher: Option<Arc<dyn Dispatcher>>,
}Expand description
The per-request bundle of resolved port implementations plus the typed config the runtime built from environment/secrets.
Every port is optional: the Cloudflare runtime resolves what the venture’s
bindings actually provide and leaves the rest None.
Fields§
§config: Arc<dyn Config>§db: Option<Arc<dyn Database>>§mailer: Option<Arc<dyn Mailer>>§captcha: Option<Arc<dyn Captcha>>§rate_limiter: Option<Arc<dyn RateLimiter>>§signer: Option<Arc<dyn Signer>>§kv: Option<Arc<dyn KeyValue>>§blob: Option<Arc<dyn Blob>>§push: Option<Arc<dyn Push>>§payments: Option<Arc<dyn Payments>>§http: Option<Arc<dyn HttpClient>>§clock: Option<Arc<dyn Clock>>§id_gen: Option<Arc<dyn IdGen>>§defer: Option<Arc<dyn Defer>>§dispatcher: Option<Arc<dyn Dispatcher>>Set by the runtime when the venture mounts sidecar modules. Not a
Port, so view_for never copies it and no module can reach it.
Implementations§
Source§impl Ports
impl Ports
Sourcepub fn empty() -> Self
pub fn empty() -> Self
An empty bundle with no ports resolved and an
EmptyConfig.
pub fn with_config(config: Arc<dyn Config>) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Ports
impl !UnwindSafe for Ports
impl Freeze for Ports
impl Send for Ports
impl Sync for Ports
impl Unpin for Ports
impl UnsafeUnpin for Ports
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more