pub struct Router<T>where
T: ServiceHandler,{ /* private fields */ }Implementations§
Source§impl<T> Router<T>where
T: ServiceHandler + Clone,
impl<T> Router<T>where
T: ServiceHandler + Clone,
pub fn new( service: &Service<T>, endpoint: SocketAddr, interface: SocketAddr, ) -> Self
pub async fn route<'a, 'b: 'a>( &'b mut self, bytes: &'b [u8], address: SocketAddr, ) -> Result<Option<Response<'a>>, Error>
Auto Trait Implementations§
impl<T> Freeze for Router<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Router<T>
impl<T> Send for Router<T>
impl<T> Sync for Router<T>
impl<T> Unpin for Router<T>where
T: Unpin,
impl<T> !UnwindSafe for Router<T>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request