Crate ipp [−] [src]
IPP protocol implementation for Rust
Usage examples:
// using raw API let mut req = IppRequest::new(GET_PRINTER_ATTRIBUTES); let client = IppClient::new("http://localhost:631/printers/test-printer"); let resp = client.send_request(&mut req).unwrap(); if resp.header().status <= 3 { println!("result: {:?}", resp.attributes()); } // using operation API let mut operation = GetPrinterAttributes::new(); let client = IppClient::new("http://localhost:631/printers/test-printer"); let attrs = client.send(&mut operation).unwrap(); for (_, v) in attrs.get_group(PRINTER_ATTRIBUTES_TAG).unwrap() { println!("{}: {}", v.name(), v.value()); }
Reexports
pub use attribute::IppAttribute; |
pub use attribute::IppAttributeList; |
pub use client::IppClient; |
pub use operation::IppOperation; |
pub use operation::PrintJob; |
pub use operation::GetPrinterAttributes; |
pub use operation::CreateJob; |
pub use operation::SendDocument; |
pub use request::IppRequest; |
pub use response::IppResponse; |
pub use value::IppValue; |
Modules
attribute |
Attribute-related structs |
client |
IPP client |
consts |
This module holds IPP constants such as attribute names, operations and tags |
operation |
High-level IPP operation abstractions |
parser |
IPP stream parser |
request |
IPP request |
response |
IPP response |
value |
IPP value |
Structs
IppHeader |
IPP request and response header |
Enums
IppError |
IPP value |
Constants
IPP_VERSION |
Traits
ReadIppExt |
Trait which adds two methods to Read implementations: |
Type Definitions
Result |