pub struct BoundChain { /* private fields */ }Expand description
An AssembledChain whose gRPC + Flight SQL listener is bound and held
live, ready to serve. Returned by AssembledChain::bind. The listener is
open from bind through serve, so Self::addr reports the ACTUAL bound
address (the real port even for a :0 assembly) and the port is never
observably free between resolving it and serving on it.
Implementations§
Source§impl BoundChain
impl BoundChain
Sourcepub fn addr(&self) -> SocketAddr
pub fn addr(&self) -> SocketAddr
The ACTUAL address the listener is bound to. For a chain assembled at
:0, this is the ephemeral port the kernel assigned — resolved at
AssembledChain::bind and held live until serve.
Sourcepub fn mounted(&self) -> &[String]
pub fn mounted(&self) -> &[String]
The ledger of mounted service names, in mount order. Read for a startup log; carried through the bind unchanged.
Sourcepub async fn serve_with_shutdown(
self,
shutdown: impl Future<Output = ()> + Send + 'static,
) -> Result<(), ServerError>
pub async fn serve_with_shutdown( self, shutdown: impl Future<Output = ()> + Send + 'static, ) -> Result<(), ServerError>
Serve the bound chain on its already-open listener until shutdown
resolves. Consumes self, keeping the training-worker guard alive for
the whole serve loop.
The transport layers apply HERE, in this order: accept_http1(true) then
MetricsLayer (outermost — observes every request by method path before
routing) then GrpcWebTrailersLayer (wraps GrpcWebLayer, repairing the
trailers-only error response into the in-body trailer frame a gRPC-web
client requires) then GrpcWebLayer. Every service mounted via
AssembledChain::mount, engine or downstream, inherits gRPC-web framing
- trailer repair with no per-service opt-in.
Auto Trait Implementations§
impl !Freeze for BoundChain
impl !RefUnwindSafe for BoundChain
impl !UnwindSafe for BoundChain
impl Send for BoundChain
impl Sync for BoundChain
impl Unpin for BoundChain
impl UnsafeUnpin for BoundChain
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.