BunRuntimeExtension class final

Exposes Bun-specific host objects through RequestContext.extension.

Implemented types

Constructors

BunRuntimeExtension({BunGlobal? bun, BunServerHost? server, BunRequestHost? request})
Creates a Bun runtime extension snapshot.
const
BunRuntimeExtension.host()
Creates a host-level extension before the server starts handling requests.
factory

Properties

bun → BunGlobal?
The Bun global object when running on a Bun host.
final
hashCode int
The hash code for this object.
no setterinherited
request → BunRequestHost?
The Bun-native request object for the active request, when one exists.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server → BunServerHost?
The Bun server created by Bun.serve, when one exists.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited