Struct RuntimeExtensionHostBuilder
pub struct RuntimeExtensionHostBuilder { /* private fields */ }Expand description
Builder for constructing an immutable RuntimeExtensionHost.
Implementations§
§impl RuntimeExtensionHostBuilder
impl RuntimeExtensionHostBuilder
pub fn new() -> Self
pub fn new() -> Self
Creates an empty builder.
pub fn production_defaults() -> Self
pub fn production_defaults() -> Self
Creates a hardened builder profile for production environments.
Enables a restrictive capability policy and requires extensions to
override RuntimeExtension::name with a stable identifier.
pub fn with_event_queue_capacity(self, capacity: usize) -> Self
pub fn with_event_queue_capacity(self, capacity: usize) -> Self
Sets bounded async event queue capacity for extension packet dispatch.
pub const fn with_startup_timeout(self, timeout: Duration) -> Self
pub const fn with_startup_timeout(self, timeout: Duration) -> Self
Sets startup timeout for RuntimeExtension::on_startup.
pub const fn with_shutdown_timeout(self, timeout: Duration) -> Self
pub const fn with_shutdown_timeout(self, timeout: Duration) -> Self
Sets shutdown timeout for RuntimeExtension::on_shutdown.
pub fn with_capability_policy(
self,
policy: RuntimeExtensionCapabilityPolicy,
) -> Self
pub fn with_capability_policy( self, policy: RuntimeExtensionCapabilityPolicy, ) -> Self
Sets the capability policy applied during extension startup validation.
pub const fn with_require_explicit_extension_names(self, require: bool) -> Self
pub const fn with_require_explicit_extension_names(self, require: bool) -> Self
Enables or disables strict validation for explicit extension names.
pub fn add_extension<E>(self, extension: E) -> Selfwhere
E: RuntimeExtension,
pub fn add_extension<E>(self, extension: E) -> Selfwhere
E: RuntimeExtension,
Adds one extension value by storing it behind Arc.
Adds one already-shared extension.
pub fn build(self) -> RuntimeExtensionHost
pub fn build(self) -> RuntimeExtensionHost
Finalizes the builder into an immutable host.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuntimeExtensionHostBuilder
impl !RefUnwindSafe for RuntimeExtensionHostBuilder
impl Send for RuntimeExtensionHostBuilder
impl Sync for RuntimeExtensionHostBuilder
impl Unpin for RuntimeExtensionHostBuilder
impl UnsafeUnpin for RuntimeExtensionHostBuilder
impl !UnwindSafe for RuntimeExtensionHostBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more