pub struct TtheaderCoreService<H> { /* private fields */ }Expand description
Core Thrift service handler supporting the THeader protocol.
TtheaderCoreService is responsible for accepting Thrift connections, decoding requests,
routing them through a handler chain, and encoding responses. It supports the THeader
protocol for efficient message framing and metadata handling.
For implementation details and example usage, see the
module level documentation.
Implementations§
Source§impl<H> TtheaderCoreService<H>
impl<H> TtheaderCoreService<H>
pub fn new(handler_chain: H, thrift_timeout: ThriftServerTimeout) -> Self
Source§impl<F> TtheaderCoreService<F>
impl<F> TtheaderCoreService<F>
pub fn layer<C>() -> impl FactoryLayer<C, F, Factory = Self>where
C: Param<ThriftServerTimeout>,
Trait Implementations§
Source§impl<F: AsyncMakeService> AsyncMakeService for TtheaderCoreService<F>
impl<F: AsyncMakeService> AsyncMakeService for TtheaderCoreService<F>
Source§type Service = TtheaderCoreService<<F as AsyncMakeService>::Service>
type Service = TtheaderCoreService<<F as AsyncMakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as AsyncMakeService>::Error
type Error = <F as AsyncMakeService>::Error
The type of error that can occur during service creation.
Source§impl<H: Clone> Clone for TtheaderCoreService<H>
impl<H: Clone> Clone for TtheaderCoreService<H>
Source§fn clone(&self) -> TtheaderCoreService<H>
fn clone(&self) -> TtheaderCoreService<H>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F> MakeService for TtheaderCoreService<F>where
F: MakeService,
impl<F> MakeService for TtheaderCoreService<F>where
F: MakeService,
Source§type Service = TtheaderCoreService<<F as MakeService>::Service>
type Service = TtheaderCoreService<<F as MakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as MakeService>::Error
type Error = <F as MakeService>::Error
The type of error that can occur during service creation.
Source§impl<H, Stream, CXIn, CXStore, CXState, ERR> Service<(Stream, CXIn)> for TtheaderCoreService<H>where
CXIn: ParamRef<PeerAddr> + Fork<Store = CXStore, State = CXState>,
CXStore: 'static,
for<'a> CXState: Attach<CXStore>,
for<'a> H: ThriftHandler<<CXState as Attach<CXStore>>::Hdr<'a>, Error = ERR>,
ERR: Into<AnyError> + Debug,
Stream: AsyncReadRent + AsyncWriteRent + Unpin + 'static,
impl<H, Stream, CXIn, CXStore, CXState, ERR> Service<(Stream, CXIn)> for TtheaderCoreService<H>where
CXIn: ParamRef<PeerAddr> + Fork<Store = CXStore, State = CXState>,
CXStore: 'static,
for<'a> CXState: Attach<CXStore>,
for<'a> H: ThriftHandler<<CXState as Attach<CXStore>>::Hdr<'a>, Error = ERR>,
ERR: Into<AnyError> + Debug,
Stream: AsyncReadRent + AsyncWriteRent + Unpin + 'static,
Source§type Error = Infallible
type Error = Infallible
The type of error that this service can produce.
Auto Trait Implementations§
impl<H> Freeze for TtheaderCoreService<H>where
H: Freeze,
impl<H> RefUnwindSafe for TtheaderCoreService<H>where
H: RefUnwindSafe,
impl<H> Send for TtheaderCoreService<H>where
H: Send,
impl<H> Sync for TtheaderCoreService<H>where
H: Sync,
impl<H> Unpin for TtheaderCoreService<H>where
H: Unpin,
impl<H> UnwindSafe for TtheaderCoreService<H>where
H: UnwindSafe,
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