mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-07 12:13:20 +00:00
craft-print: document spooler_list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a20c900ce0
commit
81c2488a09
@@ -53,6 +53,9 @@ pub(crate) fn printer_queues() -> Vec<Printer> {
|
||||
spooler_list(|_| None)
|
||||
}
|
||||
|
||||
/// The spooler's queues (`EnumPrinters`, local queues and connections) with the default marked,
|
||||
/// each given the two-sided support `two_sided` reports for it; empty when the spooler can't list
|
||||
/// them.
|
||||
fn spooler_list(two_sided: impl Fn(&PrinterDevice) -> Option<bool>) -> Vec<Printer> {
|
||||
match PrinterDevice::all() {
|
||||
Ok(devices) => crate::printer_list(devices.iter().map(|d| (d.name().to_string(), two_sided(d))), default_printer().as_deref()),
|
||||
|
||||
Reference in New Issue
Block a user