pub enum SendStrategy {
Auto,
Realtime,
Reliable {
timeout: Duration,
check_arrival: bool,
},
}Expand description
发送策略配置
决定不同类型命令的发送方式:
- Realtime:邮箱模式,零延迟,可覆盖(适用于高频力控)
- Reliable:队列模式,按顺序,不丢失(适用于轨迹控制)
Variants§
Auto
自动选择(推荐)
根据控制模式自动选择最优策略:
- MIT 模式:使用 Realtime
- Position 模式:使用 Reliable
Realtime
强制实时模式
使用场景:超高频力控(>1kHz) 风险:命令可能被覆盖
Reliable
强制可靠模式
使用场景:轨迹控制、序列指令 保证:命令按顺序发送,不丢失 配置:可设置超时和到达确认
Trait Implementations§
Source§impl Clone for SendStrategy
impl Clone for SendStrategy
Source§fn clone(&self) -> SendStrategy
fn clone(&self) -> SendStrategy
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 Debug for SendStrategy
impl Debug for SendStrategy
Source§impl Default for SendStrategy
impl Default for SendStrategy
Source§fn default() -> SendStrategy
fn default() -> SendStrategy
Returns the “default value” for a type. Read more
Source§impl PartialEq for SendStrategy
impl PartialEq for SendStrategy
impl Copy for SendStrategy
impl Eq for SendStrategy
impl StructuralPartialEq for SendStrategy
Auto Trait Implementations§
impl Freeze for SendStrategy
impl RefUnwindSafe for SendStrategy
impl Send for SendStrategy
impl Sync for SendStrategy
impl Unpin for SendStrategy
impl UnwindSafe for SendStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more