pub struct CffiService { /* private fields */ }Expand description
Service server backed by a C vtable.
Implementations§
Source§impl CffiService
impl CffiService
Trait Implementations§
Source§impl Drop for CffiService
impl Drop for CffiService
Source§impl ServiceTrait for CffiService
impl ServiceTrait for CffiService
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 take_request<'a>(
&mut self,
buf: &'a mut [u8],
) -> Result<Option<ServiceRequest<'a>>, TransportError>
fn take_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_response(
&mut self,
sequence_number: i64,
data: &[u8],
) -> Result<(), TransportError>
fn send_response( &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 / ClientTrait. 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 moreSource§fn handle_request_raw(
&mut self,
req_buf: &mut [u8],
reply_buf: &mut [u8],
handler: impl FnOnce(&mut CdrReader<'_>, &mut CdrWriter<'_>) -> Result<(), TransportError>,
) -> Result<bool, Self::Error>
fn handle_request_raw( &mut self, req_buf: &mut [u8], reply_buf: &mut [u8], handler: impl FnOnce(&mut CdrReader<'_>, &mut CdrWriter<'_>) -> Result<(), TransportError>, ) -> Result<bool, Self::Error>
Handle one request by STREAMING: the handler reads fields off the wire
and writes the reply’s fields straight back, so neither the request nor
the reply is ever materialised as a value. Read more
Auto Trait Implementations§
impl !Send for CffiService
impl !Sync for CffiService
impl Freeze for CffiService
impl RefUnwindSafe for CffiService
impl Unpin for CffiService
impl UnsafeUnpin for CffiService
impl UnwindSafe for CffiService
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