pub struct CoreDevicePort { /* private fields */ }Expand description
Adapter from the legacy mabi-core device handle into the shared runtime surface.
Implementations§
Source§impl CoreDevicePort
impl CoreDevicePort
Sourcepub fn new(handle: DeviceHandle) -> Self
pub fn new(handle: DeviceHandle) -> Self
Wraps an existing device handle.
Sourcepub fn handle(&self) -> &DeviceHandle
pub fn handle(&self) -> &DeviceHandle
Returns the wrapped handle.
Converts the adapter into a shared device port.
Trait Implementations§
Source§impl Clone for CoreDevicePort
impl Clone for CoreDevicePort
Source§fn clone(&self) -> CoreDevicePort
fn clone(&self) -> CoreDevicePort
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DevicePort for CoreDevicePort
impl DevicePort for CoreDevicePort
Source§fn info(&self) -> DeviceInfo
fn info(&self) -> DeviceInfo
Returns the current device metadata snapshot.
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts the device port if supported.
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stops the device port if supported.
Source§fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
point_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = CoreResult<DataPoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
point_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = CoreResult<DataPoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads a point value.
Source§fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
point_id: &'life1 str,
value: Value,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
point_id: &'life1 str,
value: Value,
) -> Pin<Box<dyn Future<Output = CoreResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Writes a point value.
Source§fn state(&self) -> DeviceState
fn state(&self) -> DeviceState
Returns the current device state.
Source§fn point_definitions(&self) -> Vec<DataPointDef>
fn point_definitions(&self) -> Vec<DataPointDef>
Returns the point definitions exposed by the device, if available.
Source§impl From<DeviceHandle> for CoreDevicePort
impl From<DeviceHandle> for CoreDevicePort
Source§fn from(handle: DeviceHandle) -> Self
fn from(handle: DeviceHandle) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CoreDevicePort
impl !RefUnwindSafe for CoreDevicePort
impl Send for CoreDevicePort
impl Sync for CoreDevicePort
impl Unpin for CoreDevicePort
impl UnsafeUnpin for CoreDevicePort
impl !UnwindSafe for CoreDevicePort
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