Skip to main content

CffiServiceServer

Struct CffiServiceServer 

Source
pub struct CffiServiceServer { /* private fields */ }
Expand description

Service server backed by a C vtable.

Implementations§

Source§

impl CffiServiceServer

Source

pub fn service_name(&self) -> &str

Source

pub fn type_name(&self) -> &str

Trait Implementations§

Source§

impl Drop for CffiServiceServer

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl ServiceServerTrait for CffiServiceServer

Source§

type Error = TransportError

Error type for service operations
Source§

fn has_request(&self) -> bool

Check if a request is available without consuming it. Read more
Source§

fn try_recv_request<'a>( &mut self, buf: &'a mut [u8], ) -> Result<Option<ServiceRequest<'a>>, TransportError>

Try to receive a service request into buf (non-blocking). Read more
Source§

fn send_reply( &mut self, sequence_number: i64, data: &[u8], ) -> Result<(), TransportError>

Send a reply for the given sequence number. Non-blocking from the application’s perspective; the backend may queue the reply for transport-level transmission.
Source§

fn register_waker(&self, _waker: &Waker)

Phase 122.3.c.6.e — register a Waker for event-driven service servers. Mirrors the matching method on SubscriberTrait / ServiceClientTrait. Backends that surface incoming-request notifications wake waker when has_request() flips true. Default: no-op (backends without wake support ignore — caller falls back to polling).
Source§

fn handle_request<S>( &mut self, req_buf: &mut [u8], reply_buf: &mut [u8], handler: impl FnOnce(&<S as RosService>::Request) -> <S as RosService>::Reply, ) -> Result<bool, Self::Error>
where S: RosService, Self::Error: From<TransportError>,

Handle a service request with typed messages
Source§

fn handle_request_boxed<S>( &mut self, req_buf: &mut [u8], reply_buf: &mut [u8], handler: impl FnOnce(&<S as RosService>::Request) -> Box<<S as RosService>::Reply>, ) -> Result<bool, Self::Error>
where S: RosService, Self::Error: From<TransportError>,

Handle a service request where the handler returns Box<S::Reply> Read more

Auto Trait Implementations§

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.