Skip to main content

Replier

Struct Replier 

Source
pub struct Replier<TIn: DdsType, TOut: DdsType> { /* private fields */ }
Expand description

Server-Seite eines DDS-RPC-Service.

Implementations§

Source§

impl<TIn: DdsType + Send + 'static, TOut: DdsType + Send + 'static> Replier<TIn, TOut>

Source

pub fn new( participant: &DomainParticipant, service_name: &str, qos: &RpcQos, handler: Arc<dyn ReplierHandler<TIn, TOut>>, ) -> RpcResult<Self>

Legt einen neuen Replier gegen service_name an.

§Errors

Siehe crate::requester::Requester::new.

Source

pub fn with_instance( participant: &DomainParticipant, service_name: &str, instance_name: &str, qos: &RpcQos, handler: Arc<dyn ReplierHandler<TIn, TOut>>, ) -> RpcResult<Self>

Wie Self::new, mit explizitem Instance-Namen.

§Errors

Siehe crate::requester::Requester::with_instance.

Source

pub fn service_name(&self) -> &str

Service-Name.

Source

pub fn instance_name(&self) -> &str

Service-Instance-Name.

Source

pub fn handled_count(&self) -> u64

Anzahl bisher erfolgreich verarbeiteter Requests.

Source

pub fn error_count(&self) -> u64

Anzahl Requests, die der Handler mit Err(_) quittiert hat.

Source

pub fn tick(&self) -> usize

Liest pending Requests, ruft den Handler, schreibt Reply zurueck. Liefert die Anzahl der in diesem Tick verarbeiteten Requests.

Trait Implementations§

Source§

impl<TIn: DdsType, TOut: DdsType> Debug for Replier<TIn, TOut>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<TIn, TOut> !Freeze for Replier<TIn, TOut>

§

impl<TIn, TOut> !RefUnwindSafe for Replier<TIn, TOut>

§

impl<TIn, TOut> Send for Replier<TIn, TOut>

§

impl<TIn, TOut> Sync for Replier<TIn, TOut>

§

impl<TIn, TOut> Unpin for Replier<TIn, TOut>

§

impl<TIn, TOut> UnsafeUnpin for Replier<TIn, TOut>

§

impl<TIn, TOut> !UnwindSafe for Replier<TIn, TOut>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.