A better Rust ATProto crate

binaries plus a bit of example cleanup

Orual faa66a83 d1e7e9e1

+6 -6
binaries/SHA256SUMS
··· 1 - 6e690739ec8d6349bd584ef743bdf34bbf61b531dbfc4922ba3db276fcb5f973 jacquard-codegen_aarch64-unknown-linux-gnu.tar.xz 2 - 8edd99321d52e85da26e31a551ee0476d7bc6653dfce2aaa41191119f41cba80 jacquard-codegen_x86_64-unknown-linux-gnu.tar.xz 3 - 831cd4cb95e6f944145907fc480625dc19044ee21a2cb794f4a387520a580c00 lex-fetch_aarch64-unknown-linux-gnu.tar.xz 4 - 4b6495f0cb60396f348a2afb24fed7bf5081f6f41970de0aa080ceb27960ebb7 lex-fetch_x86_64-unknown-linux-gnu.tar.xz 5 - 76d102081c02b9a33ea84433fea80665ff58e2297257ccb1a4ef235cfdf877ab jacquard-codegen_x86_64-pc-windows-gnu.zip 6 - 4405fd615292bfe8c28d9592fa451e0adeeada66573d020fde652b0d69877445 lex-fetch_x86_64-pc-windows-gnu.zip 1 + 1cca585492c14f4fbf2b913bb00023523a95aa0736696b5328e72c090fc7d356 jacquard-codegen_aarch64-unknown-linux-gnu.tar.xz 2 + a55847e84237c5775ab17f2079ce263efc3670d2ad15fb5b660dde40051ef8d6 jacquard-codegen_x86_64-unknown-linux-gnu.tar.xz 3 + e232a64747a107286311de80e4d868ad51c1515f9bc45a13cd71f4494a0e0fd4 lex-fetch_aarch64-unknown-linux-gnu.tar.xz 4 + f52f5e5cc78ef95747e26ba3583f36ad2d05ba040382593b9d4d85544b1d2789 lex-fetch_x86_64-unknown-linux-gnu.tar.xz 5 + cc9c53669e2d5532589d83bca168182eab049675ac5f0e59612add18e9e587b2 jacquard-codegen_x86_64-pc-windows-gnu.zip 6 + de3b47c2f0c76543d96cebf4bac6d5468a06cac79a5997473fdbfc92a559c2c3 lex-fetch_x86_64-pc-windows-gnu.zip
binaries/jacquard-codegen_aarch64-unknown-linux-gnu.tar.xz

This is a binary file and will not be displayed.

binaries/jacquard-codegen_x86_64-pc-windows-gnu.zip

This is a binary file and will not be displayed.

binaries/jacquard-codegen_x86_64-unknown-linux-gnu.tar.xz

This is a binary file and will not be displayed.

binaries/lex-fetch_aarch64-unknown-linux-gnu.tar.xz

This is a binary file and will not be displayed.

binaries/lex-fetch_x86_64-pc-windows-gnu.zip

This is a binary file and will not be displayed.

binaries/lex-fetch_x86_64-unknown-linux-gnu.tar.xz

This is a binary file and will not be displayed.

+4 -4
examples/moderated_timeline.rs
··· 6 6 use jacquard::client::{Agent, FileAuthStore}; 7 7 use jacquard::cowstr::ToCowStr; 8 8 use jacquard::from_data; 9 - use jacquard::moderation::{Moderateable, ModerationPrefs, fetch_labeler_defs}; 9 + use jacquard::moderation::{Blur, Moderateable, ModerationPrefs, fetch_labeler_defs}; 10 10 use jacquard::oauth::atproto::AtprotoClientMetadata; 11 11 use jacquard::oauth::client::OAuthClient; 12 12 use jacquard::oauth::loopback::LoopbackConfig; 13 13 use jacquard::xrpc::{CallOptions, XrpcClient}; 14 14 use jacquard_api::app_bsky::feed::{ReplyRefParent, ReplyRefRoot}; 15 + use jacquard_api::app_bsky::labeler::get_services::GetServicesOutputViewsItem; 15 16 16 17 // To save having to fetch prefs, etc., we're borrowing some from our test cases. 17 18 const LABELER_SERVICES_JSON: &str = ··· 45 46 serde_json::from_str(LABELER_SERVICES_JSON).expect("failed to parse labeler services"); 46 47 47 48 let mut accepted_labelers = Vec::new(); 48 - use jacquard::api::app_bsky::labeler::get_services::GetServicesOutputViewsItem; 49 49 50 50 for view in services.views { 51 51 if let GetServicesOutputViewsItem::LabelerViewDetailed(detailed) = view { ··· 115 115 filtered += 1; 116 116 } else if decisions 117 117 .iter() 118 - .any(|(_, d)| d.blur != jacquard::moderation::Blur::None || d.alert) 118 + .any(|(_, d)| d.blur != Blur::None || d.alert) 119 119 { 120 120 warned += 1; 121 121 } else { ··· 162 162 ); 163 163 if decision.filter { 164 164 println!(" → Would be hidden"); 165 - } else if decision.blur != jacquard::moderation::Blur::None { 165 + } else if decision.blur != Blur::None { 166 166 println!(" → Would be blurred ({:?})", decision.blur); 167 167 } 168 168 if decision.alert {