pub struct SidecarClient { /* private fields */ }
Expand description
A sidecar client.
This is actually a client to multiple sidecar devices, since there is one per node. This is abstracted away for the caller.
Implementations§
Source§impl SidecarClient
impl SidecarClient
Sourcepub fn new<T: SpawnDriver>(
driver: impl FnMut(u32) -> T,
) -> Result<Option<Self>, NewSidecarClientError>
pub fn new<T: SpawnDriver>( driver: impl FnMut(u32) -> T, ) -> Result<Option<Self>, NewSidecarClientError>
Create a new sidecar client. Returns None
if no sidecar devices are found.
driver(cpu)
returns the driver to use for polling the sidecar device
whose base CPU is cpu
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SidecarClient
impl !RefUnwindSafe for SidecarClient
impl Send for SidecarClient
impl Sync for SidecarClient
impl Unpin for SidecarClient
impl !UnwindSafe for SidecarClient
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