pub struct ServerBuilder<Tls = (), Authentication = (), Middleware = IdentityServerHandler> { /* private fields */ }Expand description
Builder for a reusable Server.
Implementations§
Source§impl<Tls, Authentication, Middleware> ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> ServerBuilder<Tls, Authentication, Middleware>
Sourcepub fn tls<Next>(
self,
policy: Next,
) -> ServerBuilder<Next, Authentication, Middleware>
pub fn tls<Next>( self, policy: Next, ) -> ServerBuilder<Next, Authentication, Middleware>
Selects the client-facing TLS posture explicitly.
Sourcepub fn authentication<Next>(
self,
policy: Next,
) -> ServerBuilder<Tls, Next, Middleware>
pub fn authentication<Next>( self, policy: Next, ) -> ServerBuilder<Tls, Next, Middleware>
Replaces the authentication policy used for each accepted connection.
Sourcepub fn limits(self, limits: ServerProtocolLimits) -> Self
pub fn limits(self, limits: ServerProtocolLimits) -> Self
Replaces the conservative protocol limits.
Sourcepub fn middleware<Next>(
self,
factory: Next,
) -> ServerBuilder<Tls, Authentication, MiddlewareChain<Middleware, Next>>
pub fn middleware<Next>( self, factory: Next, ) -> ServerBuilder<Tls, Authentication, MiddlewareChain<Middleware, Next>>
Appends a synchronous, infallible per-connection middleware factory.
Sourcepub fn build(
self,
) -> Result<Server<Tls, Authentication, Middleware>, BuildServerError>
pub fn build( self, ) -> Result<Server<Tls, Authentication, Middleware>, BuildServerError>
Validates configuration and creates an immutable reusable component.
§Errors
Returns an error when either security policy is omitted or a protocol limit cannot be represented by the PostgreSQL wire format.
Trait Implementations§
Source§impl<Tls: Clone, Authentication: Clone, Middleware: Clone> Clone for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls: Clone, Authentication: Clone, Middleware: Clone> Clone for ServerBuilder<Tls, Authentication, Middleware>
Source§fn clone(&self) -> ServerBuilder<Tls, Authentication, Middleware>
fn clone(&self) -> ServerBuilder<Tls, Authentication, Middleware>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Tls, Authentication> Debug for ServerBuilder<Tls, Authentication>
impl<Tls, Authentication> Debug for ServerBuilder<Tls, Authentication>
Auto Trait Implementations§
impl<Tls, Authentication, Middleware> Freeze for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> RefUnwindSafe for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> Send for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> Sync for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> Unpin for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> UnsafeUnpin for ServerBuilder<Tls, Authentication, Middleware>
impl<Tls, Authentication, Middleware> UnwindSafe for ServerBuilder<Tls, Authentication, Middleware>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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