rstango 0.1.0

Implementation of the Tango distributed control system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Conversion utilities for ZMQ binding.

use rzmq::ZmqError;

use crate::error::{Error, ErrorKind, reason};


impl From<ZmqError> for Error {
    #[track_caller]
    fn from(value: ZmqError) -> Self {
        Error::new(ErrorKind::Reason(reason::API_ZmqFailed))
            .with_description(format!("{value}"))
            .with_source(Box::new(value))
    }
}