Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

238 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipp.rs

IPP protocol implementation for Rust

Documentation

This crate implements IPP protocol as defined in RFC 2911. Not all features are implemented yet.
Transport is based on asynchronous HTTP client from the reqwest crate.

Usage example:

use ipp::{
    client::IppClientBuilder,
    proto::{ipp::DelimiterTag, IppOperationBuilder},
};
use tokio::runtime::Runtime;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut runtime = Runtime::new()?;

    let operation = IppOperationBuilder::get_printer_attributes().build();
    let client = IppClientBuilder::new("http://localhost:631/printers/test-printer").build();
    let attrs = runtime.block_on(client.send(operation))?;

    for (_, v) in attrs.groups_of(DelimiterTag::PrinterAttributes)[0].attributes() {
        println!("{}: {}", v.name(), v.value());
    }
    Ok(())
}

License

Licensed under MIT or Apache license (LICENSE-MIT or LICENSE-APACHE)

About

IPP protocol implementation for Rust

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages