mqi 0.3.0

Idiomatic IBM® MQ Interface (MQI) and MQ Administration Interface (MQAI) APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg(feature = "dlopen2")]

use std::{error::Error, rc::Rc};

use ::dlopen2::wrapper::Container;
use libmqm_sys::dlopen2::LoadMqmExt;
use mqi::{MqFunctions, mqstr};

#[test]
fn dlopen() -> Result<(), Box<dyn Error>> {
    let lib = Rc::new(unsafe { Container::load_mqm_default()? });
    let fns = MqFunctions(lib);
    let connect_result = fns.mqconn(&mqstr!("NONEXIST"));
    assert!(connect_result.is_err());

    Ok(())
}