Skip to main content

ezsp/frame/parameters/utilities/
echo.rs

1//! Parameters for the [`Utilities::echo`](crate::Utilities::echo) command.
2
3use crate::types::ByteSizedVec;
4
5crate::frame::parameters::frame!(
6    0x0081,
7    { data: ByteSizedVec<u8> },
8    impl {
9        impl Command {
10            /// Creates command parameters.
11            #[must_use]
12            pub const fn new(data: ByteSizedVec<u8>) -> Self {
13                Self { data }
14            }
15        }
16    },
17    { echo: ByteSizedVec<u8> } => Utilities(utilities)::Echo,
18    impl {
19        impl Response {
20            /// Returns the echoed data.
21            #[must_use]
22            pub fn echo(self) -> ByteSizedVec<u8> {
23                self.echo
24            }
25        }
26    }
27);