pub struct LocalFakeServer {
pub from_client: Receiver<Vec<u8>>,
pub to_client: Sender<Vec<u8>>,
/* private fields */
}
Expand description
Server type
Fields§
§from_client: Receiver<Vec<u8>>
from client to server
to_client: Sender<Vec<u8>>
from server to client
Implementations§
Source§impl LocalFakeServer
impl LocalFakeServer
Sourcepub async fn recv_from_client(&mut self) -> Result<RpcFrame, LocalError>
pub async fn recv_from_client(&mut self) -> Result<RpcFrame, LocalError>
receive a frame
Sourcepub async fn reply<E: Endpoint>(
&mut self,
seq_no: u32,
data: &E::Response,
) -> Result<(), LocalError>
pub async fn reply<E: Endpoint>( &mut self, seq_no: u32, data: &E::Response, ) -> Result<(), LocalError>
Reply
Sourcepub async fn publish<T: Topic>(
&mut self,
seq_no: u32,
data: &T::Message,
) -> Result<(), LocalError>
pub async fn publish<T: Topic>( &mut self, seq_no: u32, data: &T::Message, ) -> Result<(), LocalError>
Publish
Sourcepub fn cause_fatal_error(&self)
pub fn cause_fatal_error(&self)
oops
Auto Trait Implementations§
impl Freeze for LocalFakeServer
impl !RefUnwindSafe for LocalFakeServer
impl Send for LocalFakeServer
impl Sync for LocalFakeServer
impl Unpin for LocalFakeServer
impl !UnwindSafe for LocalFakeServer
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