Add search iterator #1
599
Cargo.lock
generated
599
Cargo.lock
generated
@ -1,11 +1,5 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "adler32"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.8"
|
||||
@ -53,28 +47,6 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f80256bc78f67e7df7e36d77366f636ed976895d91fe2ab9efa3973e8fe8c4f"
|
||||
dependencies = [
|
||||
"backtrace-sys",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace-sys"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.10.1"
|
||||
@ -84,6 +56,12 @@ dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
@ -113,6 +91,12 @@ dependencies = [
|
||||
"iovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.50"
|
||||
@ -162,41 +146,20 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie"
|
||||
version = "0.12.0"
|
||||
name = "core-foundation"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5"
|
||||
checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
|
||||
dependencies = [
|
||||
"time",
|
||||
"url 1.7.2",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie_store"
|
||||
version = "0.7.0"
|
||||
name = "core-foundation-sys"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c"
|
||||
dependencies = [
|
||||
"cookie",
|
||||
"failure",
|
||||
"idna 0.1.5",
|
||||
"log 0.4.8",
|
||||
"publicsuffix",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"time",
|
||||
"try_from",
|
||||
"url 1.7.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
@ -282,49 +245,6 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "error-chain"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9"
|
||||
dependencies = [
|
||||
"version_check 0.1.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"failure_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "failure_derive"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crc32fast",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.6"
|
||||
@ -359,6 +279,21 @@ version = "0.1.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef"
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a"
|
||||
|
||||
[[package]]
|
||||
name = "futures-cpupool"
|
||||
version = "0.1.8"
|
||||
@ -369,6 +304,53 @@ dependencies = [
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6"
|
||||
|
||||
[[package]]
|
||||
name = "futures-macro"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7"
|
||||
dependencies = [
|
||||
"proc-macro-hack",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-sink"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-macro",
|
||||
"futures-task",
|
||||
"memchr",
|
||||
"pin-utils",
|
||||
"proc-macro-hack",
|
||||
"proc-macro-nested",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "google-photoslibrary1"
|
||||
version = "0.1.0-20200203"
|
||||
@ -389,7 +371,7 @@ name = "google_api_auth"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/google-apis-rs/generator#7504e310e8c4c361aca998ea14c309d5c46967cc"
|
||||
dependencies = [
|
||||
"tokio",
|
||||
"tokio 0.1.22",
|
||||
"yup-oauth2",
|
||||
]
|
||||
|
||||
@ -419,10 +401,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"fnv",
|
||||
"futures",
|
||||
"http",
|
||||
"http 0.1.21",
|
||||
"indexmap",
|
||||
"log 0.4.8",
|
||||
"slab",
|
||||
@ -430,6 +412,25 @@ dependencies = [
|
||||
"tokio-io",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"fnv",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"futures-util",
|
||||
"http 0.2.0",
|
||||
"indexmap",
|
||||
"log 0.4.8",
|
||||
"slab",
|
||||
"tokio 0.2.11",
|
||||
"tokio-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.1"
|
||||
@ -454,7 +455,18 @@ version = "0.1.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"fnv",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"fnv",
|
||||
"itoa",
|
||||
]
|
||||
@ -465,12 +477,22 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"http",
|
||||
"http 0.1.21",
|
||||
"tokio-buf",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http-body"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"http 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "httparse"
|
||||
version = "1.3.4"
|
||||
@ -483,12 +505,12 @@ version = "0.12.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"futures-cpupool",
|
||||
"h2",
|
||||
"http",
|
||||
"http-body",
|
||||
"h2 0.1.26",
|
||||
"http 0.1.21",
|
||||
"http-body 0.1.0",
|
||||
"httparse",
|
||||
"iovec",
|
||||
"itoa",
|
||||
@ -496,7 +518,7 @@ dependencies = [
|
||||
"net2",
|
||||
"rustc_version",
|
||||
"time",
|
||||
"tokio",
|
||||
"tokio 0.1.22",
|
||||
"tokio-buf",
|
||||
"tokio-executor",
|
||||
"tokio-io",
|
||||
@ -504,7 +526,31 @@ dependencies = [
|
||||
"tokio-tcp",
|
||||
"tokio-threadpool",
|
||||
"tokio-timer",
|
||||
"want",
|
||||
"want 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"h2 0.2.1",
|
||||
"http 0.2.0",
|
||||
"http-body 0.3.1",
|
||||
"httparse",
|
||||
"itoa",
|
||||
"log 0.4.8",
|
||||
"net2",
|
||||
"pin-project",
|
||||
"time",
|
||||
"tokio 0.2.11",
|
||||
"tower-service",
|
||||
"want 0.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -513,17 +559,34 @@ version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "719d85c7df4a7f309a77d145340a063ea929dcb2e025bae46a80345cffec2952"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"ct-logs",
|
||||
"futures",
|
||||
"hyper",
|
||||
"hyper 0.12.35",
|
||||
"rustls",
|
||||
"tokio-io",
|
||||
"tokio-rustls",
|
||||
"tokio-rustls 0.10.3",
|
||||
"webpki",
|
||||
"webpki-roots",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hyper-rustls"
|
||||
version = "0.19.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f6ea6215c7314d450ee45970ab8b3851ab447a0e6bafdd19e31b20a42dbb7faf"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"ct-logs",
|
||||
"futures-util",
|
||||
"hyper 0.13.2",
|
||||
"rustls",
|
||||
"rustls-native-certs",
|
||||
"tokio 0.2.11",
|
||||
"tokio-rustls 0.12.2",
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "0.1.5"
|
||||
@ -686,15 +749,6 @@ dependencies = [
|
||||
"unicase",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.3.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5"
|
||||
dependencies = [
|
||||
"adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.6.21"
|
||||
@ -793,6 +847,12 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-probe"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.9.0"
|
||||
@ -845,6 +905,38 @@ dependencies = [
|
||||
"yup-oauth2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
version = "0.1.0-alpha.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "0.4.8"
|
||||
@ -871,6 +963,23 @@ dependencies = [
|
||||
"syn-mid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-hack"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-nested"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.8"
|
||||
@ -880,19 +989,6 @@ dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "publicsuffix"
|
||||
version = "1.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b"
|
||||
dependencies = [
|
||||
"error-chain",
|
||||
"idna 0.2.0",
|
||||
"lazy_static 1.4.0",
|
||||
"regex",
|
||||
"url 2.1.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.2"
|
||||
@ -1052,36 +1148,37 @@ checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06"
|
||||
|
||||
[[package]]
|
||||
name = "reqwest"
|
||||
version = "0.9.24"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab"
|
||||
checksum = "c0e798e19e258bf6c30a304622e3e9ac820e483b06a1857a026e1f109b113fe4"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bytes",
|
||||
"cookie",
|
||||
"cookie_store",
|
||||
"base64 0.11.0",
|
||||
"bytes 0.5.4",
|
||||
"encoding_rs",
|
||||
"flate2",
|
||||
"futures",
|
||||
"http",
|
||||
"hyper",
|
||||
"hyper-rustls",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"http 0.2.0",
|
||||
"http-body 0.3.1",
|
||||
"hyper 0.13.2",
|
||||
"hyper-rustls 0.19.1",
|
||||
"js-sys",
|
||||
"lazy_static 1.4.0",
|
||||
"log 0.4.8",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
"percent-encoding 2.1.0",
|
||||
"pin-project-lite",
|
||||
"rustls",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"time",
|
||||
"tokio",
|
||||
"tokio-executor",
|
||||
"tokio-io",
|
||||
"tokio-rustls",
|
||||
"tokio-threadpool",
|
||||
"tokio-timer",
|
||||
"url 1.7.2",
|
||||
"uuid",
|
||||
"tokio 0.2.11",
|
||||
"tokio-rustls 0.12.2",
|
||||
"url 2.1.1",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"webpki-roots",
|
||||
"winreg",
|
||||
]
|
||||
@ -1101,12 +1198,6 @@ dependencies = [
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
@ -1122,13 +1213,25 @@ version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.10.1",
|
||||
"log 0.4.8",
|
||||
"ring",
|
||||
"sct",
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustls-native-certs"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307"
|
||||
dependencies = [
|
||||
"openssl-probe",
|
||||
"rustls",
|
||||
"schannel",
|
||||
"security-framework",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.2"
|
||||
@ -1146,6 +1249,16 @@ version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
|
||||
|
||||
[[package]]
|
||||
name = "schannel"
|
||||
version = "0.1.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0",
|
||||
"winapi 0.3.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.0.0"
|
||||
@ -1162,6 +1275,27 @@ dependencies = [
|
||||
"untrusted",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "security-framework"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df"
|
||||
dependencies = [
|
||||
"core-foundation",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
"security-framework-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "security-framework-sys"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895"
|
||||
dependencies = [
|
||||
"core-foundation-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
@ -1221,14 +1355,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_urlencoded"
|
||||
version = "0.5.5"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a"
|
||||
checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97"
|
||||
dependencies = [
|
||||
"dtoa",
|
||||
"itoa",
|
||||
"serde",
|
||||
"url 1.7.2",
|
||||
"url 2.1.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1283,7 +1417,7 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1338,18 +1472,6 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "synstructure"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.1.0"
|
||||
@ -1377,7 +1499,7 @@ version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dafb35214e317d6c0a72b16d1aa667bbc0fea57e302798e7bc520e0f39988006"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.10.1",
|
||||
"byteorder",
|
||||
"chrono",
|
||||
"rand",
|
||||
@ -1430,7 +1552,7 @@ version = "0.1.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"mio",
|
||||
"num_cpus",
|
||||
@ -1448,13 +1570,30 @@ dependencies = [
|
||||
"tokio-uds",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"fnv",
|
||||
"iovec",
|
||||
"lazy_static 1.4.0",
|
||||
"memchr",
|
||||
"mio",
|
||||
"num_cpus",
|
||||
"pin-project-lite",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-buf"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"either",
|
||||
"futures",
|
||||
]
|
||||
@ -1465,7 +1604,7 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"tokio-io",
|
||||
]
|
||||
@ -1507,7 +1646,7 @@ version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"log 0.4.8",
|
||||
]
|
||||
@ -1537,7 +1676,7 @@ version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d7cf08f990090abd6c6a73cab46fed62f85e8aef8b99e4b918a9f4a637f0676"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"iovec",
|
||||
"rustls",
|
||||
@ -1545,6 +1684,18 @@ dependencies = [
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-rustls"
|
||||
version = "0.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "141afec0978abae6573065a48882c6bae44c5cc61db9b511ac4abf6a09bfd9cc"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"rustls",
|
||||
"tokio 0.2.11",
|
||||
"webpki",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-sync"
|
||||
version = "0.1.7"
|
||||
@ -1561,7 +1712,7 @@ version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"iovec",
|
||||
"mio",
|
||||
@ -1604,7 +1755,7 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"log 0.4.8",
|
||||
"mio",
|
||||
@ -1619,7 +1770,7 @@ version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"bytes 0.4.12",
|
||||
"futures",
|
||||
"iovec",
|
||||
"libc",
|
||||
@ -1631,21 +1782,32 @@ dependencies = [
|
||||
"tokio-reactor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-util"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"log 0.4.8",
|
||||
"pin-project-lite",
|
||||
"tokio 0.2.11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tower-service"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
|
||||
|
||||
[[package]]
|
||||
name = "try-lock"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
|
||||
|
||||
[[package]]
|
||||
name = "try_from"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
version = "2.6.0"
|
||||
@ -1728,15 +1890,6 @@ dependencies = [
|
||||
"percent-encoding 2.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a"
|
||||
dependencies = [
|
||||
"rand",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.8.1"
|
||||
@ -1772,6 +1925,16 @@ dependencies = [
|
||||
"try-lock",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "want"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
|
||||
dependencies = [
|
||||
"log 0.4.8",
|
||||
"try-lock",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.58"
|
||||
@ -1779,6 +1942,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
@ -1797,6 +1962,18 @@ dependencies = [
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.58"
|
||||
@ -1951,19 +2128,19 @@ version = "3.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "687c1c52bf66691f1e7426e7520aecec25bf659835179095280a4acfcb24f63f"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"base64 0.10.1",
|
||||
"chrono",
|
||||
"futures",
|
||||
"http",
|
||||
"hyper",
|
||||
"hyper-rustls",
|
||||
"http 0.1.21",
|
||||
"hyper 0.12.35",
|
||||
"hyper-rustls 0.17.1",
|
||||
"itertools",
|
||||
"log 0.3.9",
|
||||
"rustls",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"tokio 0.1.22",
|
||||
"tokio-threadpool",
|
||||
"tokio-timer",
|
||||
"url 1.7.2",
|
||||
|
||||
117
src/main.rs
117
src/main.rs
@ -3,11 +3,9 @@ use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use google_api_auth;
|
||||
use google_photoslibrary1;
|
||||
use google_photoslibrary1::schemas::Album;
|
||||
use google_photoslibrary1::schemas::SearchMediaItemsRequest;
|
||||
use log::debug;
|
||||
use log::info;
|
||||
use google_photoslibrary1 as photos;
|
||||
use log::{debug, info};
|
||||
use photos::schemas::{Album, MediaItem, SearchMediaItemsRequest};
|
||||
use regex::Regex;
|
||||
use structopt::StructOpt;
|
||||
use yup_oauth2::{Authenticator, InstalledFlow};
|
||||
@ -54,7 +52,7 @@ struct Opt {
|
||||
fn new_client(
|
||||
credentials: &PathBuf,
|
||||
token_cache: &PathBuf,
|
||||
) -> Result<google_photoslibrary1::Client, Box<dyn Error>> {
|
||||
) -> Result<photos::Client, Box<dyn Error>> {
|
||||
let secret = yup_oauth2::read_application_secret(credentials)?;
|
||||
|
||||
// Create an authenticator that uses an InstalledFlow to authenticate. The
|
||||
@ -69,51 +67,88 @@ fn new_client(
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
let scopes = vec![google_photoslibrary1::scopes::PHOTOSLIBRARY_READONLY];
|
||||
let scopes = vec![photos::scopes::PHOTOSLIBRARY_READONLY];
|
||||
|
||||
let auth = google_api_auth::yup_oauth2::from_authenticator(auth, scopes);
|
||||
|
||||
Ok(google_photoslibrary1::Client::new(auth))
|
||||
Ok(photos::Client::new(auth))
|
||||
}
|
||||
|
||||
fn search_media_items(
|
||||
client: google_photoslibrary1::Client,
|
||||
album_id: String,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
let mut page_token = None;
|
||||
let mut total = 0;
|
||||
loop {
|
||||
let resp = client
|
||||
.media_items()
|
||||
.search(SearchMediaItemsRequest {
|
||||
album_id: Some(album_id.clone()),
|
||||
// 100 is the documented max.
|
||||
page_size: Some(100),
|
||||
page_token,
|
||||
..Default::default()
|
||||
})
|
||||
.execute_with_all_fields()?;
|
||||
struct SearchIter<'a> {
|
||||
client: &'a photos::Client,
|
||||
items: ::std::vec::IntoIter<MediaItem>,
|
||||
finished: bool,
|
||||
req: SearchMediaItemsRequest,
|
||||
}
|
||||
|
||||
let media_items = resp.media_items.ok_or("no results")?;
|
||||
println!("got ({}) items", media_items.len());
|
||||
total += media_items.len();
|
||||
for mi in media_items {
|
||||
println!(
|
||||
"{} {}",
|
||||
mi.id.unwrap_or("NO ID".to_string()),
|
||||
mi.filename.unwrap_or("NO FILENAME".to_string())
|
||||
);
|
||||
}
|
||||
page_token = resp.next_page_token;
|
||||
if page_token.is_none() {
|
||||
println!("({}) items total", total);
|
||||
return Ok(());
|
||||
impl<'a> SearchIter<'a> {
|
||||
fn new(client: &'a photos::Client, req: SearchMediaItemsRequest) -> Self {
|
||||
SearchIter {
|
||||
client,
|
||||
items: Vec::new().into_iter(),
|
||||
finished: false,
|
||||
req,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
||||
impl<'a> Iterator for SearchIter<'a> {
|
||||
type Item = Result<MediaItem, photos::Error>;
|
||||
|
||||
fn next(&mut self) -> Option<Result<MediaItem, photos::Error>> {
|
||||
loop {
|
||||
if let Some(v) = self.items.next() {
|
||||
return Some(Ok(v));
|
||||
}
|
||||
if self.finished {
|
||||
return None;
|
||||
}
|
||||
let resp = match self
|
||||
.client
|
||||
.media_items()
|
||||
.search(self.req.clone())
|
||||
.execute_with_default_fields()
|
||||
{
|
||||
Ok(resp) => resp,
|
||||
Err(err) => return Some(Err(err)),
|
||||
};
|
||||
if resp.next_page_token.is_none() {
|
||||
self.finished = true;
|
||||
}
|
||||
self.req.page_token = resp.next_page_token;
|
||||
if let Some(items) = resp.media_items {
|
||||
self.items = items.into_iter();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn search_media_items(client: photos::Client, album_id: String) -> Result<(), Box<dyn Error>> {
|
||||
let mut total = 0;
|
||||
let media_items = SearchIter::new(
|
||||
&client,
|
||||
SearchMediaItemsRequest {
|
||||
album_id: Some(album_id.clone()),
|
||||
// 100 is the documented max.
|
||||
page_size: Some(100),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
for mi in media_items {
|
||||
let mi = mi?;
|
||||
total += 1;
|
||||
println!(
|
||||
"{} {}",
|
||||
mi.id.unwrap_or("NO ID".to_string()),
|
||||
mi.filename.unwrap_or("NO FILENAME".to_string())
|
||||
);
|
||||
}
|
||||
println!("({}) items total", total);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn sync_albums(
|
||||
client: google_photoslibrary1::Client,
|
||||
client: photos::Client,
|
||||
title_filter: Option<Regex>,
|
||||
output_dir: PathBuf,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
@ -146,7 +181,7 @@ fn print_albums(albums: Vec<Album>) {
|
||||
}
|
||||
|
||||
fn list_albums(
|
||||
client: google_photoslibrary1::Client,
|
||||
client: photos::Client,
|
||||
title_filter: Option<Regex>,
|
||||
) -> Result<Vec<Album>, Box<dyn Error>> {
|
||||
Ok(client
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user
I'm surprised there isn't a way to implement this using
self.req.page_token.is_none(), why keep the extra state infinished? You have to structure it a little different to deal with the first time throughnext(), but it should be doable, rgiht?I couldn't think of a way to structure it differently. You need some state machine to differentiate between the first iteration and last since page token will be none in both cases. It seemed like the simplest additional state was just the bool but I would be happy to hear something better.
Ok, I'll merge this and then play around with it to see if there's any different way to write it. Note, I pushed something and now it won't merge cleanly. Can you pull and merge then repush this? I'm not sure exactly what steps are required.
done