提交 c25bf26c authored 作者: Serhij S's avatar Serhij S

example fixes

上级 8bee01bd
[package] [package]
name = "roboplc" name = "roboplc"
version = "0.1.0" version = "0.1.1"
edition = "2021" edition = "2021"
authors = ["Serhij S. <div@altertech.com>"] authors = ["Serhij S. <div@altertech.com>"]
license = "Apache-2.0" license = "Apache-2.0"
......
...@@ -278,14 +278,15 @@ impl<T: MessageDeliveryPolicy + Clone> ClientOptions<T> { ...@@ -278,14 +278,15 @@ impl<T: MessageDeliveryPolicy + Clone> ClientOptions<T> {
/// # Examples /// # Examples
/// ///
/// ```rust /// ```rust
/// use roboplc::event_matches;
///
/// enum Message { /// enum Message {
/// Temperature(f64), /// Temperature(f64),
/// Flush, /// Flush,
/// Other /// Other
/// } /// }
/// ///
/// let condition = move || { event_matches!(Message::Temperature(_)) || /// let condition_fn = event_matches!(Message::Temperature(_) | (Message::Flush));
/// event_matches!(Message::Flush) };
/// ``` /// ```
#[macro_export] #[macro_export]
macro_rules! event_matches { macro_rules! event_matches {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论