Crates.io | product-os-print-server |
lib.rs | product-os-print-server |
version | 0.0.1 |
source | src |
created_at | 2023-11-15 23:36:37.035858 |
updated_at | 2023-11-15 23:36:37.035858 |
description | Product OS : Print Server provides a full working IPP Print Server operating on version 1.1 of the IPP Protocol. |
homepage | |
repository | |
max_upload_size | |
id | 1037047 |
size | 120,040 |
Product OS : Print Server provides a full working IPP Print Server operating on version 1.1 of the IPP Protocol.
Product OS is a collection of packages that provide different tools and features that can work together to build products more easily for the Rust ecosystem.
Use the Rust crate package manager cargo to install Product OS : Print Server.
cargo add product-os-print-server
or add Product OS : Print Server to your cargo.toml [packages]
section.
product-os-print-server = { version = "0.0.1", features = [], default-features = true, optional = false }
Product OS Print Server supports a number of features leveraging existing Rust libraries to help connect APIs together using only configuration:
To make the most of Print Server, you should use the Product OS : Server crate.
// Feature samples TODO
use std::str::FromStr;
use std::sync::Arc;
use parking_lot::Mutex;
pub fn main() {
let config = product_os_configuration::Configuration::from_file("./config.json");
let mut server = product_os_server::ProductOSServer::new_with_config_sync(config.clone());
let printer = Arc::new(Mutex::new(product_os_print_server::ProductOSIPPServer::new(String::from("test-ipp-printer-jd"), String::from("ipp://127.0.0.1:8443/"), 8443, false, Arc::new(print_processor::PrintProcessor::new()))));
server.add_feature_service_mut_sync(printer.clone(), None);
match server.start_sync() {
Err(e) => println!("Error occurred: {}", e),
Ok(r) => println!("Server Started: {:?}", r)
};
}
Contributions are not currently available but will be available on a public repository soon.