open-protocol-client 0.0.0

Library for implementing Atlas Copco/Torque Open Protocol clients.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::io;
use thiserror;
use open_protocol::{decode, encode};

pub mod client;
pub mod network;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("IO Error")]
    IoError(#[from] io::Error),
    #[error("Error decoding Open Protocol message")]
    DecodeError(#[from] decode::Error),
    #[error("Error encoding Open Protocol message")]
    EncodeError(#[from] encode::Error),
}

pub type Result<T> = std::result::Result<T, Error>;