pub struct CffiServiceServer { /* private fields */ }Expand description
Service server backed by a C vtable.
Implementations§
Trait Implementations§
Source§impl Drop for CffiServiceServer
impl Drop for CffiServiceServer
Source§impl ServiceServerTrait for CffiServiceServer
impl ServiceServerTrait for CffiServiceServer
Source§type Error = TransportError
type Error = TransportError
Error type for service operations
Source§fn has_request(&self) -> bool
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>
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 moreSource§fn send_reply(
&mut self,
sequence_number: i64,
data: &[u8],
) -> Result<(), TransportError>
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)
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>
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>
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>
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>
Handle a service request where the handler returns
Box<S::Reply> Read moreAuto Trait Implementations§
impl Freeze for CffiServiceServer
impl RefUnwindSafe for CffiServiceServer
impl !Send for CffiServiceServer
impl !Sync for CffiServiceServer
impl Unpin for CffiServiceServer
impl UnsafeUnpin for CffiServiceServer
impl UnwindSafe for CffiServiceServer
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