pub struct EndpointRegistry { /* private fields */ }Available on crate feature
server only.Expand description
A registry that holds the sources and sinks of a simulation bench.
Implementations§
Source§impl EndpointRegistry
impl EndpointRegistry
Sourcepub fn add_event_source<T>(
&mut self,
source: EventSource<T>,
name: impl Into<String>,
) -> Result<(), EventSource<T>>
pub fn add_event_source<T>( &mut self, source: EventSource<T>, name: impl Into<String>, ) -> Result<(), EventSource<T>>
Adds an event source to the registry.
If the specified name is already in use for another event source, the source provided as argument is returned in the error.
Sourcepub fn add_query_source<T, R>(
&mut self,
source: QuerySource<T, R>,
name: impl Into<String>,
) -> Result<(), QuerySource<T, R>>
pub fn add_query_source<T, R>( &mut self, source: QuerySource<T, R>, name: impl Into<String>, ) -> Result<(), QuerySource<T, R>>
Adds a query source to the registry.
If the specified name is already in use for another query source, the source provided as argument is returned in the error.
Trait Implementations§
Source§impl Debug for EndpointRegistry
impl Debug for EndpointRegistry
Source§impl Default for EndpointRegistry
impl Default for EndpointRegistry
Source§fn default() -> EndpointRegistry
fn default() -> EndpointRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EndpointRegistry
impl !RefUnwindSafe for EndpointRegistry
impl Send for EndpointRegistry
impl Sync for EndpointRegistry
impl Unpin for EndpointRegistry
impl !UnwindSafe for EndpointRegistry
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