Skip to main content

RawServiceClient

Struct RawServiceClient 

Source
pub struct RawServiceClient<const REQ_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const REPLY_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }> { /* private fields */ }
Expand description

Typeless service-client handle. L1 counterpart of EmbeddedServiceClient for the same audience as RawServiceServer.

Implementations§

Source§

impl<const REQ_BUF: usize, const REPLY_BUF: usize> RawServiceClient<REQ_BUF, REPLY_BUF>

Source

pub fn register_waker(&self, waker: &Waker)

Phase 122.3.c.6.e — register a Waker that fires when the reply to a previously-sent request lands.

Source

pub fn new(handle: RmwServiceClient) -> Self

Construct from a backend-allocated handle. Same audience as RawServiceServer::new.

Source

pub fn send_request_raw(&mut self, request: &[u8]) -> Result<(), NodeError>

Send a raw CDR request. Non-blocking; the reply arrives via try_recv_reply_raw.

Source

pub fn server_available(&self) -> Result<bool, NodeError>

Phase 124.G.3 — graph-aware “is the matching server up?” probe. Mirrors [Client::server_available] for the raw API.

Source

pub fn try_recv_reply_raw(&mut self) -> Result<Option<usize>, NodeError>

Try to receive a reply (non-blocking). Returns Ok(Some(len)) with the reply length on success; bytes live in reply_buffer until the next call.

Source

pub fn reply_buffer(&self) -> &[u8]

Borrow the inline reply buffer. Valid after a successful try_recv_reply_raw call.

Auto Trait Implementations§

§

impl<const REQ_BUF: usize, const REPLY_BUF: usize> Freeze for RawServiceClient<REQ_BUF, REPLY_BUF>

§

impl<const REQ_BUF: usize, const REPLY_BUF: usize> RefUnwindSafe for RawServiceClient<REQ_BUF, REPLY_BUF>

§

impl<const REQ_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const REPLY_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }> !Send for RawServiceClient<REQ_BUF, REPLY_BUF>

§

impl<const REQ_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const REPLY_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }> !Sync for RawServiceClient<REQ_BUF, REPLY_BUF>

§

impl<const REQ_BUF: usize, const REPLY_BUF: usize> Unpin for RawServiceClient<REQ_BUF, REPLY_BUF>

§

impl<const REQ_BUF: usize, const REPLY_BUF: usize> UnsafeUnpin for RawServiceClient<REQ_BUF, REPLY_BUF>

§

impl<const REQ_BUF: usize, const REPLY_BUF: usize> UnwindSafe for RawServiceClient<REQ_BUF, REPLY_BUF>

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.