Types for Z39.50 ASN.1 Messages and Bib1 Attribute Set Values
- Reference: ASN.1 Messages Types
- Reference: Bib1 Attribute Set
Parsing a Stream of Bytes
use *;
// Bytes from a sample InitializeRequest from YAZ client.
// https://software.indexdata.com/yaz/doc/yaz-client.html
let bytes = ;
let msg = from_bytes
.expect
.expect;
let InitializeRequest = msg.payload else ;
assert_eq!;
assert_eq!;
Manual Message Building
use *;
use oid;
use *;
let oc = from;
let mut external = new;
external.direct_reference = Some;
let mut npr = new;
npr.name = Some;
let records = ResponseRecords;
let mut pr = default;
pr.records = Some;
pr.number_of_records_returned = 1;
pr.present_status = Success;
let msg = from_payload;
println!;
Currently Supported Message Types
The driver for this crate is a minimum viable Z30.50 server in Rust. It's unclear if additional messages types will be added. Patches are certainly welcome.
- InitializeRequest
- InitializeResponse
- SearchRequest
- SearchResponse
- PresentRequest
- PresentResponse
- Close