pub struct ThreadPoolingDecoder<T: DecoderInstance> {
pub config: ThreadPoolingConfig,
pub original_config: Arc<Value>,
pub thread_pool: Arc<ThreadPool>,
/* private fields */
}Fields§
§config: ThreadPoolingConfig§original_config: Arc<Value>§thread_pool: Arc<ThreadPool>Implementations§
Source§impl<T: DecoderInstance + Send + 'static> ThreadPoolingDecoder<T>
impl<T: DecoderInstance + Send + 'static> ThreadPoolingDecoder<T>
Trait Implementations§
Source§impl<T: DecoderInstance + Send + 'static> BlackBoxDecoder for ThreadPoolingDecoder<T>
impl<T: DecoderInstance + Send + 'static> BlackBoxDecoder for ThreadPoolingDecoder<T>
Source§fn get_capabilities<'life0, 'async_trait>(
&'life0 self,
_request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<DecoderCapabilities>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_capabilities<'life0, 'async_trait>(
&'life0 self,
_request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<DecoderCapabilities>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Report optional decoder features. Advertising multiple features means
they may be used together.
Source§fn decode<'life0, 'async_trait>(
&'life0 self,
request: Request<DecodingProblem>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decode<'life0, 'async_trait>(
&'life0 self,
request: Request<DecodingProblem>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
calling this service is in general inefficient because it has to process
the entire decoding hypergraph during runtime. Consider using preloaded
decoder instances like the rpc interfaces followed
Source§fn load_hypergraph<'life0, 'async_trait>(
&'life0 self,
request: Request<DecodingHypergraph>,
) -> Pin<Box<dyn Future<Output = Result<Response<LoadHypergraphResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_hypergraph<'life0, 'async_trait>(
&'life0 self,
request: Request<DecodingHypergraph>,
) -> Pin<Box<dyn Future<Output = Result<Response<LoadHypergraphResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
load a decoding hypergraph into the decoder service so that the runtime
decoding can simply decode using the existing instances
Source§fn decode_loaded<'life0, 'async_trait>(
&'life0 self,
request: Request<LoadedDecodingProblem>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decode_loaded<'life0, 'async_trait>(
&'life0 self,
request: Request<LoadedDecodingProblem>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParityFactor>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
decode using a preloaded hypergraph instance
Auto Trait Implementations§
impl<T> !Freeze for ThreadPoolingDecoder<T>
impl<T> !RefUnwindSafe for ThreadPoolingDecoder<T>
impl<T> !UnwindSafe for ThreadPoolingDecoder<T>
impl<T> Forget for ThreadPoolingDecoder<T>
impl<T> Move for ThreadPoolingDecoder<T>
impl<T> Send for ThreadPoolingDecoder<T>
impl<T> Sync for ThreadPoolingDecoder<T>
impl<T> Unpin for ThreadPoolingDecoder<T>
impl<T> UnsafeUnpin for ThreadPoolingDecoder<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> 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 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>
Wrap the input message
T in a tonic::Request