pub struct ServerSubsystemsBuilder { /* private fields */ }Expand description
Builder for ServerSubsystems.
Use the fluent API to register each optional subsystem, then call
build to validate cross-subsystem dependencies and
produce the final ServerSubsystems.
§Example
ⓘ
let subsystems = ServerSubsystemsBuilder::new()
.with_storage(storage_subsystem)
.with_functions(functions_subsystem)
.with_realtime(realtime_subsystem)
.build()?;Implementations§
Source§impl ServerSubsystemsBuilder
impl ServerSubsystemsBuilder
Sourcepub fn with_storage(self, subsystem: StorageSubsystem) -> Self
pub fn with_storage(self, subsystem: StorageSubsystem) -> Self
Register the storage subsystem.
Sourcepub fn with_functions(self, subsystem: FunctionsSubsystem) -> Self
pub fn with_functions(self, subsystem: FunctionsSubsystem) -> Self
Register the functions subsystem.
Sourcepub fn with_realtime(self, subsystem: RealtimeSubsystem) -> Self
pub fn with_realtime(self, subsystem: RealtimeSubsystem) -> Self
Register the realtime subsystem.
Sourcepub fn build(self) -> Result<ServerSubsystems, SubsystemBuildError>
pub fn build(self) -> Result<ServerSubsystems, SubsystemBuildError>
Validate cross-subsystem dependencies and build ServerSubsystems.
§Errors
Returns SubsystemBuildError::MissingDependency if the functions subsystem
contains after:storage triggers but no storage subsystem has been registered.
Trait Implementations§
Source§impl Default for ServerSubsystemsBuilder
impl Default for ServerSubsystemsBuilder
Source§fn default() -> ServerSubsystemsBuilder
fn default() -> ServerSubsystemsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ServerSubsystemsBuilder
impl !RefUnwindSafe for ServerSubsystemsBuilder
impl !UnwindSafe for ServerSubsystemsBuilder
impl Send for ServerSubsystemsBuilder
impl Sync for ServerSubsystemsBuilder
impl Unpin for ServerSubsystemsBuilder
impl UnsafeUnpin for ServerSubsystemsBuilder
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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