1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#![allow(clippy::unused_self)] use crate::ffi::example_automatic as ffi;
use crate::Error;
pub struct Example {}
impl Example {
#[inline]
pub fn is_ready(&self, name: &str, max: u32) -> Result<ffi::IsReady, Error> {
ffi::is_ready(name, max, ffi::State::SomeStateX).map_err(Error::from)
}
#[inline]
pub fn ret_byte_vector() -> Result<Vec<u8>, Error> {
ffi::ret_byte_vector().map_err(Error::from)
}
#[inline]
pub fn ret_string() -> Result<String, Error> {
ffi::ret_string().map_err(Error::from)
}
#[inline]
pub fn works(&self) -> Result<(), Error> {
ffi::works().map_err(Error::from)
}
#[inline]
pub fn infallible_number(x: u32) -> u32 {
ffi::infallible_number(x)
}
}