transmission-client-0.1.6/.cargo_vcs_info.json0000644000000001360000000000100150450ustar { "git": { "sha1": "bc08132305348cd458eb26bf941a6cdc04b7bec5" }, "path_in_vcs": "" }transmission-client-0.1.6/.gitignore000064400000000000000000000000271046102023000156240ustar 00000000000000/target Cargo.lock wip transmission-client-0.1.6/Cargo.lock0000644000001377550000000000100130420ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "addr2line" version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] name = "adler2" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "android-tzdata" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", ] [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" version = "1.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" dependencies = [ "shlex", ] [[package]] name = "cfg-if" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "chrono" version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", "windows-link", ] [[package]] name = "core-foundation" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "darling" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ "darling_core", "darling_macro", ] [[package]] name = "darling_core" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", "syn", ] [[package]] name = "darling_macro" version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", "syn", ] [[package]] name = "deranged" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", ] [[package]] name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "dyn-clone" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" [[package]] name = "encoding_rs" version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "equivalent" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", "windows-sys 0.60.2", ] [[package]] name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-sink" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-task", "pin-project-lite", "pin-utils", ] [[package]] name = "getrandom" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] name = "getrandom" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", ] [[package]] name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "h2" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17da50a276f1e01e0ba6c029e47b7100754904ee8a278f886546e98575380785" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", "http", "indexmap 2.10.0", "slab", "tokio", "tokio-util", "tracing", ] [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "http" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", "itoa", ] [[package]] name = "http-body" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", ] [[package]] name = "http-body-util" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", "http", "http-body", "pin-project-lite", ] [[package]] name = "httparse" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", "futures-util", "h2", "http", "http-body", "httparse", "itoa", "pin-project-lite", "smallvec", "tokio", "want", ] [[package]] name = "hyper-rustls" version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http", "hyper", "hyper-util", "rustls", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", ] [[package]] name = "hyper-tls" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", "hyper", "hyper-util", "native-tls", "tokio", "tokio-native-tls", "tower-service", ] [[package]] name = "hyper-util" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64", "bytes", "futures-channel", "futures-core", "futures-util", "http", "http-body", "hyper", "ipnet", "libc", "percent-encoding", "pin-project-lite", "socket2", "system-configuration", "tokio", "tower-service", "tracing", "windows-registry", ] [[package]] name = "iana-time-zone" version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "log", "wasm-bindgen", "windows-core", ] [[package]] name = "iana-time-zone-haiku" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ "cc", ] [[package]] name = "icu_collections" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_locale_core" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", "tinystr", "writeable", "zerovec", ] [[package]] name = "icu_normalizer" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", "zerovec", ] [[package]] name = "icu_normalizer_data" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", "zerotrie", "zerovec", ] [[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ "idna_adapter", "smallvec", "utf8_iter", ] [[package]] name = "idna_adapter" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", ] [[package]] name = "indexmap" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", "serde", ] [[package]] name = "indexmap" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", "hashbrown 0.15.4", "serde", ] [[package]] name = "io-uring" version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ "bitflags", "cfg-if", "libc", ] [[package]] name = "ipnet" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" dependencies = [ "memchr", "serde", ] [[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", ] [[package]] name = "libc" version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "linux-raw-sys" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "memchr" version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "mio" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] [[package]] name = "native-tls" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", "openssl", "openssl-probe", "openssl-sys", "schannel", "security-framework", "security-framework-sys", "tempfile", ] [[package]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-traits" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ "bitflags", "cfg-if", "foreign-types", "libc", "once_cell", "openssl-macros", "openssl-sys", ] [[package]] name = "openssl-macros" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "openssl-probe" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", "pkg-config", "vcpkg", ] [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "potential_utf" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" dependencies = [ "zerovec", ] [[package]] name = "powerfmt" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "proc-macro2" version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "ref-cast" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "reqwest" version = "0.12.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" dependencies = [ "base64", "bytes", "encoding_rs", "futures-core", "h2", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", "hyper-tls", "hyper-util", "js-sys", "log", "mime", "native-tls", "percent-encoding", "pin-project-lite", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", "tokio-native-tls", "tower", "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", ] [[package]] name = "ring" version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", ] [[package]] name = "rustc-demangle" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustix" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.60.2", ] [[package]] name = "rustls" version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "once_cell", "rustls-pki-types", "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-pki-types" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "ring", "rustls-pki-types", "untrusted", ] [[package]] name = "rustversion" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "ryu" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "schannel" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] [[package]] name = "schemars" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" dependencies = [ "dyn-clone", "ref-cast", "serde", "serde_json", ] [[package]] name = "schemars" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" dependencies = [ "dyn-clone", "ref-cast", "serde", "serde_json", ] [[package]] name = "security-framework" version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags", "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", ] [[package]] name = "security-framework-sys" version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "serde" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", "ryu", "serde", ] [[package]] name = "serde_path_to_error" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" dependencies = [ "itoa", "serde", ] [[package]] name = "serde_urlencoded" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", "itoa", "ryu", "serde", ] [[package]] name = "serde_with" version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", "indexmap 2.10.0", "schemars 0.9.0", "schemars 1.0.4", "serde", "serde_derive", "serde_json", "serde_with_macros", "time", ] [[package]] name = "serde_with_macros" version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f" dependencies = [ "darling", "proc-macro2", "quote", "syn", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "slab" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ "libc", "windows-sys 0.59.0", ] [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] [[package]] name = "synstructure" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "system-configuration" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", ] [[package]] name = "tempfile" version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", "rustix", "windows-sys 0.59.0", ] [[package]] name = "thiserror" version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "time" version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", "serde", "time-core", "time-macros", ] [[package]] name = "time-core" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", ] [[package]] name = "tinystr" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", ] [[package]] name = "tokio" version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", "io-uring", "libc", "mio", "pin-project-lite", "slab", "socket2", "windows-sys 0.59.0", ] [[package]] name = "tokio-native-tls" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", ] [[package]] name = "tokio-rustls" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ "rustls", "tokio", ] [[package]] name = "tokio-util" version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", ] [[package]] name = "tower" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", "sync_wrapper", "tokio", "tower-layer", "tower-service", ] [[package]] name = "tower-http" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", ] [[package]] name = "tower-layer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] [[package]] name = "transmission-client" version = "0.1.6" dependencies = [ "log", "reqwest", "serde", "serde_derive", "serde_json", "serde_path_to_error", "serde_with", "thiserror", "url", ] [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicode-ident" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", ] [[package]] name = "utf8_iter" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "want" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ "try-lock", ] [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] [[package]] name = "wasm-bindgen" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] name = "windows-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", "windows-link", "windows-result", "windows-strings", ] [[package]] name = "windows-implement" version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "windows-interface" version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "windows-link" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-registry" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ "windows-link", "windows-result", "windows-strings", ] [[package]] name = "windows-result" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ "windows-targets 0.53.3", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows-targets" version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", "windows_i686_gnullvm 0.53.0", "windows_i686_msvc 0.53.0", "windows_x86_64_gnu 0.53.0", "windows_x86_64_gnullvm 0.53.0", "windows_x86_64_msvc 0.53.0", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ "bitflags", ] [[package]] name = "writeable" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "yoke" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", "yoke-derive", "zerofrom", ] [[package]] name = "yoke-derive" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerofrom" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zerotrie" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" dependencies = [ "displaydoc", "yoke", "zerofrom", ] [[package]] name = "zerovec" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", "zerovec-derive", ] [[package]] name = "zerovec-derive" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", "syn", ] transmission-client-0.1.6/Cargo.toml0000644000000030440000000000100130440ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2024" name = "transmission-client" version = "0.1.6" authors = ["Felix Häcker "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Rust wrapper for Transmission rpc specs" homepage = "https://gitlab.gnome.org/haecker-felix/transmission-client" documentation = "https://docs.rs/transmission-client" readme = "README.md" keywords = [ "transmission", "torrent", "bittorrent", "rpc", "download", ] categories = ["api-bindings"] license = "MIT" repository = "https://gitlab.gnome.org/haecker-felix/transmission-client" [lib] name = "transmission_client" path = "src/lib.rs" [dependencies.log] version = "0.4" [dependencies.reqwest] version = "0.12" [dependencies.serde] version = "1.0" [dependencies.serde_derive] version = "1.0" [dependencies.serde_json] version = "1.0" [dependencies.serde_path_to_error] version = "0.1" [dependencies.serde_with] version = "3.14" [dependencies.thiserror] version = "2.0" [dependencies.url] version = "2.5" features = ["serde"] transmission-client-0.1.6/Cargo.toml.orig000064400000000000000000000013221046102023000165220ustar 00000000000000[package] name = "transmission-client" version = "0.1.6" authors = [ "Felix Häcker " ] edition = "2024" description = "Rust wrapper for Transmission rpc specs" keywords = [ "transmission", "torrent", "bittorrent", "rpc", "download" ] categories = [ "api-bindings" ] license = "MIT" documentation = "https://docs.rs/transmission-client" homepage = "https://gitlab.gnome.org/haecker-felix/transmission-client" repository = "https://gitlab.gnome.org/haecker-felix/transmission-client" [dependencies] log = "0.4" reqwest = "0.12" serde = "1.0" serde_derive = "1.0" serde_json = "1.0" serde_path_to_error = "0.1" serde_with = "3.14" thiserror = "2.0" url = { version = "2.5", features = [ "serde" ] } transmission-client-0.1.6/README.md000064400000000000000000000016201046102023000151130ustar 00000000000000# transmission-client Rust wrapper for [Transmission rpc specs](https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md). This crate is primarily used by [transmission-gobject](https://crates.io/crates/transmission-gobject) and the GNOME app [Fragments](https://apps.gnome.org/Fragments/). ### Implemented method names #### Torrent - [x] torrent-start - [x] torrent-start-now - [x] torrent-stop - [x] torrent-verify - [x] torrent-reannounce - [x] torrent-set - [x] torrent-get - [x] torrent-add - [x] torrent-remove - [x] torrent-set-location - [ ] torrent-rename-path #### Queue - [x] queue-move-top - [x] queue-move-up - [x] queue-move-down - [x] queue-move-bottom #### Session - [x] session-get - [x] session-set - [x] session-stats - [ ] session-close #### Miscellaneous stuff - [ ] blocklist-update - [x] port-test - [x] session-close - [ ] free-space - [ ] group-set - [ ] group-get transmission-client-0.1.6/src/authentication.rs000064400000000000000000000001431046102023000200070ustar 00000000000000#[derive(Debug)] pub struct Authentication { pub username: String, pub password: String, } transmission-client-0.1.6/src/client.rs000064400000000000000000000302511046102023000162510ustar 00000000000000use std::cell::RefCell; use std::rc::Rc; use std::time::Duration; use reqwest::header::{self, HeaderMap}; use reqwest::{RequestBuilder, StatusCode}; use serde::de::DeserializeOwned; use url::Url; use crate::error::ClientError; use crate::rpc::{ RequestArgs, RpcRequest, RpcResponse, RpcResponseArguments, SessionSetArgs, TorrentActionArgs, TorrentAddArgs, TorrentGetArgs, TorrentRemoveArgs, TorrentSetArgs, TorrentSetLocationArgs, }; use crate::{ Authentication, PortTest, Session, SessionMutator, SessionStats, Torrent, TorrentAdded, TorrentFiles, TorrentFilesList, TorrentList, TorrentMutator, TorrentPeers, TorrentPeersList, TorrentTrackers, TorrentTrackersList, utils, }; #[derive(Debug, Clone)] pub struct Client { address: Url, authentication: Rc>>, http_client: reqwest::Client, session_id: Rc>, } impl Client { pub fn new(address: Url) -> Self { Client { address, ..Default::default() } } pub fn set_authentication(&self, auth: Option) { *self.authentication.borrow_mut() = auth; } pub async fn torrents(&self, ids: Option>) -> Result, ClientError> { let args = TorrentGetArgs { fields: utils::torrent_fields(), ids, }; let request_args = Some(RequestArgs::TorrentGet(args)); let response: RpcResponse = self.send_request("torrent-get", request_args).await?; Ok(response.arguments.unwrap().torrents) } pub async fn torrents_files( &self, ids: Option>, ) -> Result, ClientError> { let args = TorrentGetArgs { fields: utils::torrent_files_fields(), ids, }; let request_args = Some(RequestArgs::TorrentGet(args)); let response: RpcResponse = self.send_request("torrent-get", request_args).await?; Ok(response.arguments.unwrap().torrents) } pub async fn torrents_peers( &self, ids: Option>, ) -> Result, ClientError> { let args = TorrentGetArgs { fields: utils::torrent_peers_fields(), ids, }; let request_args = Some(RequestArgs::TorrentGet(args)); let response: RpcResponse = self.send_request("torrent-get", request_args).await?; Ok(response.arguments.unwrap().torrents) } pub async fn torrents_trackers( &self, ids: Option>, ) -> Result, ClientError> { let args = TorrentGetArgs { fields: utils::torrent_trackers_fields(), ids, }; let request_args = Some(RequestArgs::TorrentGet(args)); let response: RpcResponse = self.send_request("torrent-get", request_args).await?; Ok(response.arguments.unwrap().torrents) } pub async fn torrent_set( &self, ids: Option>, mutator: TorrentMutator, ) -> Result<(), ClientError> { let args = TorrentSetArgs { ids, mutator }; let request_args = Some(RequestArgs::TorrentSet(args)); let _: RpcResponse = self.send_request("torrent-set", request_args).await?; Ok(()) } pub async fn torrent_add_filename( &self, filename: &str, ) -> Result, ClientError> { let args = TorrentAddArgs { filename: Some(filename.into()), ..Default::default() }; let request_args = Some(RequestArgs::TorrentAdd(args)); self.torrent_add(request_args).await } pub async fn torrent_add_metainfo( &self, metainfo: &str, ) -> Result, ClientError> { let args = TorrentAddArgs { metainfo: Some(metainfo.into()), ..Default::default() }; let request_args = Some(RequestArgs::TorrentAdd(args)); self.torrent_add(request_args).await } async fn torrent_add( &self, request_args: Option, ) -> Result, ClientError> { let response: RpcResponse = self.send_request("torrent-add", request_args).await?; let result_args = response.arguments.unwrap(); if result_args.torrent_added.is_some() { Ok(result_args.torrent_added) } else { Ok(result_args.torrent_duplicate) } } pub async fn torrent_remove( &self, ids: Option>, delete_local_data: bool, ) -> Result<(), ClientError> { let args = TorrentRemoveArgs { ids, delete_local_data, }; let request_args = Some(RequestArgs::TorrentRemove(args)); let _: RpcResponse = self.send_request("torrent-remove", request_args).await?; Ok(()) } pub async fn torrent_start( &self, ids: Option>, bypass_queue: bool, ) -> Result<(), ClientError> { let args = TorrentActionArgs { ids }; let request_args = Some(RequestArgs::TorrentAction(args)); let method_name = if bypass_queue { "torrent-start-now" } else { "torrent-start" }; let _: RpcResponse = self.send_request(method_name, request_args).await?; Ok(()) } pub async fn torrent_stop(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("torrent-stop", ids).await?; Ok(()) } pub async fn torrent_verify(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("torrent-verify", ids).await?; Ok(()) } pub async fn torrent_reannounce(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("torrent-reannounce", ids).await?; Ok(()) } pub async fn torrent_set_location( &self, ids: Option>, location: String, move_data: bool, ) -> Result<(), ClientError> { let args = TorrentSetLocationArgs { ids, location, move_data, }; let request_args = Some(RequestArgs::TorrentSetLocation(args)); let _: RpcResponse = self .send_request("torrent-set-location", request_args) .await?; Ok(()) } pub async fn queue_move_top(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("queue-move-top", ids).await?; Ok(()) } pub async fn queue_move_up(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("queue-move-up", ids).await?; Ok(()) } pub async fn queue_move_down(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("queue-move-down", ids).await?; Ok(()) } pub async fn queue_move_bottom(&self, ids: Option>) -> Result<(), ClientError> { self.send_torrent_action("queue-move-bottom", ids).await?; Ok(()) } pub async fn session(&self) -> Result { let response: RpcResponse = self.send_request("session-get", None).await?; Ok(response.arguments.unwrap()) } pub async fn session_set(&self, mutator: SessionMutator) -> Result<(), ClientError> { let args = SessionSetArgs { mutator }; let request_args = Some(RequestArgs::SessionSet(args)); let _: RpcResponse = self.send_request("session-set", request_args).await?; Ok(()) } pub async fn session_stats(&self) -> Result { let response: RpcResponse = self.send_request("session-stats", None).await?; Ok(response.arguments.unwrap()) } pub async fn session_close(&self) -> Result<(), ClientError> { let _: RpcResponse = self.send_request("session-close", None).await?; Ok(()) } pub async fn port_test(&self) -> Result { let response: RpcResponse = self.send_request("port-test", None).await?; Ok(response.arguments.unwrap().port_is_open) } async fn send_torrent_action( &self, action: &str, ids: Option>, ) -> Result<(), ClientError> { let args = TorrentActionArgs { ids }; let request_args = Some(RequestArgs::TorrentAction(args)); let _: RpcResponse = self.send_request(action, request_args).await?; Ok(()) } async fn send_request( &self, method: &str, arguments: Option, ) -> Result, ClientError> { let request = RpcRequest { method: method.into(), arguments, }; let body = serde_json::to_string(&request)?; let post_result = self.send_post(body).await?; let de = &mut serde_json::Deserializer::from_str(&post_result); let serde_result: Result, _> = serde_path_to_error::deserialize(de); match serde_result { Ok(response) => { if response.result != "success" { return Err(ClientError::TransmissionError(response.result)); } Ok(response) } Err(err) => { let path = err.path().to_string(); error!("Unable to parse json: {path} ({err})"); warn!("Path: {path}"); warn!("JSON: {post_result}"); Err(err.into_inner().into()) } } } async fn send_post(&self, body: String) -> Result { let request = self.http_request(body.clone())?; let mut response = request.send().await?; // Update session id let headers = response.headers(); if let Some(session_id) = headers.get("X-Transmission-Session-Id") { let session_id = session_id.to_str().unwrap().to_string(); *self.session_id.borrow_mut() = session_id; } // Check html status code match response.status() { // Invalid session id header, resend the request StatusCode::CONFLICT => { debug!("Received status code 409, resend request."); let request = self.http_request(body.clone())?; response = request.send().await?; } // Authentication needed StatusCode::UNAUTHORIZED => { return Err(ClientError::TransmissionUnauthorized); } _ => (), } Ok(response.text().await.unwrap()) } fn http_request(&self, body: String) -> Result { let session_id = self.session_id.borrow().clone(); let request = if let Some(auth) = &*self.authentication.borrow() { self.http_client .post(self.address.clone()) .header("X-Transmission-Session-Id", session_id) .basic_auth(&auth.username, Some(&auth.password)) .body(body) } else { self.http_client .post(self.address.clone()) .header("X-Transmission-Session-Id", session_id) .body(body) }; Ok(request) } } impl Default for Client { fn default() -> Self { let address = Url::parse("http://127.0.0.1:9091/transmission/rpc/").unwrap(); let mut headers = HeaderMap::new(); headers.insert( "content-type", header::HeaderValue::from_static("application/json"), ); let http_client = reqwest::ClientBuilder::new() .default_headers(headers) .timeout(Duration::from_secs(15)) .build() .unwrap(); let session_id = Rc::new(RefCell::new("0".into())); Self { address, authentication: Rc::default(), http_client, session_id, } } } transmission-client-0.1.6/src/error.rs000064400000000000000000000005571046102023000161320ustar 00000000000000use thiserror::Error; #[derive(Error, Debug)] pub enum ClientError { #[error("transmission authentication needed")] TransmissionUnauthorized, #[error("transmission error")] TransmissionError(String), #[error("reqwest error")] NetworkError(#[from] reqwest::Error), #[error("serde_json error")] SerdeError(#[from] serde_json::Error), } transmission-client-0.1.6/src/lib.rs000064400000000000000000000011711046102023000155400ustar 00000000000000#[macro_use] extern crate log; #[macro_use] extern crate serde_derive; mod authentication; mod client; mod error; mod port_test; mod rpc; mod session; mod session_stats; mod torrent; mod utils; pub use authentication::Authentication; pub use client::Client; pub use error::ClientError; use port_test::PortTest; pub use session::{Encryption, Session, SessionMutator}; pub use session_stats::{SessionStats, StatsDetails}; pub use torrent::{ File, FileStat, Torrent, TorrentFiles, TorrentMutator, TorrentPeers, TorrentTrackers, }; use torrent::{TorrentAdded, TorrentFilesList, TorrentList, TorrentPeersList, TorrentTrackersList}; transmission-client-0.1.6/src/port_test.rs000064400000000000000000000003231046102023000170130ustar 00000000000000use crate::rpc::RpcResponseArguments; #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] pub struct PortTest { pub port_is_open: bool, } impl RpcResponseArguments for PortTest {} transmission-client-0.1.6/src/rpc/mod.rs000064400000000000000000000004101046102023000163300ustar 00000000000000mod request; mod response; pub use request::{ RequestArgs, RpcRequest, SessionSetArgs, TorrentActionArgs, TorrentAddArgs, TorrentGetArgs, TorrentRemoveArgs, TorrentSetArgs, TorrentSetLocationArgs, }; pub use response::{RpcResponse, RpcResponseArguments}; transmission-client-0.1.6/src/rpc/request.rs000064400000000000000000000057741046102023000172630ustar 00000000000000use crate::{SessionMutator, TorrentMutator}; #[derive(Debug, Serialize, Default)] pub struct RpcRequest { pub method: String, pub arguments: Option, } #[derive(Serialize, Debug, Clone)] #[serde(untagged)] pub enum RequestArgs { TorrentGet(TorrentGetArgs), TorrentSet(TorrentSetArgs), TorrentAdd(TorrentAddArgs), TorrentRemove(TorrentRemoveArgs), TorrentAction(TorrentActionArgs), TorrentSetLocation(TorrentSetLocationArgs), SessionSet(SessionSetArgs), } #[derive(Serialize, Debug, Clone, Default)] pub struct TorrentGetArgs { pub fields: Vec, #[serde(skip_serializing_if = "Option::is_none")] pub ids: Option>, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "kebab-case")] pub struct TorrentAddArgs { #[serde(skip_serializing_if = "Option::is_none")] pub cookies: Option, #[serde(skip_serializing_if = "Option::is_none")] pub download_dir: Option, #[serde(skip_serializing_if = "Option::is_none")] pub filename: Option, #[serde(skip_serializing_if = "Option::is_none")] pub metainfo: Option, #[serde(skip_serializing_if = "Option::is_none")] pub paused: Option, #[serde(skip_serializing_if = "Option::is_none")] pub peer_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "bandwidthPriority")] pub bandwidth_priority: Option, #[serde(skip_serializing_if = "Option::is_none")] pub files_wanted: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub files_unwanted: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub priority_high: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub priority_low: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub priority_normal: Option>, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "camelCase")] pub struct TorrentSetArgs { #[serde(skip_serializing_if = "Option::is_none")] pub ids: Option>, #[serde(flatten)] pub mutator: TorrentMutator, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "kebab-case")] pub struct TorrentRemoveArgs { pub delete_local_data: bool, #[serde(skip_serializing_if = "Option::is_none")] pub ids: Option>, } #[derive(Serialize, Debug, Clone, Default)] pub struct TorrentActionArgs { #[serde(skip_serializing_if = "Option::is_none")] pub ids: Option>, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "kebab-case")] pub struct TorrentSetLocationArgs { #[serde(rename = "move")] pub move_data: bool, pub location: String, #[serde(skip_serializing_if = "Option::is_none")] pub ids: Option>, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "kebab-case")] pub struct SessionSetArgs { #[serde(flatten)] pub mutator: SessionMutator, } transmission-client-0.1.6/src/rpc/response.rs000064400000000000000000000017161046102023000174210ustar 00000000000000use serde::de::{DeserializeOwned, Error}; use serde::{Deserialize, Deserializer}; use serde_json::Value; #[derive(Debug, Deserialize, Default)] pub struct RpcResponse { pub result: String, #[serde(deserialize_with = "ok_or_none")] pub arguments: Option, } pub trait RpcResponseArguments {} impl RpcResponseArguments for String {} /// When the rpc response `arguments` field is empty, replace it with `None` /// instead of returning an error fn ok_or_none<'de, D, T>(deserializer: D) -> Result, D::Error> where D: Deserializer<'de>, T: Deserialize<'de>, { let v = Value::deserialize(deserializer)?; match v { Value::Object(ref obj) => { if obj.is_empty() { Ok(None) } else { T::deserialize(v).map(Some).map_err(Error::custom) } } _ => T::deserialize(v).map(Some).map_err(Error::custom), } } transmission-client-0.1.6/src/session.rs000064400000000000000000000154431046102023000164640ustar 00000000000000use std::path::PathBuf; use serde_with::{DefaultOnError, serde_as}; use url::Url; use crate::rpc::RpcResponseArguments; #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "kebab-case")] pub enum Encryption { Required, Preferred, Tolerated, } impl Default for Encryption { fn default() -> Self { Self::Preferred } } #[serde_as] #[derive(Deserialize, Serialize, Debug)] #[serde(rename_all = "kebab-case")] pub struct Session { pub alt_speed_down: i32, pub alt_speed_enabled: bool, pub alt_speed_time_begin: i32, pub alt_speed_time_day: i32, pub alt_speed_time_enabled: bool, pub alt_speed_time_end: i32, pub alt_speed_up: i32, pub blocklist_enabled: bool, pub blocklist_size: i32, #[serde_as(deserialize_as = "DefaultOnError")] #[serde(default)] pub blocklist_url: Option, pub cache_size_mb: i32, pub config_dir: String, pub dht_enabled: bool, pub download_dir: PathBuf, pub download_queue_enabled: bool, pub download_queue_size: i32, pub encryption: Encryption, pub idle_seeding_limit: i32, pub idle_seeding_limit_enabled: bool, pub incomplete_dir: PathBuf, pub incomplete_dir_enabled: bool, pub lpd_enabled: bool, pub peer_limit_global: i32, pub peer_limit_per_torrent: i32, pub peer_port: i32, pub peer_port_random_on_start: bool, pub pex_enabled: bool, pub port_forwarding_enabled: bool, pub queue_stalled_enabled: bool, pub queue_stalled_minutes: i32, pub rename_partial_files: bool, pub rpc_version: i32, pub rpc_version_minimum: i32, #[serde(default)] pub rpc_version_semver: String, #[serde(default)] pub script_torrent_added_enabled: bool, #[serde(default)] pub script_torrent_added_filename: String, pub script_torrent_done_enabled: bool, pub script_torrent_done_filename: String, pub seed_queue_enabled: bool, pub seed_queue_size: i32, #[serde(rename = "seedRatioLimit")] pub seed_ratio_limit: f32, #[serde(rename = "seedRatioLimited")] pub seed_ratio_limited: bool, #[serde(default)] pub session_id: String, pub speed_limit_down: f32, pub speed_limit_down_enabled: bool, pub speed_limit_up: f32, pub speed_limit_up_enabled: bool, pub start_added_torrents: bool, pub trash_original_torrent_files: bool, // TODO: units pub utp_enabled: bool, pub version: String, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "kebab-case")] pub struct SessionMutator { #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_down: Option, #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_time_begin: Option, #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_time_day: Option, #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_time_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_time_end: Option, #[serde(skip_serializing_if = "Option::is_none")] pub alt_speed_up: Option, #[serde(skip_serializing_if = "Option::is_none")] pub blocklist_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub blocklist_url: Option, #[serde(skip_serializing_if = "Option::is_none")] pub cache_size_mb: Option, #[serde(skip_serializing_if = "Option::is_none")] pub dht_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub download_dir: Option, #[serde(skip_serializing_if = "Option::is_none")] pub download_queue_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub download_queue_size: Option, #[serde(skip_serializing_if = "Option::is_none")] pub encryption: Option, #[serde(skip_serializing_if = "Option::is_none")] pub idle_seeding_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub idle_seeding_limit_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub incomplete_dir: Option, #[serde(skip_serializing_if = "Option::is_none")] pub incomplete_dir_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub lpd_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub peer_limit_global: Option, #[serde(skip_serializing_if = "Option::is_none")] pub peer_limit_per_torrent: Option, #[serde(skip_serializing_if = "Option::is_none")] pub peer_port: Option, #[serde(skip_serializing_if = "Option::is_none")] pub peer_port_random_on_start: Option, #[serde(skip_serializing_if = "Option::is_none")] pub pex_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub port_forwarding_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub queue_stalled_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub queue_stalled_minutes: Option, #[serde(skip_serializing_if = "Option::is_none")] pub rename_partial_files: Option, #[serde(skip_serializing_if = "Option::is_none")] pub script_torrent_added_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub script_torrent_added_filename: Option, #[serde(skip_serializing_if = "Option::is_none")] pub script_torrent_done_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub script_torrent_done_filename: Option, #[serde(skip_serializing_if = "Option::is_none")] pub seed_queue_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub seed_queue_size: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "seedRatioLimit")] pub seed_ratio_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "seedRatioLimited")] pub seed_ratio_limited: Option, #[serde(skip_serializing_if = "Option::is_none")] pub speed_limit_down: Option, #[serde(skip_serializing_if = "Option::is_none")] pub speed_limit_down_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub speed_limit_up: Option, #[serde(skip_serializing_if = "Option::is_none")] pub speed_limit_up_enabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub start_added_torrents: Option, #[serde(skip_serializing_if = "Option::is_none")] pub trash_original_torrent_files: Option, #[serde(skip_serializing_if = "Option::is_none")] pub utp_enabled: Option, } impl RpcResponseArguments for Session {} transmission-client-0.1.6/src/session_stats.rs000064400000000000000000000013561046102023000177000ustar 00000000000000use crate::rpc::RpcResponseArguments; #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionStats { pub active_torrent_count: i32, #[serde(rename = "cumulative-stats")] pub cumulative_stats: StatsDetails, #[serde(rename = "current-stats")] pub current_stats: StatsDetails, pub download_speed: i32, pub paused_torrent_count: i32, pub torrent_count: i32, pub upload_speed: i32, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct StatsDetails { pub downloaded_bytes: i64, pub files_added: i64, pub seconds_active: i64, pub session_count: i64, pub uploaded_bytes: i64, } impl RpcResponseArguments for SessionStats {} transmission-client-0.1.6/src/torrent.rs000064400000000000000000000153531046102023000164760ustar 00000000000000use crate::rpc::RpcResponseArguments; use crate::utils::string_fallback; // Default torrent struct // #[derive(Deserialize, Debug, Default, PartialEq, Clone)] #[serde(rename_all = "camelCase")] #[serde(default)] pub struct Torrent { pub id: i32, pub activity_date: i32, pub added_date: i32, pub bandwidth_priority: i32, pub comment: String, pub corrupt_ever: i64, pub creator: String, pub date_created: i32, pub desired_available: i64, pub done_date: i32, pub download_dir: String, pub download_limit: i32, pub download_limited: bool, pub downloaded_ever: i64, pub edit_date: i32, pub error: i32, pub error_string: String, pub eta: i64, pub eta_idle: i64, pub hash_string: String, pub have_unchecked: i64, pub have_valid: i64, pub honors_session_limits: bool, pub is_finished: bool, pub is_private: bool, pub is_stalled: bool, // TODO: pub labels: Vec>, pub left_until_done: i64, pub magnet_link: String, pub manual_announce_time: i32, pub metadata_percent_complete: f32, pub name: String, pub percent_done: f32, pub piece_count: i64, pub piece_size: i64, pub pieces: String, #[serde(rename = "primary-mime-type")] #[serde(deserialize_with = "string_fallback")] pub primary_mime_type: String, pub queue_position: i32, pub rate_download: i32, pub rate_upload: i32, pub recheck_progress: f32, pub seconds_downloading: i32, pub seconds_seeding: i32, pub seed_idle_limit: i32, pub seed_idle_mode: i32, pub seed_ratio_limit: f32, pub seed_ratio_mode: i32, pub size_when_done: i64, pub start_date: i32, pub status: i32, pub torrent_file: String, pub total_size: i64, pub upload_limit: i32, pub upload_limited: bool, pub upload_ratio: f32, pub uploaded_ever: i64, } #[derive(Deserialize, Debug)] pub struct TorrentList { pub torrents: Vec, } #[derive(Serialize, Debug, Clone, Default)] #[serde(rename_all = "camelCase")] pub struct TorrentMutator { #[serde(skip_serializing_if = "Option::is_none")] pub bandwidth_priority: Option, #[serde(skip_serializing_if = "Option::is_none")] pub download_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub download_limited: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "files-wanted")] pub files_wanted: Option>, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "files-unwanted")] pub files_unwanted: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub honors_session_limits: Option, //#[serde(skip_serializing_if = "Option::is_none")] // TODO: pub labels: [array] #[serde(skip_serializing_if = "Option::is_none")] pub location: Option, #[serde(skip_serializing_if = "Option::is_none")] #[serde(rename = "peer-limit")] pub peer_limit: Option, //#[serde(skip_serializing_if = "Option::is_none")] //#[serde(rename = "priority-high")] // TODO: pub priority_high: [array] //#[serde(skip_serializing_if = "Option::is_none")] //#[serde(rename = "priority-low")] // TODO: pub priority_low: [array] //#[serde(skip_serializing_if = "Option::is_none")] //#[serde(rename = "priority-normal")] // TODO: pub priority_normal: [array] #[serde(skip_serializing_if = "Option::is_none")] pub queue_position: Option, #[serde(skip_serializing_if = "Option::is_none")] pub seed_idle_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub seed_idle_mode: Option, #[serde(skip_serializing_if = "Option::is_none")] pub seed_ratio_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub seed_ratio_mode: Option, //#[serde(skip_serializing_if = "Option::is_none")] // TODO: pub tracker_add: [array] //#[serde(skip_serializing_if = "Option::is_none")] // TODO: pub tracker_remove: [array] //#[serde(skip_serializing_if = "Option::is_none")] // TODO: pub tracker_replace: [array] #[serde(skip_serializing_if = "Option::is_none")] pub upload_limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub upload_limited: Option, } #[derive(Deserialize, Debug)] #[serde(rename_all = "kebab-case")] pub struct TorrentAdded { pub torrent_added: Option, pub torrent_duplicate: Option, } // Torrent files // #[derive(Deserialize, Debug, Default, PartialEq, Clone)] #[serde(rename_all = "camelCase")] #[serde(default)] pub struct TorrentFiles { pub id: i32, #[serde(rename = "file-count")] pub file_count: i32, pub files: Vec, pub file_stats: Vec, pub wanted: Vec, pub priorities: Vec, } #[derive(Deserialize, Debug)] pub struct TorrentFilesList { pub torrents: Vec, } #[derive(Deserialize, Debug, Default, PartialEq, Clone)] #[serde(rename_all = "camelCase")] pub struct File { pub bytes_completed: i64, pub length: i64, pub name: String, } #[derive(Deserialize, Debug, Default, PartialEq, Clone)] #[serde(rename_all = "camelCase")] pub struct FileStat { pub bytes_completed: i64, pub wanted: bool, pub priority: i32, } // Torrent peers // #[derive(Deserialize, Debug, Default, PartialEq, Clone)] #[serde(rename_all = "camelCase")] #[serde(default)] pub struct TorrentPeers { pub id: i32, #[serde(rename = "peer-limit")] pub peer_limit: i32, // TODO: pub peers: Vec>, pub peers_connected: i32, // TODO: pub peers_from: PeersFrom, pub peers_getting_from_us: i32, pub peers_sending_to_us: i32, pub max_connected_peers: i32, pub webseeds_sending_to_us: i32, // TODO: pub webseeds: Vec>, } #[derive(Deserialize, Debug)] pub struct TorrentPeersList { pub torrents: Vec, } // Torrent trackers // #[derive(Deserialize, Debug, Default, PartialEq, Clone)] #[serde(rename_all = "camelCase")] #[serde(default)] pub struct TorrentTrackers { pub id: i32, // TODO: pub tracker_stats: Vec, // TODO: pub trackers: Vec, } #[derive(Deserialize, Debug)] pub struct TorrentTrackersList { pub torrents: Vec, } impl RpcResponseArguments for Torrent {} impl RpcResponseArguments for TorrentList {} impl RpcResponseArguments for TorrentAdded {} impl RpcResponseArguments for TorrentFiles {} impl RpcResponseArguments for TorrentFilesList {} impl RpcResponseArguments for TorrentPeers {} impl RpcResponseArguments for TorrentPeersList {} impl RpcResponseArguments for TorrentTrackers {} impl RpcResponseArguments for TorrentTrackersList {} transmission-client-0.1.6/src/utils.rs000064400000000000000000000055241046102023000161400ustar 00000000000000use serde::{Deserialize, Deserializer}; pub fn torrent_fields() -> Vec { vec![ "id".into(), "activityDate".into(), "addedDate".into(), "bandwidthPriority".into(), "comment".into(), "corruptEver".into(), "creator".into(), "dateCreated".into(), "desiredAvailable".into(), "doneDate".into(), "downloadDir".into(), "downloadedEver".into(), "downloadLimit".into(), "downloadLimited".into(), "editDate".into(), "error".into(), "errorString".into(), "eta".into(), "etaIdle".into(), "hashString".into(), "haveUnchecked".into(), "haveValid".into(), "honorsSessionLimits".into(), "isFinished".into(), "isPrivate".into(), "isStalled".into(), "labels".into(), "leftUntilDone".into(), "magnetLink".into(), "manualAnnounceTime".into(), "metadataPercentComplete".into(), "name".into(), "percentDone".into(), "pieces".into(), "pieceCount".into(), "pieceSize".into(), "primary-mime-type".into(), "queuePosition".into(), "rateDownload".into(), "rateUpload".into(), "recheckProgress".into(), "secondsDownloading".into(), "secondsSeeding".into(), "seedIdleLimit".into(), "seedIdleMode".into(), "seedRatioLimit".into(), "seedRatioMode".into(), "sizeWhenDone".into(), "startDate".into(), "status".into(), "totalSize".into(), "torrentFile".into(), "uploadedEver".into(), "uploadLimit".into(), "uploadLimited".into(), "uploadRatio".into(), ] } pub fn torrent_files_fields() -> Vec { vec![ "id".into(), "file-count".into(), "files".into(), "fileStats".into(), "wanted".into(), "priorities".into(), ] } pub fn torrent_peers_fields() -> Vec { vec![ "id".into(), "peer-limit".into(), "peers".into(), "peersConnected".into(), "peersFrom".into(), "peersGettingFromUs".into(), "peersSendingToUs".into(), "maxConnectedPeers".into(), "webseeds".into(), "webseedsSendingToUs".into(), ] } pub fn torrent_trackers_fields() -> Vec { vec!["id".into(), "trackers".into(), "trackerStats".into()] } pub fn string_fallback<'de, D>(deserializer: D) -> Result where D: Deserializer<'de>, { #[derive(Deserialize)] #[serde(untagged)] enum StringOrNumber { String(String), Number(i64), } match StringOrNumber::deserialize(deserializer)? { StringOrNumber::String(s) => Ok(s), StringOrNumber::Number(i) => Ok(i.to_string()), } }