pub enum SdoResult {
Pending,
Ok(Value),
Err(String),
Timeout,
}Expand description
Result of checking an in-flight SDO request.
Returned by SdoClient::result(). The caller should match on this each
tick until the request resolves (i.e. is no longer Pending).
ⓘ
match sdo.result(ctx.client, tid, Duration::from_secs(3)) {
SdoResult::Pending => { /* check again next tick */ }
SdoResult::Ok(data) => { /* use data */ }
SdoResult::Err(msg) => { log::error!("{}", msg); }
SdoResult::Timeout => { log::error!("timed out"); }
}Variants§
Pending
No response yet; check again next tick.
Ok(Value)
Operation succeeded. Contains the response data field — the read
value for reads, or an empty/null value for writes.
Err(String)
The server (or EtherCAT master) reported an error. The string contains
the error_message from the response (e.g. "SDO abort: 0x06090011").
Timeout
No response arrived within the caller-specified deadline.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SdoResult
impl RefUnwindSafe for SdoResult
impl Send for SdoResult
impl Sync for SdoResult
impl Unpin for SdoResult
impl UnsafeUnpin for SdoResult
impl UnwindSafe for SdoResult
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