diff --git a/.lock b/.lock new file mode 100644 index 00000000..e69de29b diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/crates.js b/crates.js new file mode 100644 index 00000000..bc94359c --- /dev/null +++ b/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["deviantart","deviantart_cli"]; \ No newline at end of file diff --git a/deviantart/all.html b/deviantart/all.html new file mode 100644 index 00000000..7ea2dd08 --- /dev/null +++ b/deviantart/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

\ No newline at end of file diff --git a/deviantart/client/struct.Client.html b/deviantart/client/struct.Client.html new file mode 100644 index 00000000..c3fcf56c --- /dev/null +++ b/deviantart/client/struct.Client.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../deviantart/struct.Client.html...

+ + + \ No newline at end of file diff --git a/deviantart/enum.Error.html b/deviantart/enum.Error.html new file mode 100644 index 00000000..760ecc04 --- /dev/null +++ b/deviantart/enum.Error.html @@ -0,0 +1,46 @@ +Error in deviantart - Rust

Enum deviantart::Error

source ·
pub enum Error {
+    Reqwest(Error),
+    Url(ParseError),
+    TokioJoin(JoinError),
+    Json(Error),
+    InvalidScrapedWebPage(FromHtmlStrError),
+    InvalidScrapedStashInfo(FromHtmlStrError),
+    SignInFailed,
+    MissingField {
+        name: &'static str,
+    },
+    MissingStreams,
+    MissingBrowsePageStream,
+    MissingDeviation(u64),
+    CookieStore(WrapBoxError),
+}
Expand description

Library Error

+

Variants§

§

Reqwest(Error)

Reqwest HTTP Error

+
§

Url(ParseError)

Invalid Url

+
§

TokioJoin(JoinError)

A tokio task failed to join

+
§

Json(Error)

Json failed to parse

+
§

InvalidScrapedWebPage(FromHtmlStrError)

A scraped web page was invalid

+
§

InvalidScrapedStashInfo(FromHtmlStrError)

Scraped Stash info was invalid

+
§

SignInFailed

Signing in failed for an unspecified reason

+
§

MissingField

Missing a field

+

Fields

§name: &'static str

The missing field name

+
§

MissingStreams

Missing the streams field

+
§

MissingBrowsePageStream

Missing the browse page stream

+
§

MissingDeviation(u64)

Missing the Deviation of the given id

+
§

CookieStore(WrapBoxError)

A cookie store error occured

+

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHtmlStrError> for Error

source§

fn from(source: FromHtmlStrError) -> Self

Converts to this type from the input type.
source§

impl From<FromHtmlStrError> for Error

source§

fn from(source: FromHtmlStrError) -> Self

Converts to this type from the input type.
source§

impl From<JoinError> for Error

source§

fn from(source: JoinError) -> Self

Converts to this type from the input type.
source§

impl From<ParseError> for Error

source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart/index.html b/deviantart/index.html new file mode 100644 index 00000000..de9ed347 --- /dev/null +++ b/deviantart/index.html @@ -0,0 +1 @@ +deviantart - Rust

Crate deviantart

source ·

Re-exports§

Modules§

Structs§

  • A DeviantArt Client
  • A wrapper over a Box<dyn std::error::Error + Send + Sync + 'static>.

Enums§

\ No newline at end of file diff --git a/deviantart/sidebar-items.js b/deviantart/sidebar-items.js new file mode 100644 index 00000000..b70b21ee --- /dev/null +++ b/deviantart/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Error"],"mod":["types"],"struct":["Client","WrapBoxError"]}; \ No newline at end of file diff --git a/deviantart/struct.Client.html b/deviantart/struct.Client.html new file mode 100644 index 00000000..4a5d7dec --- /dev/null +++ b/deviantart/struct.Client.html @@ -0,0 +1,44 @@ +Client in deviantart - Rust

Struct deviantart::Client

source ·
pub struct Client {
+    pub client: Client,
+    pub cookie_store: Arc<CookieStoreMutex>,
+}
Expand description

A DeviantArt Client

+

Fields§

§client: Client

The inner http client.

+

You probably shouldn’t touch this.

+
§cookie_store: Arc<CookieStoreMutex>

The cookie store.

+

Implementations§

source§

impl Client

source

pub fn new() -> Self

Make a new Client.

+
source

pub fn new_with_user_agent(user_agent: &str) -> Self

Make a new Client with the given user agent.

+
source

pub async fn load_json_cookies<R>(&self, reader: R) -> Result<(), Error>
where + R: BufRead + Send + 'static,

Load the cookie store from a json reader.

+
source

pub async fn save_json_cookies<W>(&self, writer: W) -> Result<(), Error>
where + W: Write + Send + 'static,

Save the cookie store from a json writer.

+
source

pub async fn scrape_webpage( + &self, + url: &str, +) -> Result<ScrapedWebPageInfo, Error>

Scrape a webpage for info.

+
source

pub async fn sign_in(&self, username: &str, password: &str) -> Result<(), Error>

Sign in to get access to more results from apis.

+

This will also clean the cookie jar.

+
source

pub async fn is_logged_in_online(&self) -> Result<bool, Error>

Run a GET request on the home page and check if the user is logged in

+
source

pub async fn get_oembed(&self, url: &str) -> Result<OEmbed, Error>

OEmbed API

+
source

pub async fn search_raw( + &self, + query: &str, + cursor: Option<&str>, +) -> Result<ScrapedWebPageInfo, Error>

Run a search using the low level api

+
source

pub fn search(&self, query: &str, cursor: Option<&str>) -> SearchCursor

Run a search

+

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Client

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart/struct.WrapBoxError.html b/deviantart/struct.WrapBoxError.html new file mode 100644 index 00000000..b64ce549 --- /dev/null +++ b/deviantart/struct.WrapBoxError.html @@ -0,0 +1,18 @@ +WrapBoxError in deviantart - Rust

Struct deviantart::WrapBoxError

source ·
pub struct WrapBoxError(pub Box<dyn Error + Send + Sync + 'static>);
Expand description

A wrapper over a Box<dyn std::error::Error + Send + Sync + 'static>.

+

Tuple Fields§

§0: Box<dyn Error + Send + Sync + 'static>

Trait Implementations§

source§

impl Debug for WrapBoxError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for WrapBoxError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for WrapBoxError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart/types/deviation/index.html b/deviantart/types/deviation/index.html new file mode 100644 index 00000000..363ffe4f --- /dev/null +++ b/deviantart/types/deviation/index.html @@ -0,0 +1,2 @@ +deviantart::types::deviation - Rust

Module deviantart::types::deviation

source ·
Expand description

The Deviation type.

+

Structs§

\ No newline at end of file diff --git a/deviantart/types/deviation/sidebar-items.js b/deviantart/types/deviation/sidebar-items.js new file mode 100644 index 00000000..d943f47b --- /dev/null +++ b/deviantart/types/deviation/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Author","Block","Deviation","DeviationMedia","Html","Markup","MediaType","TextContext"]}; \ No newline at end of file diff --git a/deviantart/types/deviation/struct.Author.html b/deviantart/types/deviation/struct.Author.html new file mode 100644 index 00000000..3cd36f48 --- /dev/null +++ b/deviantart/types/deviation/struct.Author.html @@ -0,0 +1,31 @@ +Author in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::Author

source ·
pub struct Author {
+    pub is_new_deviant: bool,
+    pub userid_uuid: String,
+    pub usericon: Url,
+    pub user_id: u64,
+    pub username: String,
+    pub unknown: HashMap<String, Value>,
+}

Fields§

§is_new_deviant: bool

is the user new

+
§userid_uuid: String

User UUID

+
§usericon: Url

User icon url

+
§user_id: u64

User ID

+
§username: String

Username

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Trait Implementations§

source§

impl Debug for Author

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Author

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Author

§

impl RefUnwindSafe for Author

§

impl Send for Author

§

impl Sync for Author

§

impl Unpin for Author

§

impl UnwindSafe for Author

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.Block.html b/deviantart/types/deviation/struct.Block.html new file mode 100644 index 00000000..671f2357 --- /dev/null +++ b/deviantart/types/deviation/struct.Block.html @@ -0,0 +1,33 @@ +Block in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::Block

source ·
pub struct Block {
+    pub data: Value,
+    pub depth: u64,
+    pub key: String,
+    pub text: String,
+    pub kind: String,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

A Markup block

+

Fields§

§data: Value

?

+
§depth: u64

?

+
§key: String

?

+
§text: String

Text data

+
§kind: String§unknown: HashMap<String, Value>

Unknown K/Vs

+

Trait Implementations§

source§

impl Clone for Block

source§

fn clone(&self) -> Block

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Block

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Block

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Block

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Block

§

impl RefUnwindSafe for Block

§

impl Send for Block

§

impl Sync for Block

§

impl Unpin for Block

§

impl UnwindSafe for Block

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.Deviation.html b/deviantart/types/deviation/struct.Deviation.html new file mode 100644 index 00000000..5b2f1869 --- /dev/null +++ b/deviantart/types/deviation/struct.Deviation.html @@ -0,0 +1,50 @@ +Deviation in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::Deviation

source ·
pub struct Deviation {
+    pub block_reasons: Vec<Value>,
+    pub deviation_id: u64,
+    pub kind: String,
+    pub url: Url,
+    pub media: DeviationMedia,
+    pub title: String,
+    pub text_content: Option<TextContext>,
+    pub is_downloadable: bool,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

A Deviation

+

Fields§

§block_reasons: Vec<Value>

DeviantArt Author +?

+
§deviation_id: u64

Deviation ID

+
§kind: String

Deviation Type

+
§url: Url

Image Url

+
§media: DeviationMedia

Media Info

+
§title: String

Title

+
§text_content: Option<TextContext>

Text content for literature

+
§is_downloadable: bool

Whether this is downloadable

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Implementations§

source§

impl Deviation

source

pub fn get_media_url(&self) -> Option<Url>

Get the media url for this Deviation.

+
source

pub fn get_download_url(&self) -> Option<Url>

Get the “download” url for this Deviation.

+
source

pub fn get_fullview_url(&self) -> Option<Url>

Get the fullview url for this Deviation.

+
source

pub fn get_gif_url(&self) -> Option<Url>

Get the GIF url for this Deviation.

+
source

pub fn get_best_video_url(&self) -> Option<&Url>

Get the best video url

+
source

pub fn is_image(&self) -> bool

Whether this is an image

+
source

pub fn is_literature(&self) -> bool

Whether this is literature

+
source

pub fn is_film(&self) -> bool

Whether this is a film

+
source

pub fn get_image_download_url(&self) -> Option<Url>

Get the most “fitting” url to download an image.

+

Usually, [DeviationExtended] holds better data than a Deviation, so prefer that instead.

+
source

pub fn get_extension(&self) -> Option<&str>

Try to get the original extension of this Deviation

+

Trait Implementations§

source§

impl Debug for Deviation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Deviation

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.DeviationMedia.html b/deviantart/types/deviation/struct.DeviationMedia.html new file mode 100644 index 00000000..94da9947 --- /dev/null +++ b/deviantart/types/deviation/struct.DeviationMedia.html @@ -0,0 +1,33 @@ +DeviationMedia in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::DeviationMedia

source ·
pub struct DeviationMedia {
+    pub base_uri: Option<Url>,
+    pub token: Vec<String>,
+    pub types: Vec<MediaType>,
+    pub pretty_name: Option<String>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

The media field of a Deviation.

+

Fields§

§base_uri: Option<Url>

The base uri

+
§token: Vec<String>

Image token

+
§types: Vec<MediaType>

Types

+
§pretty_name: Option<String>

Pretty Name

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Implementations§

source§

impl DeviationMedia

source

pub fn get_fullview_media_type(&self) -> Option<&MediaType>

Try to get the fullview MediaType.

+
source

pub fn get_gif_media_type(&self) -> Option<&MediaType>

Try to get the gif MediaType.

+
source

pub fn get_best_video_media_type(&self) -> Option<&MediaType>

Try to get the video MediaType

+

Trait Implementations§

source§

impl Debug for DeviationMedia

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DeviationMedia

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.Html.html b/deviantart/types/deviation/struct.Html.html new file mode 100644 index 00000000..dec868cb --- /dev/null +++ b/deviantart/types/deviation/struct.Html.html @@ -0,0 +1,31 @@ +Html in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::Html

source ·
pub struct Html {
+    pub features: String,
+    pub markup: Option<String>,
+    pub kind: String,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Text Context html

+

Fields§

§features: String

?

+
§markup: Option<String>

Text markup data

+
§kind: String

The kind of text data

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Implementations§

source§

impl Html

source

pub fn get_markup(&self) -> Option<Result<Markup, Error>>

Try to parse the markup field

+

Trait Implementations§

source§

impl Clone for Html

source§

fn clone(&self) -> Html

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Html

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Html

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Html

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Html

§

impl RefUnwindSafe for Html

§

impl Send for Html

§

impl Sync for Html

§

impl Unpin for Html

§

impl UnwindSafe for Html

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.Markup.html b/deviantart/types/deviation/struct.Markup.html new file mode 100644 index 00000000..2ab5dfdf --- /dev/null +++ b/deviantart/types/deviation/struct.Markup.html @@ -0,0 +1,28 @@ +Markup in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::Markup

source ·
pub struct Markup {
+    pub blocks: Vec<Block>,
+    pub entity_map: Value,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Text Context Html Markup

+

Fields§

§blocks: Vec<Block>

Blocks of marked-up text

+
§entity_map: Value

?

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Trait Implementations§

source§

impl Clone for Markup

source§

fn clone(&self) -> Markup

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Markup

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Markup

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Markup

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Markup

§

impl RefUnwindSafe for Markup

§

impl Send for Markup

§

impl Sync for Markup

§

impl Unpin for Markup

§

impl UnwindSafe for Markup

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.MediaType.html b/deviantart/types/deviation/struct.MediaType.html new file mode 100644 index 00000000..f67d22b4 --- /dev/null +++ b/deviantart/types/deviation/struct.MediaType.html @@ -0,0 +1,37 @@ +MediaType in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::MediaType

source ·
pub struct MediaType {
+    pub content: Option<String>,
+    pub height: u64,
+    pub kind: String,
+    pub width: u64,
+    pub b: Option<Url>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

DeviantArt DeviationMedia media type.

+

Fields§

§content: Option<String>

The content. A uri used with base_uri.

+
§height: u64

Image Height

+
§kind: String

? +The kind of media

+
§width: u64

Image Width

+
§b: Option<Url>

? +?

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Implementations§

source§

impl MediaType

source

pub fn is_fullview(&self) -> bool

Whether this is the fullview

+
source

pub fn is_gif(&self) -> bool

Whether this is a gif

+
source

pub fn is_video(&self) -> bool

Whether this is a video

+

Trait Implementations§

source§

impl Debug for MediaType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for MediaType

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/deviation/struct.TextContext.html b/deviantart/types/deviation/struct.TextContext.html new file mode 100644 index 00000000..136093c3 --- /dev/null +++ b/deviantart/types/deviation/struct.TextContext.html @@ -0,0 +1,28 @@ +TextContext in deviantart::types::deviation - Rust

Struct deviantart::types::deviation::TextContext

source ·
pub struct TextContext {
+    pub excerpt: String,
+    pub html: Html,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Text Content for literature

+

Fields§

§excerpt: String

Excerpt of text

+
§html: Html

Html data

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Trait Implementations§

source§

impl Clone for TextContext

source§

fn clone(&self) -> TextContext

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TextContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TextContext

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for TextContext

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/index.html b/deviantart/types/index.html new file mode 100644 index 00000000..6eb66503 --- /dev/null +++ b/deviantart/types/index.html @@ -0,0 +1,2 @@ +deviantart::types - Rust

Module deviantart::types

source ·
Expand description

API types

+

Re-exports§

Modules§

\ No newline at end of file diff --git a/deviantart/types/oembed/index.html b/deviantart/types/oembed/index.html new file mode 100644 index 00000000..fe84806a --- /dev/null +++ b/deviantart/types/oembed/index.html @@ -0,0 +1,2 @@ +deviantart::types::oembed - Rust

Module deviantart::types::oembed

source ·
Expand description

The OEmbed type

+

Structs§

\ No newline at end of file diff --git a/deviantart/types/oembed/sidebar-items.js b/deviantart/types/oembed/sidebar-items.js new file mode 100644 index 00000000..5466cc51 --- /dev/null +++ b/deviantart/types/oembed/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["OEmbed"]}; \ No newline at end of file diff --git a/deviantart/types/oembed/struct.OEmbed.html b/deviantart/types/oembed/struct.OEmbed.html new file mode 100644 index 00000000..c5a35446 --- /dev/null +++ b/deviantart/types/oembed/struct.OEmbed.html @@ -0,0 +1,28 @@ +OEmbed in deviantart::types::oembed - Rust

Struct deviantart::types::oembed::OEmbed

source ·
pub struct OEmbed {
+    pub url: Url,
+    pub thumbnail_url: Option<Url>,
+    pub title: String,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

DeviantArt OEmbed

+

Fields§

§url: Url

Url of the asset

+
§thumbnail_url: Option<Url>

Url of the thumbnail

+
§title: String

Title

+
§unknown: HashMap<String, Value>

Unknown K/Vs

+

Trait Implementations§

source§

impl Debug for OEmbed

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for OEmbed

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for OEmbed

§

impl RefUnwindSafe for OEmbed

§

impl Send for OEmbed

§

impl Sync for OEmbed

§

impl Unpin for OEmbed

§

impl UnwindSafe for OEmbed

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_stash_info/enum.FromHtmlStrError.html b/deviantart/types/scraped_stash_info/enum.FromHtmlStrError.html new file mode 100644 index 00000000..8202a3cf --- /dev/null +++ b/deviantart/types/scraped_stash_info/enum.FromHtmlStrError.html @@ -0,0 +1,23 @@ +FromHtmlStrError in deviantart::types::scraped_stash_info - Rust
pub enum FromHtmlStrError {
+    MissingPageData,
+    InvalidJson(Error),
+}
Expand description

An error that may occur while parsing a ScrapedStashInfo from a html str.

+

Variants§

§

MissingPageData

Missing the pageData variable

+
§

InvalidJson(Error)

Failed to parse json

+

Trait Implementations§

source§

impl Debug for FromHtmlStrError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for FromHtmlStrError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for FromHtmlStrError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for FromHtmlStrError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHtmlStrError> for Error

source§

fn from(source: FromHtmlStrError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart/types/scraped_stash_info/index.html b/deviantart/types/scraped_stash_info/index.html new file mode 100644 index 00000000..caa02789 --- /dev/null +++ b/deviantart/types/scraped_stash_info/index.html @@ -0,0 +1,2 @@ +deviantart::types::scraped_stash_info - Rust

Module deviantart::types::scraped_stash_info

source ·
Expand description

The ScrapedStashInfo type.

+

Structs§

Enums§

\ No newline at end of file diff --git a/deviantart/types/scraped_stash_info/sidebar-items.js b/deviantart/types/scraped_stash_info/sidebar-items.js new file mode 100644 index 00000000..31538a61 --- /dev/null +++ b/deviantart/types/scraped_stash_info/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["FromHtmlStrError"],"struct":["Film","ScrapedStashInfo","Size"]}; \ No newline at end of file diff --git a/deviantart/types/scraped_stash_info/struct.Film.html b/deviantart/types/scraped_stash_info/struct.Film.html new file mode 100644 index 00000000..3cbeaa47 --- /dev/null +++ b/deviantart/types/scraped_stash_info/struct.Film.html @@ -0,0 +1,25 @@ +Film in deviantart::types::scraped_stash_info - Rust

Struct deviantart::types::scraped_stash_info::Film

source ·
pub struct Film {
+    pub sizes: HashMap<String, Size>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Film data from a sta.sh link

+

Fields§

§sizes: HashMap<String, Size>

Video sizes

+
§unknown: HashMap<String, Value>

Unknown data

+

Implementations§

source§

impl Film

source

pub fn get_best_size(&self) -> Option<&Size>

Get the best size

+

Trait Implementations§

source§

impl Debug for Film

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Film

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Film

§

impl RefUnwindSafe for Film

§

impl Send for Film

§

impl Sync for Film

§

impl Unpin for Film

§

impl UnwindSafe for Film

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_stash_info/struct.ScrapedStashInfo.html b/deviantart/types/scraped_stash_info/struct.ScrapedStashInfo.html new file mode 100644 index 00000000..9dc19249 --- /dev/null +++ b/deviantart/types/scraped_stash_info/struct.ScrapedStashInfo.html @@ -0,0 +1,33 @@ +ScrapedStashInfo in deviantart::types::scraped_stash_info - Rust
pub struct ScrapedStashInfo {
+    pub csrf: String,
+    pub deviationid: u64,
+    pub film: Option<Film>,
+    pub deviation_width: u64,
+    pub deviation_height: u64,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Scraped info from a sta.sh link

+

Fields§

§csrf: String

Csrf token

+
§deviationid: u64

?

+
§film: Option<Film>

Present only if it is a video

+
§deviation_width: u64

The width

+
§deviation_height: u64

The height

+
§unknown: HashMap<String, Value>

Unknown data

+

Implementations§

source§

impl ScrapedStashInfo

source

pub fn from_html_str(input: &str) -> Result<Self, FromHtmlStrError>

Parse this from a html str

+

Trait Implementations§

source§

impl Debug for ScrapedStashInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ScrapedStashInfo

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_stash_info/struct.Size.html b/deviantart/types/scraped_stash_info/struct.Size.html new file mode 100644 index 00000000..cb9d99bb --- /dev/null +++ b/deviantart/types/scraped_stash_info/struct.Size.html @@ -0,0 +1,28 @@ +Size in deviantart::types::scraped_stash_info - Rust

Struct deviantart::types::scraped_stash_info::Size

source ·
pub struct Size {
+    pub height: u32,
+    pub width: u32,
+    pub src: Url,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Film size

+

Fields§

§height: u32

Video height

+
§width: u32

Video width

+
§src: Url

Video src

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for Size

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Size

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Size

§

impl RefUnwindSafe for Size

§

impl Send for Size

§

impl Sync for Size

§

impl Unpin for Size

§

impl UnwindSafe for Size

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/enum.FromHtmlStrError.html b/deviantart/types/scraped_webpage_info/enum.FromHtmlStrError.html new file mode 100644 index 00000000..153e41be --- /dev/null +++ b/deviantart/types/scraped_webpage_info/enum.FromHtmlStrError.html @@ -0,0 +1,23 @@ +FromHtmlStrError in deviantart::types::scraped_webpage_info - Rust
pub enum FromHtmlStrError {
+    MissingInitialState,
+    InvalidJson(Error),
+}
Expand description

An error that may occur while parsing a ScrapedWebPageInfo from a html string.

+

Variants§

§

MissingInitialState

Missing the InitialState variable

+
§

InvalidJson(Error)

Failed to parse some state

+

Trait Implementations§

source§

impl Debug for FromHtmlStrError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for FromHtmlStrError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for FromHtmlStrError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for FromHtmlStrError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHtmlStrError> for Error

source§

fn from(source: FromHtmlStrError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/index.html b/deviantart/types/scraped_webpage_info/index.html new file mode 100644 index 00000000..df47e61f --- /dev/null +++ b/deviantart/types/scraped_webpage_info/index.html @@ -0,0 +1,2 @@ +deviantart::types::scraped_webpage_info - Rust

Module deviantart::types::scraped_webpage_info

source ·
Expand description

The ScrapedWebPageInfo type.

+

Structs§

Enums§

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/sidebar-items.js b/deviantart/types/scraped_webpage_info/sidebar-items.js new file mode 100644 index 00000000..f8ab83fd --- /dev/null +++ b/deviantart/types/scraped_webpage_info/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["FromHtmlStrError"],"struct":["BrowsePageStream","Config","DeviationExtended","Download","DuperBrowse","Entities","PublicSession","RootStream","ScrapedWebPageInfo","StreamParams","Streams"]}; \ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.BrowsePageStream.html b/deviantart/types/scraped_webpage_info/struct.BrowsePageStream.html new file mode 100644 index 00000000..cf7551c4 --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.BrowsePageStream.html @@ -0,0 +1,43 @@ +BrowsePageStream in deviantart::types::scraped_webpage_info - Rust
pub struct BrowsePageStream {
+    pub cursor: String,
+    pub has_less: bool,
+    pub has_more: bool,
+    pub items: Vec<Value>,
+    pub items_per_fetch: u64,
+    pub stream_params: StreamParams,
+    pub stream_type: String,
+    pub stream_id: String,
+    pub fetch_next_callback: String,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Search results appear here

+

Fields§

§cursor: String

The cursor

+
§has_less: bool

Whether this has less?

+
§has_more: bool

Whether this has more?

+
§items: Vec<Value>

Deviation ids?

+

Usually, these are integers representing deviation ids. +In some cases, these are strings of the format “xx-nnnnn”, +where the “xx” part is unknown and the “nnnnn” part is a deviation id.

+
§items_per_fetch: u64

The # of items per page

+
§stream_params: StreamParams

Stream Params

+
§stream_type: String

The stream type

+
§stream_id: String

The stream id

+
§fetch_next_callback: String

?

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for BrowsePageStream

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BrowsePageStream

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.Config.html b/deviantart/types/scraped_webpage_info/struct.Config.html new file mode 100644 index 00000000..3acbed66 --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.Config.html @@ -0,0 +1,24 @@ +Config in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::Config

source ·
pub struct Config {
+    pub csrf_token: String,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

?

+

Fields§

§csrf_token: String

The page’s csrf token

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Config

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.DeviationExtended.html b/deviantart/types/scraped_webpage_info/struct.DeviationExtended.html new file mode 100644 index 00000000..93e5acce --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.DeviationExtended.html @@ -0,0 +1,26 @@ +DeviationExtended in deviantart::types::scraped_webpage_info - Rust
pub struct DeviationExtended {
+    pub download: Option<Download>,
+    pub description: Option<String>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Extended Info about a deviation

+

Fields§

§download: Option<Download>

Download info

+
§description: Option<String>

HTML description

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for DeviationExtended

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DeviationExtended

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.Download.html b/deviantart/types/scraped_webpage_info/struct.Download.html new file mode 100644 index 00000000..d20153d1 --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.Download.html @@ -0,0 +1,31 @@ +Download in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::Download

source ·
pub struct Download {
+    pub filesize: u64,
+    pub height: u32,
+    pub width: u32,
+    pub kind: String,
+    pub url: Url,
+    pub unknown: HashMap<String, Value>,
+}

Fields§

§filesize: u64

The file size

+
§height: u32

The image height

+
§width: u32

The image width

+
§kind: String

?

+
§url: Url

The url

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for Download

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Download

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.DuperBrowse.html b/deviantart/types/scraped_webpage_info/struct.DuperBrowse.html new file mode 100644 index 00000000..ce372304 --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.DuperBrowse.html @@ -0,0 +1,24 @@ +DuperBrowse in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::DuperBrowse

source ·
pub struct DuperBrowse {
+    pub root_stream: Option<RootStream>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

?

+

Fields§

§root_stream: Option<RootStream>

?

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for DuperBrowse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DuperBrowse

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.Entities.html b/deviantart/types/scraped_webpage_info/struct.Entities.html new file mode 100644 index 00000000..ef59f38b --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.Entities.html @@ -0,0 +1,26 @@ +Entities in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::Entities

source ·
pub struct Entities {
+    pub deviation: HashMap<String, Deviation>,
+    pub deviation_extended: Option<HashMap<String, DeviationExtended>>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

?

+

Fields§

§deviation: HashMap<String, Deviation>

Deviations

+
§deviation_extended: Option<HashMap<String, DeviationExtended>>

Extended Deviation Info

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for Entities

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Entities

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.PublicSession.html b/deviantart/types/scraped_webpage_info/struct.PublicSession.html new file mode 100644 index 00000000..d6f5ad55 --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.PublicSession.html @@ -0,0 +1,24 @@ +PublicSession in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::PublicSession

source ·
pub struct PublicSession {
+    pub is_logged_in: bool,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

?

+

Fields§

§is_logged_in: bool

Whether the user is logged in

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for PublicSession

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PublicSession

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.RootStream.html b/deviantart/types/scraped_webpage_info/struct.RootStream.html new file mode 100644 index 00000000..349ce26d --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.RootStream.html @@ -0,0 +1,24 @@ +RootStream in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::RootStream

source ·
pub struct RootStream {
+    pub current_open_item: Value,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

?

+

Fields§

§current_open_item: Value

The id of the current deviation. This is either a number or string.

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for RootStream

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RootStream

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.ScrapedWebPageInfo.html b/deviantart/types/scraped_webpage_info/struct.ScrapedWebPageInfo.html new file mode 100644 index 00000000..4fa03357 --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.ScrapedWebPageInfo.html @@ -0,0 +1,46 @@ +ScrapedWebPageInfo in deviantart::types::scraped_webpage_info - Rust
pub struct ScrapedWebPageInfo {
+    pub config: Config,
+    pub entities: Option<Entities>,
+    pub duper_browse: Option<DuperBrowse>,
+    pub public_session: PublicSession,
+    pub streams: Option<Streams>,
+    pub csrf_token: Option<Box<str>>,
+    pub lu_token: Option<Box<str>>,
+    pub lu_token2: Option<Box<str>>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Info scraped from a deviation url

+

Fields§

§config: Config

Page config like csrf tokens

+
§entities: Option<Entities>

Deviations extended deviations maybe?

+
§duper_browse: Option<DuperBrowse>

?

+
§public_session: PublicSession

Info about the current session

+
§streams: Option<Streams>

Streams

+
§csrf_token: Option<Box<str>>

Needed for login.

+

Note that this is a different csrf token from the config struct.

+
§lu_token: Option<Box<str>>

Needed for login.

+
§lu_token2: Option<Box<str>>

Needed for login.

+
§unknown: HashMap<String, Value>

Unknown data

+

Implementations§

source§

impl ScrapedWebPageInfo

source

pub fn from_html_str(input: &str) -> Result<Self, FromHtmlStrError>

Parse this from a html string

+
source

pub fn is_logged_in(&self) -> bool

Returns true if logged in

+
source

pub fn get_current_deviation_id(&self) -> Option<&Value>

Get the current deviation’s id

+
source

pub fn get_current_deviation(&self) -> Option<&Deviation>

Get the Deviation for this page.

+
source

pub fn get_current_deviation_extended(&self) -> Option<&DeviationExtended>

Get the DeviationExtended for this page.

+
source

pub fn get_deviation_by_id(&self, id: u64) -> Option<&Deviation>

Get a deviation by id, if it exists

+
source

pub fn take_deviation_by_id(&mut self, id: u64) -> Option<Deviation>

Take a deviation by id, if it exists

+

Trait Implementations§

source§

impl Debug for ScrapedWebPageInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ScrapedWebPageInfo

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.StreamParams.html b/deviantart/types/scraped_webpage_info/struct.StreamParams.html new file mode 100644 index 00000000..9d9094ec --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.StreamParams.html @@ -0,0 +1,30 @@ +StreamParams in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::StreamParams

source ·
pub struct StreamParams {
+    pub request_params: HashMap<String, String>,
+    pub item_type: String,
+    pub request_endpoint: String,
+    pub initial_offset: u64,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

Stream params

+

Fields§

§request_params: HashMap<String, String>

Request params

+
§item_type: String

?

+
§request_endpoint: String

?

+
§initial_offset: u64

?

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for StreamParams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StreamParams

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/scraped_webpage_info/struct.Streams.html b/deviantart/types/scraped_webpage_info/struct.Streams.html new file mode 100644 index 00000000..f6fcc09a --- /dev/null +++ b/deviantart/types/scraped_webpage_info/struct.Streams.html @@ -0,0 +1,24 @@ +Streams in deviantart::types::scraped_webpage_info - Rust

Struct deviantart::types::scraped_webpage_info::Streams

source ·
pub struct Streams {
+    pub browse_page_stream: Option<BrowsePageStream>,
+    pub unknown: HashMap<String, Value>,
+}
Expand description

The streams field

+

Fields§

§browse_page_stream: Option<BrowsePageStream>

Search results appear here

+
§unknown: HashMap<String, Value>

Unknown data

+

Trait Implementations§

source§

impl Debug for Streams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Streams

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart/types/sidebar-items.js b/deviantart/types/sidebar-items.js new file mode 100644 index 00000000..a68d143a --- /dev/null +++ b/deviantart/types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["deviation","oembed","scraped_stash_info","scraped_webpage_info"]}; \ No newline at end of file diff --git a/deviantart_cli/all.html b/deviantart_cli/all.html new file mode 100644 index 00000000..93b34344 --- /dev/null +++ b/deviantart_cli/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Functions

\ No newline at end of file diff --git a/deviantart_cli/commands/download/fn.download_film_cli.html b/deviantart_cli/commands/download/fn.download_film_cli.html new file mode 100644 index 00000000..e2905139 --- /dev/null +++ b/deviantart_cli/commands/download/fn.download_film_cli.html @@ -0,0 +1,4 @@ +download_film_cli in deviantart_cli::commands::download - Rust

Function deviantart_cli::commands::download::download_film_cli

source ·
async fn download_film_cli(
+    client: &Client,
+    current_deviation: &Deviation,
+) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/commands/download/fn.download_image_cli.html b/deviantart_cli/commands/download/fn.download_image_cli.html new file mode 100644 index 00000000..3d961dce --- /dev/null +++ b/deviantart_cli/commands/download/fn.download_image_cli.html @@ -0,0 +1,6 @@ +download_image_cli in deviantart_cli::commands::download - Rust

Function deviantart_cli::commands::download::download_image_cli

source ·
async fn download_image_cli(
+    client: &Client,
+    current_deviation: &Deviation,
+    current_deviation_extended: &DeviationExtended,
+    options: &Options,
+) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/commands/download/fn.download_literature_cli.html b/deviantart_cli/commands/download/fn.download_literature_cli.html new file mode 100644 index 00000000..5d534c0f --- /dev/null +++ b/deviantart_cli/commands/download/fn.download_literature_cli.html @@ -0,0 +1 @@ +download_literature_cli in deviantart_cli::commands::download - Rust
async fn download_literature_cli(current_deviation: &Deviation) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/commands/download/fn.execute.html b/deviantart_cli/commands/download/fn.execute.html new file mode 100644 index 00000000..1865b66c --- /dev/null +++ b/deviantart_cli/commands/download/fn.execute.html @@ -0,0 +1 @@ +execute in deviantart_cli::commands::download - Rust

Function deviantart_cli::commands::download::execute

source ·
pub async fn execute(client: Client, options: Options) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/commands/download/fn.write_html.html b/deviantart_cli/commands/download/fn.write_html.html new file mode 100644 index 00000000..2460a934 --- /dev/null +++ b/deviantart_cli/commands/download/fn.write_html.html @@ -0,0 +1,2 @@ +write_html in deviantart_cli::commands::download - Rust

Function deviantart_cli::commands::download::write_html

source ·
fn write_html<W>(title: &str, text_content: TextContext, html: W) -> Result<()>
where + W: Write,
\ No newline at end of file diff --git a/deviantart_cli/commands/download/index.html b/deviantart_cli/commands/download/index.html new file mode 100644 index 00000000..c0c86054 --- /dev/null +++ b/deviantart_cli/commands/download/index.html @@ -0,0 +1 @@ +deviantart_cli::commands::download - Rust

Module deviantart_cli::commands::download

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/deviantart_cli/commands/download/sidebar-items.js b/deviantart_cli/commands/download/sidebar-items.js new file mode 100644 index 00000000..086f4db6 --- /dev/null +++ b/deviantart_cli/commands/download/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["download_film_cli","download_image_cli","download_literature_cli","execute","write_html"],"struct":["Options"]}; \ No newline at end of file diff --git a/deviantart_cli/commands/download/struct.Options.html b/deviantart_cli/commands/download/struct.Options.html new file mode 100644 index 00000000..2855312d --- /dev/null +++ b/deviantart_cli/commands/download/struct.Options.html @@ -0,0 +1,26 @@ +Options in deviantart_cli::commands::download - Rust

Struct deviantart_cli::commands::download::Options

source ·
pub struct Options {
+    pub url: String,
+    pub allow_fullview: bool,
+    pub no_login: bool,
+}

Fields§

§url: String§allow_fullview: bool§no_login: bool

Trait Implementations§

source§

impl FromArgs for Options

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( + __cmd_name: &[&str], + __args: &[&str], +) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but +without the values of the options and arguments. This can be useful as a means to capture +anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl SubCommand for Options

source§

const COMMAND: &'static CommandInfo = _

Information about the subcommand.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> SubCommands for T
where + T: SubCommand,

§

const COMMANDS: &'static [&'static CommandInfo<'static>] = _

Info for the commands.
§

fn dynamic_commands() -> &'static [&'static CommandInfo<'static>]

Get a list of commands that are discovered at runtime.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart_cli/commands/index.html b/deviantart_cli/commands/index.html new file mode 100644 index 00000000..71195425 --- /dev/null +++ b/deviantart_cli/commands/index.html @@ -0,0 +1 @@ +deviantart_cli::commands - Rust

Module deviantart_cli::commands

source ·

Modules§

\ No newline at end of file diff --git a/deviantart_cli/commands/login/fn.execute.html b/deviantart_cli/commands/login/fn.execute.html new file mode 100644 index 00000000..9863428d --- /dev/null +++ b/deviantart_cli/commands/login/fn.execute.html @@ -0,0 +1 @@ +execute in deviantart_cli::commands::login - Rust

Function deviantart_cli::commands::login::execute

source ·
pub async fn execute(_client: Client, options: Options) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/commands/login/index.html b/deviantart_cli/commands/login/index.html new file mode 100644 index 00000000..88c243da --- /dev/null +++ b/deviantart_cli/commands/login/index.html @@ -0,0 +1 @@ +deviantart_cli::commands::login - Rust

Module deviantart_cli::commands::login

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/deviantart_cli/commands/login/sidebar-items.js b/deviantart_cli/commands/login/sidebar-items.js new file mode 100644 index 00000000..9e77e649 --- /dev/null +++ b/deviantart_cli/commands/login/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["execute"],"struct":["Options"]}; \ No newline at end of file diff --git a/deviantart_cli/commands/login/struct.Options.html b/deviantart_cli/commands/login/struct.Options.html new file mode 100644 index 00000000..878e6b09 --- /dev/null +++ b/deviantart_cli/commands/login/struct.Options.html @@ -0,0 +1,25 @@ +Options in deviantart_cli::commands::login - Rust

Struct deviantart_cli::commands::login::Options

source ·
pub struct Options {
+    pub username: String,
+    pub password: String,
+}

Fields§

§username: String§password: String

Trait Implementations§

source§

impl FromArgs for Options

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( + __cmd_name: &[&str], + __args: &[&str], +) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but +without the values of the options and arguments. This can be useful as a means to capture +anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl SubCommand for Options

source§

const COMMAND: &'static CommandInfo = _

Information about the subcommand.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> SubCommands for T
where + T: SubCommand,

§

const COMMANDS: &'static [&'static CommandInfo<'static>] = _

Info for the commands.
§

fn dynamic_commands() -> &'static [&'static CommandInfo<'static>]

Get a list of commands that are discovered at runtime.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart_cli/commands/search/fn.execute.html b/deviantart_cli/commands/search/fn.execute.html new file mode 100644 index 00000000..adb40522 --- /dev/null +++ b/deviantart_cli/commands/search/fn.execute.html @@ -0,0 +1 @@ +execute in deviantart_cli::commands::search - Rust

Function deviantart_cli::commands::search::execute

source ·
pub async fn execute(client: Client, options: Options) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/commands/search/index.html b/deviantart_cli/commands/search/index.html new file mode 100644 index 00000000..2e70b0b7 --- /dev/null +++ b/deviantart_cli/commands/search/index.html @@ -0,0 +1 @@ +deviantart_cli::commands::search - Rust

Module deviantart_cli::commands::search

source ·

Structs§

Functions§

\ No newline at end of file diff --git a/deviantart_cli/commands/search/sidebar-items.js b/deviantart_cli/commands/search/sidebar-items.js new file mode 100644 index 00000000..9e77e649 --- /dev/null +++ b/deviantart_cli/commands/search/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["execute"],"struct":["Options"]}; \ No newline at end of file diff --git a/deviantart_cli/commands/search/struct.Options.html b/deviantart_cli/commands/search/struct.Options.html new file mode 100644 index 00000000..6debbcaa --- /dev/null +++ b/deviantart_cli/commands/search/struct.Options.html @@ -0,0 +1,26 @@ +Options in deviantart_cli::commands::search - Rust

Struct deviantart_cli::commands::search::Options

source ·
pub struct Options {
+    pub query: String,
+    pub cursor: Option<String>,
+    pub no_login: bool,
+}

Fields§

§query: String§cursor: Option<String>§no_login: bool

Trait Implementations§

source§

impl FromArgs for Options

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( + __cmd_name: &[&str], + __args: &[&str], +) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but +without the values of the options and arguments. This can be useful as a means to capture +anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl SubCommand for Options

source§

const COMMAND: &'static CommandInfo = _

Information about the subcommand.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> SubCommands for T
where + T: SubCommand,

§

const COMMANDS: &'static [&'static CommandInfo<'static>] = _

Info for the commands.
§

fn dynamic_commands() -> &'static [&'static CommandInfo<'static>]

Get a list of commands that are discovered at runtime.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart_cli/commands/sidebar-items.js b/deviantart_cli/commands/sidebar-items.js new file mode 100644 index 00000000..5c31c163 --- /dev/null +++ b/deviantart_cli/commands/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["download","login","search"]}; \ No newline at end of file diff --git a/deviantart_cli/config/index.html b/deviantart_cli/config/index.html new file mode 100644 index 00000000..ef3462b0 --- /dev/null +++ b/deviantart_cli/config/index.html @@ -0,0 +1 @@ +deviantart_cli::config - Rust

Module deviantart_cli::config

source ·

Structs§

\ No newline at end of file diff --git a/deviantart_cli/config/sidebar-items.js b/deviantart_cli/config/sidebar-items.js new file mode 100644 index 00000000..4cadad77 --- /dev/null +++ b/deviantart_cli/config/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Config"]}; \ No newline at end of file diff --git a/deviantart_cli/config/struct.Config.html b/deviantart_cli/config/struct.Config.html new file mode 100644 index 00000000..37020ae7 --- /dev/null +++ b/deviantart_cli/config/struct.Config.html @@ -0,0 +1,22 @@ +Config in deviantart_cli::config - Rust

Struct deviantart_cli::config::Config

source ·
pub struct Config {
+    pub username: Option<String>,
+    pub password: Option<String>,
+}

Fields§

§username: Option<String>§password: Option<String>

Implementations§

source§

impl Config

source

pub fn new() -> Self

source

pub fn get_config_dir() -> Result<PathBuf>

source

pub fn get_config_path() -> Result<PathBuf>

source

pub async fn create_config_path() -> Result<()>

source

pub async fn save(&self) -> Result<()>

source

pub async fn load() -> Result<Self>

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Config

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Config

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/deviantart_cli/enum.SubCommand.html b/deviantart_cli/enum.SubCommand.html new file mode 100644 index 00000000..7450db7b --- /dev/null +++ b/deviantart_cli/enum.SubCommand.html @@ -0,0 +1,25 @@ +SubCommand in deviantart_cli - Rust

Enum deviantart_cli::SubCommand

source ·
pub(crate) enum SubCommand {
+    Login(Options),
+    Search(Options),
+    Download(Options),
+}

Variants§

§

Login(Options)

§

Search(Options)

§

Download(Options)

Trait Implementations§

source§

impl FromArgs for SubCommand

source§

fn from_args(command_name: &[&str], args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( + command_name: &[&str], + args: &[&str], +) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but +without the values of the options and arguments. This can be useful as a means to capture +anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl SubCommands for SubCommand

source§

const COMMANDS: &'static [&'static CommandInfo] = _

Info for the commands.
§

fn dynamic_commands() -> &'static [&'static CommandInfo<'static>]

Get a list of commands that are discovered at runtime.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart_cli/fn.async_main.html b/deviantart_cli/fn.async_main.html new file mode 100644 index 00000000..4c3ac15f --- /dev/null +++ b/deviantart_cli/fn.async_main.html @@ -0,0 +1 @@ +async_main in deviantart_cli - Rust

Function deviantart_cli::async_main

source ·
pub(crate) async fn async_main(options: Options) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/fn.get_cookie_file_path.html b/deviantart_cli/fn.get_cookie_file_path.html new file mode 100644 index 00000000..57cd7257 --- /dev/null +++ b/deviantart_cli/fn.get_cookie_file_path.html @@ -0,0 +1 @@ +get_cookie_file_path in deviantart_cli - Rust

Function deviantart_cli::get_cookie_file_path

source ·
pub(crate) fn get_cookie_file_path() -> Result<PathBuf>
\ No newline at end of file diff --git a/deviantart_cli/fn.load_config_cli.html b/deviantart_cli/fn.load_config_cli.html new file mode 100644 index 00000000..c303c8e4 --- /dev/null +++ b/deviantart_cli/fn.load_config_cli.html @@ -0,0 +1 @@ +load_config_cli in deviantart_cli - Rust

Function deviantart_cli::load_config_cli

source ·
pub(crate) async fn load_config_cli() -> Config
\ No newline at end of file diff --git a/deviantart_cli/fn.load_cookie_jar.html b/deviantart_cli/fn.load_cookie_jar.html new file mode 100644 index 00000000..f4302f53 --- /dev/null +++ b/deviantart_cli/fn.load_cookie_jar.html @@ -0,0 +1 @@ +load_cookie_jar in deviantart_cli - Rust

Function deviantart_cli::load_cookie_jar

source ·
pub(crate) async fn load_cookie_jar(client: &Client) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/fn.main.html b/deviantart_cli/fn.main.html new file mode 100644 index 00000000..f89b6aa3 --- /dev/null +++ b/deviantart_cli/fn.main.html @@ -0,0 +1 @@ +main in deviantart_cli - Rust

Function deviantart_cli::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/fn.real_main.html b/deviantart_cli/fn.real_main.html new file mode 100644 index 00000000..4adae323 --- /dev/null +++ b/deviantart_cli/fn.real_main.html @@ -0,0 +1 @@ +real_main in deviantart_cli - Rust

Function deviantart_cli::real_main

source ·
pub(crate) fn real_main(options: Options) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/fn.save_cookie_jar.html b/deviantart_cli/fn.save_cookie_jar.html new file mode 100644 index 00000000..7c41140e --- /dev/null +++ b/deviantart_cli/fn.save_cookie_jar.html @@ -0,0 +1 @@ +save_cookie_jar in deviantart_cli - Rust

Function deviantart_cli::save_cookie_jar

source ·
pub(crate) async fn save_cookie_jar(client: &Client) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/fn.try_signin_cli.html b/deviantart_cli/fn.try_signin_cli.html new file mode 100644 index 00000000..a0ae3545 --- /dev/null +++ b/deviantart_cli/fn.try_signin_cli.html @@ -0,0 +1,5 @@ +try_signin_cli in deviantart_cli - Rust

Function deviantart_cli::try_signin_cli

source ·
pub(crate) async fn try_signin_cli(
+    client: &Client,
+    username: Option<&str>,
+    password: Option<&str>,
+) -> Result<()>
\ No newline at end of file diff --git a/deviantart_cli/index.html b/deviantart_cli/index.html new file mode 100644 index 00000000..4a216ea5 --- /dev/null +++ b/deviantart_cli/index.html @@ -0,0 +1 @@ +deviantart_cli - Rust

Crate deviantart_cli

source ·

Modules§

Structs§

Enums§

Functions§

\ No newline at end of file diff --git a/deviantart_cli/sidebar-items.js b/deviantart_cli/sidebar-items.js new file mode 100644 index 00000000..5a5a3566 --- /dev/null +++ b/deviantart_cli/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["SubCommand"],"fn":["async_main","get_cookie_file_path","load_config_cli","load_cookie_jar","main","real_main","save_cookie_jar","try_signin_cli"],"mod":["commands","config","util"],"struct":["Options"]}; \ No newline at end of file diff --git a/deviantart_cli/struct.Options.html b/deviantart_cli/struct.Options.html new file mode 100644 index 00000000..0d690034 --- /dev/null +++ b/deviantart_cli/struct.Options.html @@ -0,0 +1,23 @@ +Options in deviantart_cli - Rust

Struct deviantart_cli::Options

source ·
pub(crate) struct Options {
+    pub(crate) subcommand: SubCommand,
+}

Fields§

§subcommand: SubCommand

Trait Implementations§

source§

impl FromArgs for Options

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( + __cmd_name: &[&str], + __args: &[&str], +) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but +without the values of the options and arguments. This can be useful as a means to capture +anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl TopLevelCommand for Options

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/deviantart_cli/util/fn.sanitize_path.html b/deviantart_cli/util/fn.sanitize_path.html new file mode 100644 index 00000000..5322eae6 --- /dev/null +++ b/deviantart_cli/util/fn.sanitize_path.html @@ -0,0 +1,2 @@ +sanitize_path in deviantart_cli::util - Rust

Function deviantart_cli::util::sanitize_path

source ·
pub fn sanitize_path(path: &str) -> String
Expand description

Sanitize the given path, returning a santized path with only valid chars.

+
\ No newline at end of file diff --git a/deviantart_cli/util/index.html b/deviantart_cli/util/index.html new file mode 100644 index 00000000..d452e351 --- /dev/null +++ b/deviantart_cli/util/index.html @@ -0,0 +1 @@ +deviantart_cli::util - Rust

Module deviantart_cli::util

source ·

Functions§

  • Sanitize the given path, returning a santized path with only valid chars.
\ No newline at end of file diff --git a/deviantart_cli/util/sidebar-items.js b/deviantart_cli/util/sidebar-items.js new file mode 100644 index 00000000..b3aa811f --- /dev/null +++ b/deviantart_cli/util/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["sanitize_path"]}; \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 00000000..1d28ca19 --- /dev/null +++ b/help.html @@ -0,0 +1 @@ +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/search-index.js b/search-index.js new file mode 100644 index 00000000..f8bfa78c --- /dev/null +++ b/search-index.js @@ -0,0 +1,6 @@ +var searchIndex = new Map(JSON.parse('[\ +["deviantart",{"t":"FPEEGPPPPPPPEPEEPPPFNNNNNNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCOEEEEECCCCFFFFFFFFOOOONNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNONNNNNONOOOOOOOONNNNOOONNNNONNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOFNNNNNNOONNNOOFGPPFFNNNNNNNNONNNOOOONNNNNNNNNNNNONNNNONONNNNNNNNNNNNNOOOOFFFFFFGPPFFFFFNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOONNNNNNNNNNNOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNOOOOOOOOOOONOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOO","n":["Client","CookieStore","Deviation","DeviationExtended","Error","InvalidScrapedStashInfo","InvalidScrapedWebPage","Json","MissingBrowsePageStream","MissingDeviation","MissingField","MissingStreams","OEmbed","Reqwest","ScrapedStashInfo","ScrapedWebPageInfo","SignInFailed","TokioJoin","Url","WrapBoxError","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","client","clone","clone_into","cookie_store","default","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","get_oembed","into","into","into","is_logged_in_online","load_json_cookies","new","new_with_user_agent","save_json_cookies","scrape_webpage","search","search_raw","sign_in","source","to_owned","to_string","to_string","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","types","name","Deviation","DeviationExtended","OEmbed","ScrapedStashInfo","ScrapedWebPageInfo","deviation","oembed","scraped_stash_info","scraped_webpage_info","Author","Block","Deviation","DeviationMedia","Html","Markup","MediaType","TextContext","b","base_uri","block_reasons","blocks","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","content","data","depth","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deviation_id","entity_map","excerpt","features","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","get_best_video_media_type","get_best_video_url","get_download_url","get_extension","get_fullview_media_type","get_fullview_url","get_gif_media_type","get_gif_url","get_image_download_url","get_markup","get_media_url","height","html","into","into","into","into","into","into","into","into","is_downloadable","is_film","is_fullview","is_gif","is_image","is_literature","is_new_deviant","is_video","key","kind","kind","kind","kind","markup","media","pretty_name","serialize","serialize","serialize","serialize","text","text_content","title","to_owned","to_owned","to_owned","to_owned","token","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","types","unknown","unknown","unknown","unknown","unknown","unknown","unknown","unknown","url","user_id","usericon","userid_uuid","username","width","OEmbed","borrow","borrow_mut","deserialize","fmt","from","into","thumbnail_url","title","try_from","try_into","type_id","unknown","url","Film","FromHtmlStrError","InvalidJson","MissingPageData","ScrapedStashInfo","Size","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","csrf","deserialize","deserialize","deserialize","deviation_height","deviation_width","deviationid","film","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from_html_str","get_best_size","height","into","into","into","into","sizes","source","src","to_string","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","unknown","unknown","unknown","width","BrowsePageStream","Config","DeviationExtended","Download","DuperBrowse","Entities","FromHtmlStrError","InvalidJson","MissingInitialState","PublicSession","RootStream","ScrapedWebPageInfo","StreamParams","Streams","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","browse_page_stream","config","csrf_token","csrf_token","current_open_item","cursor","description","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deviation","deviation_extended","download","duper_browse","entities","fetch_next_callback","filesize","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from_html_str","get_current_deviation","get_current_deviation_extended","get_current_deviation_id","get_deviation_by_id","has_less","has_more","height","initial_offset","into","into","into","into","into","into","into","into","into","into","into","into","is_logged_in","is_logged_in","item_type","items","items_per_fetch","kind","lu_token","lu_token2","public_session","request_endpoint","request_params","root_stream","source","stream_id","stream_params","stream_type","streams","take_deviation_by_id","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unknown","unknown","unknown","unknown","unknown","unknown","unknown","unknown","unknown","unknown","unknown","url","width"],"q":[[0,"deviantart"],[72,"deviantart::Error"],[73,"deviantart::types"],[82,"deviantart::types::deviation"],[237,"deviantart::types::oembed"],[251,"deviantart::types::scraped_stash_info"],[310,"deviantart::types::scraped_webpage_info"],[488,"deviantart::client"],[489,"core::fmt"],[490,"serde_json::error"],[491,"url::parser"],[492,"tokio::runtime::task::error"],[493,"reqwest::error"],[494,"core::result"],[495,"std::io"],[496,"core::marker"],[497,"core::option"],[498,"core::error"],[499,"alloc::string"],[500,"core::any"],[501,"serde::de"],[502,"url"],[503,"serde::ser"],[504,"serde_json::value"]],"i":[0,7,0,0,0,7,7,7,7,7,7,7,0,7,0,0,7,7,7,0,3,7,8,3,7,8,3,3,3,3,3,3,7,7,8,8,3,7,7,7,7,7,7,7,8,3,3,7,8,3,3,3,3,3,3,3,3,3,7,3,7,8,3,7,8,3,7,8,3,7,8,0,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,34,31,29,31,33,34,35,27,28,29,30,31,33,34,35,27,28,29,30,27,28,29,30,27,28,29,30,35,30,30,31,33,34,35,27,28,29,30,31,29,27,28,31,33,34,35,27,28,29,30,31,33,34,35,27,28,29,30,34,31,31,31,34,31,34,31,31,28,31,35,27,31,33,34,35,27,28,29,30,31,31,35,35,31,31,33,35,30,31,35,28,30,28,31,34,27,28,29,30,30,31,31,27,28,29,30,34,31,33,34,35,27,28,29,30,31,33,34,35,27,28,29,30,31,33,34,35,27,28,29,30,34,31,33,34,35,27,28,29,30,31,33,33,33,33,35,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,10,10,0,0,10,38,39,40,10,38,39,40,38,38,39,40,38,38,38,38,10,10,38,39,40,10,10,38,39,40,38,39,40,10,38,39,40,39,10,40,10,10,38,39,40,10,38,39,40,10,38,39,40,38,39,40,40,0,0,0,0,0,0,0,9,9,0,0,0,0,0,9,22,41,42,43,44,45,46,47,48,49,50,9,22,41,42,43,44,45,46,47,48,49,50,48,22,22,41,46,49,43,22,41,42,43,44,45,46,47,48,49,50,42,42,43,22,22,49,44,9,9,22,41,42,43,44,45,46,47,48,49,50,9,9,22,41,42,43,44,45,46,47,48,49,50,22,22,22,22,22,49,49,44,50,9,22,41,42,43,44,45,46,47,48,49,50,22,47,50,49,49,44,22,22,22,50,50,45,9,49,49,49,22,22,9,9,22,41,42,43,44,45,46,47,48,49,50,9,22,41,42,43,44,45,46,47,48,49,50,9,22,41,42,43,44,45,46,47,48,49,50,22,41,42,43,44,45,46,47,48,49,50,44,44],"f":"````````````````````{{{b{c}}}{{b{e}}}{}{}}00{{{b{dc}}}{{b{de}}}{}{}}00`{{{b{f}}}f}{{{b{c}}{b{de}}}h{}{}}`{{}f}{{{b{f}}{b{dj}}}l}{{{b{n}}{b{dj}}}l}0{{{b{A`}}{b{dj}}}l}0{cc{}}{Abn}1{Adn}{Afn}{Ahn}{Ajn}{Aln}6{{{b{f}}{b{An}}}{{Bb{B`n}}}}{ce{}{}}00{{{b{f}}}{{Bb{Bdn}}}}{{{b{f}}c}{{Bb{hn}}}{BfBh}}>{{{b{An}}}f}{{{b{f}}c}{{Bb{hn}}}{BjBh}}{{{b{f}}{b{An}}}{{Bb{Bln}}}}`{{{b{f}}{b{An}}{Bn{{b{An}}}}}{{Bb{Bln}}}}{{{b{f}}{b{An}}{b{An}}}{{Bb{hn}}}}{{{b{n}}}{{Bn{{b{C`}}}}}}{{{b{c}}}e{}{}}{{{b{c}}}Cb{}}0{c{{Bb{e}}}{}{}}00000{{{b{c}}}Cd{}}00```````````````````````{{{b{c}}}{{b{e}}}{}{}}0000000{{{b{dc}}}{{b{de}}}{}{}}0000000{{{b{Cf}}}Cf}{{{b{Ch}}}Ch}{{{b{Cj}}}Cj}{{{b{Cl}}}Cl}{{{b{c}}{b{de}}}h{}{}}000```{c{{Bb{Cn}}}D`}{c{{Bb{Db}}}D`}{c{{Bb{Dd}}}D`}{c{{Bb{Df}}}D`}{c{{Bb{Cf}}}D`}{c{{Bb{Ch}}}D`}{c{{Bb{Cj}}}D`}{c{{Bb{Cl}}}D`}````{{{b{Cn}}{b{dj}}}l}{{{b{Db}}{b{dj}}}l}{{{b{Dd}}{b{dj}}}l}{{{b{Df}}{b{dj}}}l}{{{b{Cf}}{b{dj}}}l}{{{b{Ch}}{b{dj}}}l}{{{b{Cj}}{b{dj}}}l}{{{b{Cl}}{b{dj}}}l}{cc{}}0000000{{{b{Dd}}}{{Bn{{b{Df}}}}}}{{{b{Cn}}}{{Bn{{b{Dh}}}}}}{{{b{Cn}}}{{Bn{Dh}}}}{{{b{Cn}}}{{Bn{{b{An}}}}}}31311{{{b{Ch}}}{{Bn{{Bb{CjAf}}}}}}2``{ce{}{}}0000000`{{{b{Cn}}}Bd}{{{b{Df}}}Bd}011`0````````{{{b{Cf}}c}BbDj}{{{b{Ch}}c}BbDj}{{{b{Cj}}c}BbDj}{{{b{Cl}}c}BbDj}```{{{b{c}}}e{}{}}000`{c{{Bb{e}}}{}{}}000000000000000{{{b{c}}}Cd{}}0000000````````````````{{{b{c}}}{{b{e}}}{}{}}{{{b{dc}}}{{b{de}}}{}{}}{c{{Bb{B`}}}D`}{{{b{B`}}{b{dj}}}l}{cc{}}>``665````````44443333`{c{{Bb{Dl}}}D`}{c{{Bb{Dn}}}D`}{c{{Bb{E`}}}D`}````{{{b{Ad}}{b{dj}}}l}0{{{b{Dl}}{b{dj}}}l}{{{b{Dn}}{b{dj}}}l}{{{b{E`}}{b{dj}}}l}{AfAd}8888{{{b{An}}}{{Bb{DlAd}}}}{{{b{Dn}}}{{Bn{{b{E`}}}}}}`{ce{}{}}000`{{{b{Ad}}}{{Bn{{b{C`}}}}}}`{{{b{c}}}Cb{}}{c{{Bb{e}}}{}{}}0000000{{{b{c}}}Cd{}}000``````````````````{{{b{c}}}{{b{e}}}{}{}}00000000000{{{b{dc}}}{{b{de}}}{}{}}00000000000```````{c{{Bb{Bl}}}D`}{c{{Bb{Eb}}}D`}{c{{Bb{Ed}}}D`}{c{{Bb{Ef}}}D`}{c{{Bb{Eh}}}D`}{c{{Bb{Ej}}}D`}{c{{Bb{El}}}D`}{c{{Bb{En}}}D`}{c{{Bb{F`}}}D`}{c{{Bb{Fb}}}D`}{c{{Bb{Fd}}}D`}```````{{{b{Ab}}{b{dj}}}l}0{{{b{Bl}}{b{dj}}}l}{{{b{Eb}}{b{dj}}}l}{{{b{Ed}}{b{dj}}}l}{{{b{Ef}}{b{dj}}}l}{{{b{Eh}}{b{dj}}}l}{{{b{Ej}}{b{dj}}}l}{{{b{El}}{b{dj}}}l}{{{b{En}}{b{dj}}}l}{{{b{F`}}{b{dj}}}l}{{{b{Fb}}{b{dj}}}l}{{{b{Fd}}{b{dj}}}l}{AfAb}{cc{}}00000000000{{{b{An}}}{{Bb{BlAb}}}}{{{b{Bl}}}{{Bn{{b{Cn}}}}}}{{{b{Bl}}}{{Bn{{b{Ef}}}}}}{{{b{Bl}}}{{Bn{{b{Ff}}}}}}{{{b{Bl}}Fh}{{Bn{{b{Cn}}}}}}````{ce{}{}}00000000000{{{b{Bl}}}Bd}```````````{{{b{Ab}}}{{Bn{{b{C`}}}}}}````{{{b{dBl}}Fh}{{Bn{Cn}}}}{{{b{c}}}Cb{}}{c{{Bb{e}}}{}{}}00000000000000000000000{{{b{c}}}Cd{}}00000000000`````````````","D":"ANj","p":[[1,"reference"],[0,"mut"],[5,"Client",0,488],[1,"unit"],[5,"Formatter",489],[8,"Result",489],[6,"Error",0],[5,"WrapBoxError",0],[6,"FromHtmlStrError",310],[6,"FromHtmlStrError",251],[5,"Error",490],[6,"ParseError",491],[5,"JoinError",492],[5,"Error",493],[1,"str"],[5,"OEmbed",237],[6,"Result",494],[1,"bool"],[10,"BufRead",495],[10,"Send",496],[10,"Write",495],[5,"ScrapedWebPageInfo",310],[6,"Option",497],[10,"Error",498],[5,"String",499],[5,"TypeId",500],[5,"TextContext",82],[5,"Html",82],[5,"Markup",82],[5,"Block",82],[5,"Deviation",82],[10,"Deserializer",501],[5,"Author",82],[5,"DeviationMedia",82],[5,"MediaType",82],[5,"Url",502],[10,"Serializer",503],[5,"ScrapedStashInfo",251],[5,"Film",251],[5,"Size",251],[5,"Config",310],[5,"Entities",310],[5,"DeviationExtended",310],[5,"Download",310],[5,"DuperBrowse",310],[5,"RootStream",310],[5,"PublicSession",310],[5,"Streams",310],[5,"BrowsePageStream",310],[5,"StreamParams",310],[6,"Value",504],[1,"u64"],[15,"MissingField",72]],"r":[[0,488],[2,82],[3,310],[12,237],[14,251],[15,310],[73,82],[74,310],[75,237],[76,251],[77,310]],"b":[[32,"impl-Display-for-Error"],[33,"impl-Debug-for-Error"],[34,"impl-Display-for-WrapBoxError"],[35,"impl-Debug-for-WrapBoxError"],[37,"impl-From%3CFromHtmlStrError%3E-for-Error"],[39,"impl-From%3CFromHtmlStrError%3E-for-Error"],[40,"impl-From%3CError%3E-for-Error"],[41,"impl-From%3CParseError%3E-for-Error"],[42,"impl-From%3CJoinError%3E-for-Error"],[43,"impl-From%3CError%3E-for-Error"],[273,"impl-Debug-for-FromHtmlStrError"],[274,"impl-Display-for-FromHtmlStrError"],[373,"impl-Debug-for-FromHtmlStrError"],[374,"impl-Display-for-FromHtmlStrError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAPMAIAAAAAAAAwABAA0AAAAPAAEAFQAFABwAAQAfAAUAJgAAACgABAA7AAwASgAEAFMAAABfABcAegAHAIYABwC3AAAAuwADAMIAAwDHABcA7wADAPcAAgACAQcACwECABIBBQAkAQAAJgEMADoBAABFARcAZAEKAHYBDQCxAQAAtwEkAA=="}],\ +["deviantart_cli",{"t":"PPFPGHNNNNCCNNNNHNNHHHHNNHONNNNHNNCCCCFONNHHHHNNNONNNNOHFNNHNNNONNNNOFNNOHNNNOONNNNFNNNNNNNNNNNONNNNNOH","n":["Download","Login","Options","Search","SubCommand","async_main","borrow","borrow","borrow_mut","borrow_mut","commands","config","from","from","from_args","from_args","get_cookie_file_path","into","into","load_config_cli","load_cookie_jar","main","real_main","redact_arg_values","redact_arg_values","save_cookie_jar","subcommand","try_from","try_from","try_into","try_into","try_signin_cli","type_id","type_id","util","download","login","search","Options","allow_fullview","borrow","borrow_mut","download_film_cli","download_image_cli","download_literature_cli","execute","from","from_args","into","no_login","redact_arg_values","try_from","try_into","type_id","url","write_html","Options","borrow","borrow_mut","execute","from","from_args","into","password","redact_arg_values","try_from","try_into","type_id","username","Options","borrow","borrow_mut","cursor","execute","from","from_args","into","no_login","query","redact_arg_values","try_from","try_into","type_id","Config","borrow","borrow_mut","create_config_path","deserialize","fmt","from","get_config_dir","get_config_path","into","load","new","password","save","serialize","try_from","try_into","type_id","username","sanitize_path"],"q":[[0,"deviantart_cli"],[35,"deviantart_cli::commands"],[38,"deviantart_cli::commands::download"],[56,"deviantart_cli::commands::login"],[69,"deviantart_cli::commands::search"],[83,"deviantart_cli::config"],[102,"deviantart_cli::util"],[103,"anyhow"],[104,"argh"],[105,"core::result"],[106,"std::path"],[107,"deviantart::client"],[108,"alloc::string"],[109,"alloc::vec"],[110,"core::option"],[111,"core::any"],[112,"deviantart::types::deviation"],[113,"deviantart::types::scraped_webpage_info"],[114,"std::io"],[115,"serde::de"],[116,"core::fmt"],[117,"serde::ser"]],"i":[10,10,0,10,0,0,1,10,1,10,0,0,1,10,1,10,0,1,10,0,0,0,0,1,10,0,1,1,10,1,10,0,1,10,0,0,0,0,0,20,20,20,0,0,0,0,20,20,20,20,20,20,20,20,20,0,0,23,23,0,23,23,23,23,23,23,23,23,23,0,24,24,24,0,24,24,24,24,24,24,24,24,24,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0],"f":"`````{b{{f{d}}}}{{{h{c}}}{{h{e}}}{}{}}0{{{h{jc}}}{{h{je}}}{}{}}0``{cc{}}0{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{bA`}}}}{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{AdA`}}}}{{}{{f{Af}}}}{ce{}{}}0{{}Ah}{{{h{Aj}}}{{f{d}}}}{{}{{f{d}}}}:{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{{An{Al}}A`}}}}02`{c{{Ab{e}}}{}{}}000{{{h{Aj}}{B`{{h{l}}}}{B`{{h{l}}}}}{{f{d}}}}{{{h{c}}}Bb{}}0``````=<{{{h{Aj}}{h{Bd}}}{{f{d}}}}{{{h{Aj}}{h{Bd}}{h{Bf}}{h{Bh}}}{{f{d}}}}{{{h{Bd}}}{{f{d}}}}{{AjBh}{{f{d}}}}?{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{BhA`}}}}<`8775`{{{h{l}}Bjc}{{f{d}}}Bl}`{{{h{c}}}{{h{e}}}{}{}}{{{h{jc}}}{{h{je}}}{}{}}{{AjBn}{{f{d}}}}{cc{}}{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{BnA`}}}}{ce{}{}}`?>><``54`{{AjC`}{{f{d}}}}3{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{C`A`}}}}2``{{{h{{n{{h{l}}}}}}{h{{n{{h{l}}}}}}}{{Ab{{An{Al}}A`}}}}{c{{Ab{e}}}{}{}}0{{{h{c}}}Bb{}}`:9{{}{{f{d}}}}{c{{Ab{Ah}}}Cb}{{{h{Ah}}{h{jCd}}}Cf}:{{}{{f{Af}}}}09{{}{{f{Ah}}}}{{}Ah}`{{{h{Ah}}}{{f{d}}}}{{{h{Ah}}c}AbCh}998`{{{h{l}}}Al}","D":"Aj","p":[[5,"Options",0],[1,"unit"],[8,"Result",103],[1,"reference"],[0,"mut"],[1,"str"],[1,"slice"],[5,"EarlyExit",104],[6,"Result",105],[6,"SubCommand",0],[5,"PathBuf",106],[5,"Config",83],[5,"Client",107],[5,"String",108],[5,"Vec",109],[6,"Option",110],[5,"TypeId",111],[5,"Deviation",112],[5,"DeviationExtended",113],[5,"Options",38],[5,"TextContext",112],[10,"Write",114],[5,"Options",56],[5,"Options",69],[10,"Deserializer",115],[5,"Formatter",116],[8,"Result",116],[10,"Serializer",117]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAFoACwAAAAwADwACABQAGgAwAAAAMgAKAD4AAABAAAoATAAAAE4ACwBbAAEAXgAIAA=="}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/search.desc/deviantart/deviantart-desc-0-.js b/search.desc/deviantart/deviantart-desc-0-.js new file mode 100644 index 00000000..c4b6dee9 --- /dev/null +++ b/search.desc/deviantart/deviantart-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("deviantart", 0, "A DeviantArt Client\nA cookie store error occured\nLibrary Error\nScraped Stash info was invalid\nA scraped web page was invalid\nJson failed to parse\nMissing the browse page stream\nMissing the Deviation of the given id\nMissing a field\nMissing the streams field\nReqwest HTTP Error\nSigning in failed for an unspecified reason\nA tokio task failed to join\nInvalid Url\nA wrapper over a …\nThe inner http client.\nThe cookie store.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nOEmbed API\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nRun a GET request on the home page and check if the user …\nLoad the cookie store from a json reader.\nMake a new Client.\nMake a new Client with the given user agent.\nSave the cookie store from a json writer.\nScrape a webpage for info.\nRun a search\nRun a search using the low level api\nSign in to get access to more results from apis.\nAPI types\nThe missing field name\nThe Deviation type.\nThe OEmbed type\nThe ScrapedStashInfo type.\nThe ScrapedWebPageInfo type.\nA Markup block\nA Deviation\nThe media field of a Deviation.\nText Context html\nText Context Html Markup\nDeviantArt DeviationMedia media type.\nText Content for literature\n? ?\nThe base uri\nDeviantArt Author ?\nBlocks of marked-up text\nThe content. A uri used with base_uri.\n?\n?\nDeviation ID\n?\nExcerpt of text\n?\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nTry to get the video MediaType\nGet the best video url\nGet the “download” url for this Deviation.\nTry to get the original extension of this Deviation\nTry to get the fullview MediaType.\nGet the fullview url for this Deviation.\nTry to get the gif MediaType.\nGet the GIF url for this Deviation.\nGet the most “fitting” url to download an image.\nTry to parse the markup field\nGet the media url for this Deviation.\nImage Height\nHtml data\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nWhether this is downloadable\nWhether this is a film\nWhether this is the fullview\nWhether this is a gif\nWhether this is an image\nWhether this is literature\nis the user new\nWhether this is a video\n?\nDeviation Type\n? The kind of media\nThe kind of text data\nText markup data\nMedia Info\nPretty Name\nText data\nText content for literature\nTitle\nImage token\nTypes\nUnknown K/Vs\nUnknown K/Vs\nUnknown K/Vs\nUnknown K/Vs\nUnknown K/Vs\nUnknown K/Vs\nUnknown K/Vs\nUnknown K/Vs\nImage Url\nUser ID\nUser icon url\nUser UUID\nUsername\nImage Width\nDeviantArt OEmbed\nReturns the argument unchanged.\nCalls U::from(self).\nUrl of the thumbnail\nTitle\nUnknown K/Vs\nUrl of the asset\nFilm data from a sta.sh link\nAn error that may occur while parsing a ScrapedStashInfo …\nFailed to parse json\nMissing the pageData variable\nScraped info from a sta.sh link\nFilm size\nCsrf token\nThe height\nThe width\n?\nPresent only if it is a video\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nParse this from a html str\nGet the best size\nVideo height\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nVideo sizes\nVideo src\nUnknown data\nUnknown data\nUnknown data\nVideo width\nSearch results appear here\n?\nExtended Info about a deviation\n?\n?\nAn error that may occur while parsing a ScrapedWebPageInfo …\nFailed to parse some state\nMissing the InitialState variable\n?\n?\nInfo scraped from a deviation url\nStream params\nThe streams field\nSearch results appear here\nPage config like csrf tokens\nNeeded for login.\nThe page’s csrf token\nThe id of the current deviation. This is either a number …\nThe cursor\nHTML description\nDeviations\nExtended Deviation Info\nDownload info\n?\nDeviations extended deviations maybe?\n?\nThe file size\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nParse this from a html string\nGet the Deviation for this page.\nGet the DeviationExtended for this page.\nGet the current deviation’s id\nGet a deviation by id, if it exists\nWhether this has less?\nWhether this has more?\nThe image height\n?\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true if logged in\nWhether the user is logged in\n?\nDeviation ids?\nThe # of items per page\n?\nNeeded for login.\nNeeded for login.\nInfo about the current session\n?\nRequest params\n?\nThe stream id\nStream Params\nThe stream type\nStreams\nTake a deviation by id, if it exists\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nUnknown data\nThe url\nThe image width") \ No newline at end of file diff --git a/search.desc/deviantart_cli/deviantart_cli-desc-0-.js b/search.desc/deviantart_cli/deviantart_cli-desc-0-.js new file mode 100644 index 00000000..81319bec --- /dev/null +++ b/search.desc/deviantart_cli/deviantart_cli-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("deviantart_cli", 0, "Returns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nSanitize the given path, returning a santized path with …") \ No newline at end of file diff --git a/settings.html b/settings.html new file mode 100644 index 00000000..6236a743 --- /dev/null +++ b/settings.html @@ -0,0 +1 @@ +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 00000000..24ba1584 --- /dev/null +++ b/src-files.js @@ -0,0 +1,5 @@ +var srcIndex = new Map(JSON.parse('[\ +["deviantart",["",[["types",[],["deviation.rs","oembed.rs","scraped_stash_info.rs","scraped_webpage_info.rs"]]],["client.rs","lib.rs","types.rs"]]],\ +["deviantart_cli",["",[["commands",[],["download.rs","login.rs","search.rs"]]],["commands.rs","config.rs","main.rs","util.rs"]]]\ +]')); +createSrcSidebar(); diff --git a/src/deviantart/client.rs.html b/src/deviantart/client.rs.html new file mode 100644 index 00000000..545a7a8c --- /dev/null +++ b/src/deviantart/client.rs.html @@ -0,0 +1,1063 @@ +client.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+
use crate::Deviation;
+use crate::Error;
+use crate::OEmbed;
+use crate::ScrapedWebPageInfo;
+use crate::WrapBoxError;
+use reqwest::header::HeaderMap;
+use reqwest::header::HeaderValue;
+use reqwest_cookie_store::CookieStoreMutex;
+use std::sync::Arc;
+use url::Url;
+
+const USER_AGENT_STR: &str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36";
+static ACCEPT_LANGUAGE_VALUE: HeaderValue = HeaderValue::from_static("en,en-US;q=0,5");
+static ACCEPT_VALUE: HeaderValue = HeaderValue::from_static("*/*");
+static REFERER_VALUE: HeaderValue = HeaderValue::from_static(HOME_URL);
+
+const HOME_URL: &str = "https://www.deviantart.com/";
+const LOGIN_URL: &str = "https://www.deviantart.com/users/login";
+
+/// A DeviantArt Client
+#[derive(Debug, Clone)]
+pub struct Client {
+    /// The inner http client.
+    ///
+    /// You probably shouldn't touch this.
+    pub client: reqwest::Client,
+
+    /// The cookie store.
+    pub cookie_store: Arc<CookieStoreMutex>,
+}
+
+impl Client {
+    /// Make a new [`Client`].
+    pub fn new() -> Self {
+        Self::new_with_user_agent(USER_AGENT_STR)
+    }
+
+    /// Make a new [`Client`] with the given user agent.
+    pub fn new_with_user_agent(user_agent: &str) -> Self {
+        let mut default_headers = HeaderMap::new();
+        default_headers.insert(
+            reqwest::header::ACCEPT_LANGUAGE,
+            ACCEPT_LANGUAGE_VALUE.clone(),
+        );
+        default_headers.insert(reqwest::header::ACCEPT, ACCEPT_VALUE.clone());
+        default_headers.insert(reqwest::header::REFERER, REFERER_VALUE.clone());
+
+        let cookie_store = Arc::new(CookieStoreMutex::new(Default::default()));
+        let client = reqwest::Client::builder()
+            .cookie_provider(cookie_store.clone())
+            .user_agent(user_agent)
+            .default_headers(default_headers)
+            .build()
+            .expect("failed to build deviantart client");
+
+        Client {
+            client,
+            cookie_store,
+        }
+    }
+
+    /// Load the cookie store from a json reader.
+    pub async fn load_json_cookies<R>(&self, reader: R) -> Result<(), Error>
+    where
+        R: std::io::BufRead + Send + 'static,
+    {
+        let cookie_store = self.cookie_store.clone();
+        tokio::task::spawn_blocking(move || {
+            let new_cookie_store = reqwest_cookie_store::CookieStore::load_json(reader)
+                .map_err(|e| Error::CookieStore(WrapBoxError(e)))?;
+            let mut cookie_store = cookie_store.lock().expect("cookie store is poisoned");
+            *cookie_store = new_cookie_store;
+            Ok(())
+        })
+        .await?
+    }
+
+    /// Save the cookie store from a json writer.
+    pub async fn save_json_cookies<W>(&self, mut writer: W) -> Result<(), Error>
+    where
+        W: std::io::Write + Send + 'static,
+    {
+        let cookie_store = self.cookie_store.clone();
+        tokio::task::spawn_blocking(move || {
+            let cookie_store = cookie_store.lock().expect("cookie store is poisoned");
+            cookie_store
+                .save_json(&mut writer)
+                .map_err(|e| Error::CookieStore(WrapBoxError(e)))?;
+            Ok(())
+        })
+        .await?
+    }
+
+    /// Scrape a webpage for info.
+    pub async fn scrape_webpage(&self, url: &str) -> Result<ScrapedWebPageInfo, Error> {
+        let text = self
+            .client
+            .get(url)
+            .send()
+            .await?
+            .error_for_status()?
+            .text()
+            .await?;
+
+        let scraped_webpage =
+            tokio::task::spawn_blocking(move || ScrapedWebPageInfo::from_html_str(&text)).await??;
+
+        Ok(scraped_webpage)
+    }
+
+    /// Sign in to get access to more results from apis.
+    ///
+    /// This will also clean the cookie jar.
+    pub async fn sign_in(&self, username: &str, password: &str) -> Result<(), Error> {
+        // Clean the jar of expired cookies
+        {
+            let mut cookie_store = self.cookie_store.lock().expect("cookie store is poisoned");
+
+            // We need to allocate here as the cookie_store iter cannot be alive when we try to remove items from the cookie store.
+            let to_remove: Vec<_> = cookie_store
+                .iter_any()
+                .filter(|cookie| cookie.is_expired())
+                .map(|cookie| {
+                    let domain = cookie.domain().unwrap_or("");
+                    let name = cookie.name();
+                    let path = cookie.path().unwrap_or("");
+
+                    (domain.to_string(), name.to_string(), path.to_string())
+                })
+                .collect();
+
+            for (domain, name, path) in to_remove {
+                cookie_store.remove(&domain, &name, &path);
+            }
+        }
+
+        // Initial req to login page.
+        let login_page = self.scrape_webpage(LOGIN_URL).await?;
+        let login_page_csrf_token = login_page
+            .csrf_token
+            .as_deref()
+            .ok_or(Error::MissingField { name: "csrfToken" })?;
+        let login_page_lu_token = login_page
+            .lu_token
+            .as_deref()
+            .ok_or(Error::MissingField { name: "luToken" })?;
+
+        // Get the password input page.
+        // The username and password inputs are on different pages.
+        let password_page_text = self
+            .client
+            .post("https://www.deviantart.com/_sisu/do/step2")
+            .form(&[
+                ("referer", LOGIN_URL),
+                ("referer_type", ""),
+                ("csrf_token", login_page_csrf_token),
+                ("challenge", "0"),
+                ("lu_token", login_page_lu_token),
+                ("username", username),
+                ("remember", "on"),
+            ])
+            .send()
+            .await?
+            .error_for_status()?
+            .text()
+            .await?;
+        let password_page = tokio::task::spawn_blocking(move || {
+            ScrapedWebPageInfo::from_html_str(&password_page_text)
+        })
+        .await??;
+        let password_page_csrf_token = password_page
+            .csrf_token
+            .as_deref()
+            .ok_or(Error::MissingField { name: "csrfToken" })?;
+        let password_page_lu_token = password_page
+            .lu_token
+            .as_deref()
+            .ok_or(Error::MissingField { name: "luToken" })?;
+        let password_page_lu_token2 = password_page
+            .lu_token2
+            .as_deref()
+            .ok_or(Error::MissingField { name: "luToken2" })?;
+
+        // Submit password
+        let signin_url = "https://www.deviantart.com/_sisu/do/signin";
+        let response = self
+            .client
+            .post(signin_url)
+            .form(&[
+                ("referer", signin_url),
+                ("referer_type", ""),
+                ("csrf_token", password_page_csrf_token),
+                ("challenge", "0"),
+                ("lu_token", password_page_lu_token),
+                ("lu_token2", password_page_lu_token2),
+                ("username", ""),
+                ("password", password),
+                ("remember", "on"),
+            ])
+            .send()
+            .await?
+            .error_for_status()?;
+
+        let text = response.text().await?;
+        let scraped_webpage =
+            tokio::task::spawn_blocking(move || ScrapedWebPageInfo::from_html_str(&text)).await??;
+        if !scraped_webpage.is_logged_in() {
+            return Err(Error::SignInFailed);
+        }
+
+        Ok(())
+    }
+
+    /// Run a GET request on the home page and check if the user is logged in
+    pub async fn is_logged_in_online(&self) -> Result<bool, Error> {
+        Ok(self.scrape_webpage(HOME_URL).await?.is_logged_in())
+    }
+
+    /// OEmbed API
+    pub async fn get_oembed(&self, url: &str) -> Result<OEmbed, Error> {
+        let url = Url::parse_with_params("https://backend.deviantart.com/oembed", &[("url", url)])?;
+        let res = self
+            .client
+            .get(url.as_str())
+            .send()
+            .await?
+            .error_for_status()?
+            .json()
+            .await?;
+        Ok(res)
+    }
+
+    /// Run a search using the low level api
+    pub async fn search_raw(
+        &self,
+        query: &str,
+        cursor: Option<&str>,
+    ) -> Result<ScrapedWebPageInfo, Error> {
+        let mut url = Url::parse_with_params("https://www.deviantart.com/search", &[("q", query)])?;
+        {
+            let mut query_pairs = url.query_pairs_mut();
+            if let Some(cursor) = cursor {
+                query_pairs.append_pair("cursor", cursor);
+            }
+        }
+
+        self.scrape_webpage(url.as_str()).await
+    }
+
+    /// Run a search
+    pub fn search(&self, query: &str, cursor: Option<&str>) -> SearchCursor {
+        SearchCursor::new(self.clone(), query, cursor)
+    }
+}
+
+impl Default for Client {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+#[derive(Debug)]
+pub struct SearchCursor {
+    /// The client
+    client: Client,
+
+    /// The current page
+    page: Option<ScrapedWebPageInfo>,
+
+    /// the query
+    query: String,
+    /// the cursor
+    cursor: Option<String>,
+}
+
+impl SearchCursor {
+    /// Make a new Search Cursor
+    pub fn new(client: Client, query: &str, cursor: Option<&str>) -> Self {
+        Self {
+            client,
+
+            page: None,
+
+            query: query.into(),
+            cursor: cursor.map(|c| c.into()),
+        }
+    }
+
+    /// Get the current page of deviations
+    pub fn current_deviations(&self) -> Option<Result<Vec<&Deviation>, Error>> {
+        let page = self.page.as_ref()?;
+
+        let browse_page_stream = page
+            .streams
+            .as_ref()
+            .unwrap()
+            .browse_page_stream
+            .as_ref()
+            .unwrap();
+
+        Some(
+            browse_page_stream
+                .items
+                .iter()
+                .filter_map(|id| {
+                    // TODO: Investigate string format more.
+                    id.as_u64()
+                })
+                .map(|id| {
+                    page.get_deviation_by_id(id)
+                        .ok_or(Error::MissingDeviation(id))
+                })
+                .collect(),
+        )
+    }
+
+    /// Take the current page of deviations
+    pub fn take_current_deviations(&mut self) -> Option<Result<Vec<Deviation>, Error>> {
+        let mut page = self.page.take()?;
+
+        let browse_page_stream = page
+            .streams
+            .as_mut()
+            .unwrap()
+            .browse_page_stream
+            .as_mut()
+            .unwrap();
+
+        let items = std::mem::take(&mut browse_page_stream.items);
+        Some(
+            items
+                .iter()
+                .filter_map(|id| {
+                    // TODO: Investigate string format more.
+                    id.as_u64()
+                })
+                .map(|id| {
+                    page.take_deviation_by_id(id)
+                        .ok_or(Error::MissingDeviation(id))
+                })
+                .collect(),
+        )
+    }
+
+    /// Get the next page, updating the internal cursor.
+    pub async fn next_page(&mut self) -> Result<(), Error> {
+        let page = self
+            .client
+            .search_raw(&self.query, self.cursor.as_deref())
+            .await?;
+        // Validate before storing
+        match page
+            .streams
+            .as_ref()
+            .ok_or(Error::MissingStreams)?
+            .browse_page_stream
+            .as_ref()
+        {
+            Some(browse_page_stream) => {
+                self.cursor = Some(browse_page_stream.cursor.clone());
+            }
+            None => {
+                return Err(Error::MissingBrowsePageStream);
+            }
+        }
+        self.page = Some(page);
+
+        Ok(())
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    /// The default test config path
+    ///
+    /// Update this if this crate is moved to a different directory relative to the workspace Cargo.toml.
+    const DEFAULT_CONFIG_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../", "config.json");
+
+    #[derive(serde::Deserialize)]
+    struct Config {
+        username: String,
+        password: String,
+    }
+
+    impl Config {
+        fn from_path(path: &str) -> Option<Config> {
+            let file = match std::fs::read(path) {
+                Ok(file) => file,
+                Err(error) if error.kind() == std::io::ErrorKind::NotFound => {
+                    return None;
+                }
+                Err(error) => panic!("failed to read file: {error}"),
+            };
+            let config = serde_json::from_reader(file.as_slice()).expect("failed to parse config");
+            Some(config)
+        }
+
+        fn from_env() -> Option<Self> {
+            let username = std::env::var_os("DEVIANTART_RS_USERNAME")?
+                .into_string()
+                .expect("invalid `DEVIANTART_RS_USERNAME`");
+            let password = std::env::var_os("DEVIANTART_RS_PASSWORD")?
+                .into_string()
+                .expect("invalid `DEVIANTART_RS_PASSWORD`");
+
+            Some(Self { username, password })
+        }
+
+        fn from_any(path: &str) -> Self {
+            Self::from_env()
+                .or_else(|| Self::from_path(path))
+                .expect("failed to load config from env or path")
+        }
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn scrape_deviation() {
+        let client = Client::new();
+        let _scraped_webpage = client
+            .scrape_webpage("https://www.deviantart.com/zilla774/art/chaos-gerbil-RAWR-119577071")
+            .await
+            .expect("failed to scrape webpage");
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn sign_in_works() {
+        let config: Config = Config::from_any(DEFAULT_CONFIG_PATH);
+
+        let client = Client::new();
+        client
+            .sign_in(&config.username, &config.password)
+            .await
+            .expect("failed to sign in");
+        let is_online = client
+            .is_logged_in_online()
+            .await
+            .expect("failed to check if online");
+        assert!(is_online);
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn scrape_webpage_literature() {
+        let client = Client::new();
+        let scraped_webpage = client
+            .scrape_webpage("https://www.deviantart.com/tohokari-steel/art/A-Fictorian-Tale-Chapter-11-879180914")
+            .await
+            .expect("failed to scrape webpage");
+        let current_deviation = scraped_webpage
+            .get_current_deviation()
+            .expect("missing current deviation");
+        let text_content = current_deviation
+            .text_content
+            .as_ref()
+            .expect("missing text content");
+        let _markup = text_content
+            .html
+            .get_markup()
+            .expect("missing markup")
+            .expect("failed to parse markup");
+        // dbg!(&markup);
+    }
+
+    #[tokio::test]
+    async fn oembed_works() {
+        let client = Client::new();
+        let oembed = client.get_oembed("https://www.deviantart.com/tohokari-steel/art/A-Fictorian-Tale-Chapter-11-879180914").await.expect("failed to get oembed");
+        assert!(oembed.title == "A Fictorian Tale Chapter 11");
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn scrape_stash_info_works() {
+        let client = Client::new();
+        let url = "https://sta.sh/02bhirtp3iwq";
+        let stash = client
+            .scrape_webpage(url)
+            .await
+            .expect("failed to scrape stash");
+        let current_deviation_id = stash
+            .get_current_deviation_id()
+            .expect("missing current deviation id");
+        assert!(current_deviation_id.as_u64() == Some(590293385));
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn it_works() {
+        let client = Client::new();
+        let mut search_cursor = client.search("sun", None);
+        search_cursor
+            .next_page()
+            .await
+            .expect("failed to get next page");
+        let results = search_cursor
+            .current_deviations()
+            .expect("missing page")
+            .expect("failed to look up deviations");
+        let first = &results.first().expect("no results");
+
+        let url = first
+            .get_download_url()
+            .or_else(|| first.get_fullview_url())
+            .expect("failed to find download url");
+        let bytes = client
+            .client
+            .get(url)
+            .send()
+            .await
+            .expect("failed to send")
+            .error_for_status()
+            .expect("bad status")
+            .bytes()
+            .await
+            .expect("failed to buffer bytes");
+
+        std::fs::write("test.jpg", &bytes).expect("failed to write to file");
+        search_cursor
+            .next_page()
+            .await
+            .expect("failed to get next page");
+        let _results = search_cursor
+            .current_deviations()
+            .expect("missing page")
+            .expect("failed to look up deviations");
+    }
+}
+
\ No newline at end of file diff --git a/src/deviantart/lib.rs.html b/src/deviantart/lib.rs.html new file mode 100644 index 00000000..139618bf --- /dev/null +++ b/src/deviantart/lib.rs.html @@ -0,0 +1,165 @@ +lib.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+
/// The client
+mod client;
+/// API types
+pub mod types;
+
+pub use self::client::Client;
+pub use self::types::Deviation;
+pub use self::types::DeviationExtended;
+pub use self::types::OEmbed;
+pub use self::types::ScrapedStashInfo;
+pub use self::types::ScrapedWebPageInfo;
+
+/// Library Error
+#[derive(Debug, thiserror::Error)]
+pub enum Error {
+    /// Reqwest HTTP Error
+    #[error(transparent)]
+    Reqwest(#[from] reqwest::Error),
+
+    /// Invalid Url
+    #[error(transparent)]
+    Url(#[from] url::ParseError),
+
+    /// A tokio task failed to join
+    #[error(transparent)]
+    TokioJoin(#[from] tokio::task::JoinError),
+
+    /// Json failed to parse
+    #[error(transparent)]
+    Json(#[from] serde_json::Error),
+
+    /// A scraped web page was invalid
+    #[error("invalid scraped webpage")]
+    InvalidScrapedWebPage(#[from] self::types::scraped_webpage_info::FromHtmlStrError),
+
+    /// Scraped Stash info was invalid
+    #[error("invalid scraped stash info")]
+    InvalidScrapedStashInfo(#[from] self::types::scraped_stash_info::FromHtmlStrError),
+
+    /// Signing in failed for an unspecified reason
+    #[error("sign in failed")]
+    SignInFailed,
+
+    /// Missing a field
+    #[error("missing field \"{name}\"")]
+    MissingField {
+        /// The missing field name
+        name: &'static str,
+    },
+
+    /// Missing the streams field
+    #[error("missing streams")]
+    MissingStreams,
+
+    /// Missing the browse page stream
+    #[error("missing browse page stream")]
+    MissingBrowsePageStream,
+
+    /// Missing the Deviation of the given id
+    #[error("missing deviation {0}")]
+    MissingDeviation(u64),
+
+    /// A cookie store error occured
+    #[error("cookie store error")]
+    CookieStore(WrapBoxError),
+}
+
+/// A wrapper over a `Box<dyn std::error::Error + Send + Sync + 'static>`.
+#[derive(Debug)]
+pub struct WrapBoxError(pub Box<dyn std::error::Error + Send + Sync + 'static>);
+
+impl std::fmt::Display for WrapBoxError {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        self.0.fmt(f)
+    }
+}
+
+impl std::error::Error for WrapBoxError {}
+
+// TODO:
+// investigate deviantart.com/view/<id>
+// ex: deviantart.com/view/852625718
+
\ No newline at end of file diff --git a/src/deviantart/types.rs.html b/src/deviantart/types.rs.html new file mode 100644 index 00000000..f526ee95 --- /dev/null +++ b/src/deviantart/types.rs.html @@ -0,0 +1,29 @@ +types.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
/// The `Deviation` type.
+pub mod deviation;
+/// The `OEmbed` type
+pub mod oembed;
+/// The `ScrapedStashInfo` type.
+pub mod scraped_stash_info;
+/// The `ScrapedWebPageInfo` type.
+pub mod scraped_webpage_info;
+
+pub use self::deviation::Deviation;
+pub use self::oembed::OEmbed;
+pub use self::scraped_stash_info::ScrapedStashInfo;
+pub use self::scraped_webpage_info::DeviationExtended;
+pub use self::scraped_webpage_info::ScrapedWebPageInfo;
+
\ No newline at end of file diff --git a/src/deviantart/types/deviation.rs.html b/src/deviantart/types/deviation.rs.html new file mode 100644 index 00000000..fd45f8bc --- /dev/null +++ b/src/deviantart/types/deviation.rs.html @@ -0,0 +1,699 @@ +deviation.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+
use std::{collections::HashMap, path::Path};
+use url::Url;
+
+/// A Deviation
+#[derive(Debug, serde::Deserialize)]
+pub struct Deviation {
+    // TODO: This is a number in a scraped deviation. Make either parse here.
+    /// DeviantArt Author
+    // pub author: Author,
+
+    /// ?
+    #[serde(rename = "blockReasons")]
+    pub block_reasons: Vec<serde_json::Value>,
+
+    /// Deviation ID
+    #[serde(rename = "deviationId")]
+    pub deviation_id: u64,
+
+    /// Deviation Type
+    #[serde(rename = "type")]
+    pub kind: String,
+
+    /// Image Url
+    pub url: Url,
+
+    /// Media Info
+    pub media: DeviationMedia,
+
+    /// Title
+    pub title: String,
+
+    /// Text content for literature
+    #[serde(rename = "textContent")]
+    pub text_content: Option<TextContext>,
+
+    /// Whether this is downloadable
+    #[serde(rename = "isDownloadable")]
+    pub is_downloadable: bool,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl Deviation {
+    /// Get the media url for this [`Deviation`].
+    pub fn get_media_url(&self) -> Option<Url> {
+        let mut url = self.media.base_uri.as_ref()?.clone();
+        url.query_pairs_mut()
+            .append_pair("token", self.media.token.first()?);
+        Some(url)
+    }
+
+    /// Get the "download" url for this [`Deviation`].
+    pub fn get_download_url(&self) -> Option<Url> {
+        let mut url = self.media.base_uri.as_ref()?.clone();
+        url.query_pairs_mut()
+            .append_pair("token", self.media.token.get(1)?);
+        Some(url)
+    }
+
+    /// Get the fullview url for this [`Deviation`].
+    pub fn get_fullview_url(&self) -> Option<Url> {
+        let mut url = self.media.base_uri.as_ref()?.clone();
+
+        // Allow the "content" section of the path to not exist, but the fullview data MUST exist.
+        if let Some(path) = self.media.get_fullview_media_type()?.content.as_ref() {
+            let mut path_segments_mut = url.path_segments_mut().ok()?;
+
+            for path in path.split('/').filter(|p| !p.is_empty()) {
+                // Replace "<pretty-name>" with the actual pretty name.
+                let pretty_name = self.media.pretty_name.as_ref()?;
+                let path = path.replace("<prettyName>", pretty_name);
+                path_segments_mut.push(&path);
+            }
+        }
+
+        // We assume that a token is not provided in cases where it is not needed.
+        // As such, this part is optional.
+        // So far, a token is allowed to be missing when the "content" section of the fullview data is missing
+        // Correct this if these assumptions are wrong.
+        if let Some(token) = self.media.token.first() {
+            url.query_pairs_mut().append_pair("token", token);
+        }
+
+        Some(url)
+    }
+
+    /// Get the GIF url for this [`Deviation`].
+    pub fn get_gif_url(&self) -> Option<Url> {
+        let mut url = self.media.get_gif_media_type()?.b.clone()?;
+        url.query_pairs_mut()
+            .append_pair("token", self.media.token.first()?);
+        Some(url)
+    }
+
+    /// Get the best video url
+    pub fn get_best_video_url(&self) -> Option<&Url> {
+        let url = self.media.get_best_video_media_type()?.b.as_ref()?;
+        Some(url)
+    }
+
+    /// Whether this is an image
+    pub fn is_image(&self) -> bool {
+        self.kind == "image"
+    }
+
+    /// Whether this is literature
+    pub fn is_literature(&self) -> bool {
+        self.kind == "literature"
+    }
+
+    /// Whether this is a film
+    pub fn is_film(&self) -> bool {
+        self.kind == "film"
+    }
+
+    /// Get the most "fitting" url to download an image.
+    ///
+    /// Usually, [`DeviationExtended`] holds better data than a [`Deviation`], so prefer that instead.
+    pub fn get_image_download_url(&self) -> Option<Url> {
+        // Try to get the download url.
+        if let Some(url) = self.get_download_url() {
+            return Some(url);
+        }
+
+        // If that fails, this is probably a gif, so we try to get the gif url.
+        if let Some(url) = self.get_gif_url() {
+            return Some(url);
+        }
+
+        // Otherwise, assume failure
+        None
+    }
+    /// Try to get the original extension of this [`Deviation`]
+    pub fn get_extension(&self) -> Option<&str> {
+        if self.is_image() {
+            let url = self
+                .media
+                .get_gif_media_type()
+                .and_then(|media_type| media_type.b.as_ref())
+                .or(self.media.base_uri.as_ref())?;
+            Path::new(url.as_str()).extension()?.to_str()
+        } else if self.is_literature() {
+            None
+        } else if self.is_film() {
+            let url = self.media.get_best_video_media_type()?.b.as_ref()?;
+            Path::new(url.as_str()).extension()?.to_str()
+        } else {
+            None
+        }
+    }
+}
+
+#[derive(Debug, serde::Deserialize)]
+pub struct Author {
+    /// is the user new
+    #[serde(rename = "isNewDeviant")]
+    pub is_new_deviant: bool,
+
+    /// User UUID
+    #[serde(rename = "useridUuid")]
+    pub userid_uuid: String,
+
+    /// User icon url
+    pub usericon: Url,
+
+    /// User ID
+    #[serde(rename = "userId")]
+    pub user_id: u64,
+
+    /// Username
+    pub username: String,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// The media field of a [`Deviation`].
+#[derive(Debug, serde::Deserialize)]
+pub struct DeviationMedia {
+    /// The base uri
+    #[serde(rename = "baseUri")]
+    pub base_uri: Option<Url>,
+
+    /// Image token
+    #[serde(default)]
+    pub token: Vec<String>,
+
+    /// Types
+    pub types: Vec<MediaType>,
+
+    /// Pretty Name
+    #[serde(rename = "prettyName")]
+    pub pretty_name: Option<String>,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl DeviationMedia {
+    /// Try to get the fullview [`MediaType`].
+    pub fn get_fullview_media_type(&self) -> Option<&MediaType> {
+        self.types.iter().find(|t| t.is_fullview())
+    }
+
+    /// Try to get the gif [`MediaType`].
+    pub fn get_gif_media_type(&self) -> Option<&MediaType> {
+        self.types.iter().find(|t| t.is_gif())
+    }
+
+    /// Try to get the video [`MediaType`]
+    pub fn get_best_video_media_type(&self) -> Option<&MediaType> {
+        self.types
+            .iter()
+            .filter(|media_type| media_type.is_video())
+            .max_by_key(|media_type| media_type.width)
+    }
+}
+
+/// DeviantArt [`DeviationMedia`] media type.
+#[derive(Debug, serde::Deserialize)]
+pub struct MediaType {
+    /// The content. A uri used with base_uri.
+    #[serde(rename = "c")]
+    pub content: Option<String>,
+
+    /// Image Height
+    #[serde(rename = "h")]
+    pub height: u64,
+
+    /// ?
+    // pub r: u64,
+
+    /// The kind of media
+    #[serde(rename = "t")]
+    pub kind: String,
+
+    /// Image Width
+    #[serde(rename = "w")]
+    pub width: u64,
+
+    /// ?
+    // pub f: Option<u64>,
+
+    /// ?
+    pub b: Option<Url>,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl MediaType {
+    /// Whether this is the fullview
+    pub fn is_fullview(&self) -> bool {
+        self.kind == "fullview"
+    }
+
+    /// Whether this is a gif
+    pub fn is_gif(&self) -> bool {
+        self.kind == "gif"
+    }
+
+    /// Whether this is a video
+    pub fn is_video(&self) -> bool {
+        self.kind == "video"
+    }
+}
+
+/// Text Content for literature
+#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
+pub struct TextContext {
+    /// Excerpt of text
+    pub excerpt: String,
+
+    /// Html data
+    pub html: Html,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// Text Context html
+#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
+pub struct Html {
+    /// ?
+    pub features: String,
+
+    /// Text markup data
+    pub markup: Option<String>,
+
+    /// The kind of text data
+    #[serde(rename = "type")]
+    pub kind: String,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl Html {
+    /// Try to parse the markup field
+    pub fn get_markup(&self) -> Option<Result<Markup, serde_json::Error>> {
+        let markup = self.markup.as_ref()?;
+        Some(serde_json::from_str(markup))
+    }
+}
+
+/// Text Context Html Markup
+#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
+pub struct Markup {
+    /// Blocks of marked-up text
+    pub blocks: Vec<Block>,
+
+    /// ?
+    #[serde(rename = "entityMap")]
+    pub entity_map: serde_json::Value,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// A Markup block
+#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
+pub struct Block {
+    /// ?
+    pub data: serde_json::Value,
+
+    /// ?
+    pub depth: u64,
+
+    /// ?
+    pub key: String,
+
+    /// Text data
+    pub text: String,
+
+    #[serde(rename = "type")]
+    pub kind: String,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
\ No newline at end of file diff --git a/src/deviantart/types/oembed.rs.html b/src/deviantart/types/oembed.rs.html new file mode 100644 index 00000000..04c07b0f --- /dev/null +++ b/src/deviantart/types/oembed.rs.html @@ -0,0 +1,39 @@ +oembed.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
use std::collections::HashMap;
+use url::Url;
+
+/// DeviantArt OEmbed
+#[derive(Debug, serde::Deserialize)]
+pub struct OEmbed {
+    /// Url of the asset
+    pub url: Url,
+
+    /// Url of the thumbnail
+    pub thumbnail_url: Option<Url>,
+
+    /// Title
+    pub title: String,
+
+    /// Unknown K/Vs
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
\ No newline at end of file diff --git a/src/deviantart/types/scraped_stash_info.rs.html b/src/deviantart/types/scraped_stash_info.rs.html new file mode 100644 index 00000000..83f5d5fe --- /dev/null +++ b/src/deviantart/types/scraped_stash_info.rs.html @@ -0,0 +1,183 @@ +scraped_stash_info.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
use once_cell::sync::Lazy;
+use regex::Regex;
+use std::collections::HashMap;
+use url::Url;
+
+/// An error that may occur while parsing a [`ScrapedStashInfo`] from a html str.
+#[derive(Debug, thiserror::Error)]
+pub enum FromHtmlStrError {
+    /// Missing the pageData variable
+    #[error("missing pageData variable")]
+    MissingPageData,
+
+    /// Failed to parse json
+    #[error(transparent)]
+    InvalidJson(#[from] serde_json::Error),
+}
+
+/// Scraped info from a sta.sh link
+#[derive(Debug, serde::Deserialize)]
+pub struct ScrapedStashInfo {
+    /// Csrf token
+    pub csrf: String,
+
+    /// ?
+    pub deviationid: u64,
+
+    /// Present only if it is a video
+    pub film: Option<Film>,
+
+    /// The width
+    pub deviation_width: u64,
+
+    /// The height
+    pub deviation_height: u64,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl ScrapedStashInfo {
+    /// Parse this from a html str
+    pub fn from_html_str(input: &str) -> Result<Self, FromHtmlStrError> {
+        static REGEX: Lazy<Regex> = Lazy::new(|| {
+            Regex::new(r#"deviantART.pageData=(.*);"#).expect("invalid `scrape_stash_info` regex")
+        });
+
+        let capture = REGEX
+            .captures(input)
+            .and_then(|captures| captures.get(1))
+            .ok_or(FromHtmlStrError::MissingPageData)?;
+        let scraped_stash: ScrapedStashInfo = serde_json::from_str(capture.as_str())?;
+
+        Ok(scraped_stash)
+    }
+}
+
+/// Film data from a sta.sh link
+#[derive(Debug, serde::Deserialize)]
+pub struct Film {
+    /// Video sizes
+    pub sizes: HashMap<String, Size>,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl Film {
+    /// Get the best size
+    pub fn get_best_size(&self) -> Option<&Size> {
+        self.sizes.values().max_by_key(|v| v.width * v.height)
+    }
+}
+
+/// Film size
+#[derive(Debug, serde::Deserialize)]
+pub struct Size {
+    /// Video height
+    pub height: u32,
+
+    /// Video width
+    pub width: u32,
+
+    /// Video src
+    pub src: Url,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
\ No newline at end of file diff --git a/src/deviantart/types/scraped_webpage_info.rs.html b/src/deviantart/types/scraped_webpage_info.rs.html new file mode 100644 index 00000000..2e3756b5 --- /dev/null +++ b/src/deviantart/types/scraped_webpage_info.rs.html @@ -0,0 +1,703 @@ +scraped_webpage_info.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+
use super::Deviation;
+use once_cell::sync::Lazy;
+use regex::Regex;
+use std::collections::HashMap;
+use url::Url;
+
+/// An error that may occur while parsing a [`ScrapedWebPageInfo`] from a html string.
+#[derive(Debug, thiserror::Error)]
+pub enum FromHtmlStrError {
+    /// Missing the InitialState variable
+    #[error("missing initial state")]
+    MissingInitialState,
+
+    /// Failed to parse some state
+    #[error(transparent)]
+    InvalidJson(#[from] serde_json::Error),
+}
+
+/// Info scraped from a deviation url
+#[derive(Debug, serde::Deserialize)]
+pub struct ScrapedWebPageInfo {
+    /// Page config like csrf tokens
+    #[serde(rename = "@@config")]
+    pub config: Config,
+
+    /// Deviations extended deviations maybe?
+    #[serde(rename = "@@entities")]
+    pub entities: Option<Entities>,
+
+    /// ?
+    #[serde(rename = "@@DUPERBROWSE")]
+    pub duper_browse: Option<DuperBrowse>,
+
+    /// Info about the current session
+    #[serde(rename = "@@publicSession")]
+    pub public_session: PublicSession,
+
+    /// Streams
+    #[serde(rename = "@@streams")]
+    pub streams: Option<Streams>,
+
+    /// Needed for login.
+    ///
+    /// Note that this is a different csrf token from the config struct.
+    #[serde(rename = "csrfToken")]
+    pub csrf_token: Option<Box<str>>,
+
+    /// Needed for login.
+    #[serde(rename = "luToken")]
+    pub lu_token: Option<Box<str>>,
+
+    /// Needed for login.
+    #[serde(rename = "luToken2")]
+    pub lu_token2: Option<Box<str>>,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+impl ScrapedWebPageInfo {
+    /// Parse this from a html string
+    pub fn from_html_str(input: &str) -> Result<Self, FromHtmlStrError> {
+        static REGEX: Lazy<Regex> = Lazy::new(|| {
+            Regex::new(r#"window\.__INITIAL_STATE__ = JSON\.parse\("(.*)"\);"#).unwrap()
+        });
+
+        let capture = REGEX
+            .captures(input)
+            .and_then(|captures| captures.get(1))
+            .ok_or(FromHtmlStrError::MissingInitialState)?;
+        // TODO: Escape properly
+        let capture = capture
+            .as_str()
+            .replace("\\\"", "\"")
+            .replace("\\'", "'")
+            .replace("\\\\", "\\");
+        Ok(serde_json::from_str(&capture)?)
+    }
+
+    /// Returns `true` if logged in
+    pub fn is_logged_in(&self) -> bool {
+        self.public_session.is_logged_in
+    }
+
+    /// Get the current deviation's id
+    pub fn get_current_deviation_id(&self) -> Option<&serde_json::Value> {
+        Some(
+            &self
+                .duper_browse
+                .as_ref()?
+                .root_stream
+                .as_ref()?
+                .current_open_item,
+        )
+    }
+
+    /// Get the [`Deviation`] for this page.
+    pub fn get_current_deviation(&self) -> Option<&Deviation> {
+        let id = self.get_current_deviation_id()?;
+        let id = match id {
+            serde_json::Value::Number(n) => n.as_u64()?,
+            serde_json::Value::String(s) => s.parse().ok()?,
+            _ => return None,
+        };
+        self.get_deviation_by_id(id)
+    }
+
+    /// Get the [`DeviationExtended`] for this page.
+    pub fn get_current_deviation_extended(&self) -> Option<&DeviationExtended> {
+        let id = self.get_current_deviation_id()?;
+        let mut key_buffer = itoa::Buffer::new();
+        let key = match id {
+            serde_json::Value::Number(n) => {
+                let n = n.as_u64()?;
+                key_buffer.format(n)
+            }
+            serde_json::Value::String(s) => s,
+            _ => return None,
+        };
+        self.entities
+            .as_ref()?
+            .deviation_extended
+            .as_ref()?
+            .get(key)
+    }
+
+    /// Get a deviation by id, if it exists
+    pub fn get_deviation_by_id(&self, id: u64) -> Option<&Deviation> {
+        let mut key_buffer = itoa::Buffer::new();
+        self.entities.as_ref()?.deviation.get(key_buffer.format(id))
+    }
+
+    /// Take a deviation by id, if it exists
+    pub fn take_deviation_by_id(&mut self, id: u64) -> Option<Deviation> {
+        let mut key_buffer = itoa::Buffer::new();
+        self.entities
+            .as_mut()?
+            .deviation
+            .remove(key_buffer.format(id))
+    }
+}
+
+/// ?
+#[derive(Debug, serde::Deserialize)]
+pub struct Config {
+    /// The page's csrf token
+    #[serde(rename = "csrfToken")]
+    pub csrf_token: String,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// ?
+#[derive(Debug, serde::Deserialize)]
+pub struct Entities {
+    /// Deviations
+    pub deviation: HashMap<String, Deviation>,
+
+    /// Extended Deviation Info
+    #[serde(rename = "deviationExtended")]
+    pub deviation_extended: Option<HashMap<String, DeviationExtended>>,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// Extended Info about a deviation
+#[derive(Debug, serde::Deserialize)]
+pub struct DeviationExtended {
+    /// Download info
+    pub download: Option<Download>,
+
+    /// HTML description
+    pub description: Option<String>,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+#[derive(Debug, serde::Deserialize)]
+pub struct Download {
+    /// The file size
+    pub filesize: u64,
+
+    /// The image height
+    pub height: u32,
+
+    /// The image width
+    pub width: u32,
+
+    /// ?
+    #[serde(rename = "type")]
+    pub kind: String,
+
+    /// The url
+    pub url: Url,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// ?
+#[derive(Debug, serde::Deserialize)]
+pub struct DuperBrowse {
+    /// ?
+    #[serde(rename = "rootStream")]
+    pub root_stream: Option<RootStream>,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// ?
+#[derive(Debug, serde::Deserialize)]
+pub struct RootStream {
+    /// The id of the current deviation. This is either a number or string.
+    #[serde(rename = "currentOpenItem")]
+    pub current_open_item: serde_json::Value,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// ?
+#[derive(Debug, serde::Deserialize)]
+pub struct PublicSession {
+    /// Whether the user is logged in
+    #[serde(rename = "isLoggedIn")]
+    pub is_logged_in: bool,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// The streams field
+#[derive(Debug, serde::Deserialize)]
+pub struct Streams {
+    /// Search results appear here
+    #[serde(rename = "@@BROWSE_PAGE_STREAM")]
+    pub browse_page_stream: Option<BrowsePageStream>,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// Search results appear here
+#[derive(Debug, serde::Deserialize)]
+pub struct BrowsePageStream {
+    /// The cursor
+    pub cursor: String,
+
+    /// Whether this has less?
+    #[serde(rename = "hasLess")]
+    pub has_less: bool,
+
+    /// Whether this has more?
+    #[serde(rename = "hasMore")]
+    pub has_more: bool,
+
+    /// Deviation ids?
+    ///
+    /// Usually, these are integers representing deviation ids.
+    /// In some cases, these are strings of the format "xx-nnnnn",
+    /// where the "xx" part is unknown and the "nnnnn" part is a deviation id.
+    pub items: Vec<serde_json::Value>,
+
+    /// The # of items per page
+    #[serde(rename = "itemsPerFetch")]
+    pub items_per_fetch: u64,
+
+    /// Stream Params
+    #[serde(rename = "streamParams")]
+    pub stream_params: StreamParams,
+
+    /// The stream type
+    #[serde(rename = "streamType")]
+    pub stream_type: String,
+
+    /// The stream id
+    #[serde(rename = "streamId")]
+    pub stream_id: String,
+
+    /// ?
+    #[serde(rename = "fetchNextCallback")]
+    pub fetch_next_callback: String,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+/// Stream params
+#[derive(Debug, serde::Deserialize)]
+pub struct StreamParams {
+    /// Request params
+    #[serde(rename = "requestParams")]
+    pub request_params: HashMap<String, String>,
+
+    /// ?
+    #[serde(rename = "itemType")]
+    pub item_type: String,
+
+    /// ?
+    #[serde(rename = "requestEndpoint")]
+    pub request_endpoint: String,
+
+    /// ?
+    #[serde(rename = "initialOffset")]
+    pub initial_offset: u64,
+
+    /// Unknown data
+    #[serde(flatten)]
+    pub unknown: HashMap<String, serde_json::Value>,
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    const SCRAPED_WEBPAGE: &str = include_str!("../../test_data/scraped_webpage.json");
+    const LOGIN_WEBPAGE: &str = include_str!("../../test_data/login_webpage.json");
+
+    #[test]
+    fn parse_scraped_webpage() {
+        let scraped_webpage_info: ScrapedWebPageInfo =
+            serde_json::from_str(SCRAPED_WEBPAGE).expect("failed to parse scraped webpage info");
+        assert_eq!(
+            scraped_webpage_info
+                .get_current_deviation_id()
+                .expect("missing current deviation id"),
+            119577071
+        );
+        // dbg!(scraped_deviation_info.entities.deviation);
+    }
+
+    #[test]
+    fn parse_login_webpage() {
+        let _scraped_webpage_info: ScrapedWebPageInfo =
+            serde_json::from_str(LOGIN_WEBPAGE).expect("failed to parse scraped webpage info");
+    }
+}
+
\ No newline at end of file diff --git a/src/deviantart_cli/commands.rs.html b/src/deviantart_cli/commands.rs.html new file mode 100644 index 00000000..0ecf0ca5 --- /dev/null +++ b/src/deviantart_cli/commands.rs.html @@ -0,0 +1,7 @@ +commands.rs - source
1
+2
+3
+
pub mod download;
+pub mod login;
+pub mod search;
+
\ No newline at end of file diff --git a/src/deviantart_cli/commands/download.rs.html b/src/deviantart_cli/commands/download.rs.html new file mode 100644 index 00000000..44555c83 --- /dev/null +++ b/src/deviantart_cli/commands/download.rs.html @@ -0,0 +1,567 @@ +download.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+
use crate::load_config_cli;
+use crate::try_signin_cli;
+use crate::util::sanitize_path;
+use anyhow::bail;
+use anyhow::Context;
+use std::io::Write;
+
+#[derive(argh::FromArgs)]
+#[argh(
+    subcommand,
+    name = "download",
+    description = "download from deviantart"
+)]
+pub struct Options {
+    #[argh(positional, description = "the deviation url")]
+    pub url: String,
+
+    #[argh(
+        switch,
+        description = "allow using  the fullview deviantart url, which is lower quality"
+    )]
+    pub allow_fullview: bool,
+
+    #[argh(switch, long = "no-login", description = "do not try to log in")]
+    pub no_login: bool,
+}
+
+pub async fn execute(client: deviantart::Client, options: Options) -> anyhow::Result<()> {
+    let config = load_config_cli().await;
+
+    if !options.no_login {
+        try_signin_cli(
+            &client,
+            config.username.as_deref(),
+            config.password.as_deref(),
+        )
+        .await?;
+    }
+
+    let scraped_webpage_info = client
+        .scrape_webpage(&options.url)
+        .await
+        .context("failed to scrape webpage")?;
+    let current_deviation = scraped_webpage_info
+        .get_current_deviation()
+        .context("failed to get current deviation")?;
+    let current_deviation_extended = scraped_webpage_info
+        .get_current_deviation_extended()
+        .context("failed to get current deviation extended")?;
+
+    println!("Title: {}", current_deviation.title);
+    println!("ID: {}", current_deviation.deviation_id);
+    println!("Kind: {}", current_deviation.kind);
+    println!("Url: {}", current_deviation.url);
+    println!("Is Downloadable: {}", current_deviation.is_downloadable);
+    println!(
+        "Description: {}",
+        current_deviation_extended
+            .description
+            .as_deref()
+            .unwrap_or("(none)")
+    );
+    println!();
+
+    if current_deviation.is_literature() {
+        download_literature_cli(current_deviation).await?;
+    } else if current_deviation.is_image() {
+        download_image_cli(
+            &client,
+            current_deviation,
+            current_deviation_extended,
+            &options,
+        )
+        .await?;
+    } else if current_deviation.is_film() {
+        download_film_cli(&client, current_deviation).await?;
+    } else {
+        bail!("unknown deviation type: {}", current_deviation.kind);
+    }
+
+    Ok(())
+}
+
+async fn download_literature_cli(current_deviation: &deviantart::Deviation) -> anyhow::Result<()> {
+    println!("Generating html page...");
+
+    // We need to clone in order to pass to a tokio task.
+    // TODO: Copy the text and pass that instead, parsing within the task.
+    let text_content = current_deviation
+        .text_content
+        .as_ref()
+        .context("deviation is missing text content")?
+        .clone();
+
+    let title = current_deviation.title.to_string();
+    let deviation_id = current_deviation.deviation_id;
+    let file_name = format!("{title}-{deviation_id}.html");
+    let file_name = sanitize_path(&file_name);
+
+    if tokio::fs::try_exists(&file_name)
+        .await
+        .context("failed to check if file exists")?
+    {
+        println!("file already exists");
+        return Ok(());
+    }
+
+    let temp_path = nd_util::with_push_extension(&file_name, "part");
+    let mut temp_path = tokio::task::spawn_blocking(move || {
+        let temp_file = std::fs::OpenOptions::new()
+            .create_new(true)
+            .write(true)
+            .open(&temp_path)
+            .context("failed to open temp file")?;
+        let mut temp_file = std::io::BufWriter::new(temp_file);
+        let temp_path = nd_util::DropRemovePath::new(temp_path);
+
+        write_html(&title, text_content, &mut temp_file)?;
+
+        let mut temp_file = temp_file.into_inner()?;
+        temp_file.flush()?;
+        temp_file.sync_all()?;
+
+        Result::<_, anyhow::Error>::Ok(temp_path)
+    })
+    .await??;
+
+    tokio::fs::rename(&temp_path, file_name)
+        .await
+        .context("failed to rename file")?;
+    temp_path.persist();
+
+    Ok(())
+}
+
+fn write_html<W>(
+    title: &str,
+    text_content: deviantart::types::deviation::TextContext,
+    mut html: W,
+) -> anyhow::Result<()>
+where
+    W: std::io::Write,
+{
+    let markup = text_content
+        .html
+        .get_markup()
+        .context("deviation is missing markup")?
+        .context("failed to parse markup");
+
+    write!(&mut html, "<html>")?;
+    write!(&mut html, "<head>")?;
+    write!(&mut html, "<meta charset=\"UTF-8\">")?;
+    write!(&mut html, "<title>{title}</title>")?;
+    write!(&mut html, "<style>")?;
+    let css_1 = "html { font-family: devioussans02extrabold,Helvetica Neue,Helvetica,Arial,メイリオ, meiryo,ヒラギノ角ゴ pro w3,hiragino kaku gothic pro,sans-serif; }";
+    write!(&mut html, "{css_1}")?;
+
+    let css_2 =
+        "body { background-color: #06070d; margin: 0; padding-bottom: 56px; padding-top: 56px; }";
+    write!(&mut html, "{css_2}")?;
+
+    let css_3 = "h1 { color: #f2f2f2; font-weight: 400; font-size: 48px; line-height: 1.22; letter-spacing: .3px;}";
+    write!(&mut html, "{css_3}")?;
+
+    let css_4 = "span { color: #b1b1b9; font-size: 18px; line-height: 1.5; letter-spacing: .3px; }";
+    write!(&mut html, "{css_4}")?;
+
+    write!(&mut html, "</style>")?;
+    write!(&mut html, "</head>")?;
+    write!(&mut html, "<body>")?;
+    write!(&mut html, "<div style=\"width:780px;margin:auto;\">")?;
+    write!(&mut html, "<h1>{title}</h1>")?;
+
+    match markup {
+        Ok(markup) => {
+            for block in markup.blocks.iter() {
+                let id = block.key.as_str();
+                write!(&mut html, "<div id = \"{id}\">")?;
+
+                write!(&mut html, "<span>")?;
+                if block.text.is_empty() {
+                    write!(&mut html, "<br>")?;
+                } else {
+                    let text = block.text.as_str();
+                    write!(&mut html, "{text}")?;
+                }
+                write!(&mut html, "</span>")?;
+                write!(&mut html, "</div>")?;
+            }
+        }
+        Err(error) => {
+            println!("Failed to parse markdown block format: {error:?}");
+            println!("Interpeting as raw html...");
+
+            let markdown = text_content
+                .html
+                .markup
+                .as_ref()
+                .context("missing markdown")?;
+            write!(&mut html, "<div style=\"color: #b1b1b9; font-size: 18px; line-height: 1.5; letter-spacing: .3px;\">{markdown}</div>")?;
+        }
+    }
+
+    write!(&mut html, "</div>")?;
+    write!(&mut html, "</body>")?;
+    write!(&mut html, "</html>")?;
+
+    Ok(())
+}
+
+async fn download_image_cli(
+    client: &deviantart::Client,
+    current_deviation: &deviantart::Deviation,
+    current_deviation_extended: &deviantart::DeviationExtended,
+    options: &Options,
+) -> anyhow::Result<()> {
+    println!("Downloading image...");
+
+    let extension = current_deviation
+        .get_extension()
+        .context("could not determine image extension")?;
+    let title = current_deviation.title.as_str();
+    let deviation_id = current_deviation.deviation_id;
+    let file_name = format!("{title}-{deviation_id}.{extension}",);
+    let file_name = sanitize_path(&file_name);
+    println!("Out Path: {file_name}");
+    if tokio::fs::try_exists(&file_name)
+        .await
+        .context("failed to check if file exists")?
+    {
+        println!("file already exists");
+        return Ok(());
+    }
+
+    let mut url = current_deviation_extended
+        .download
+        .as_ref()
+        .map(|download| download.url.clone())
+        .or_else(|| current_deviation.get_image_download_url());
+
+    // This is not default as a "fullview" can be thought of as a "preview".
+    // It's not an actual download, but helps when downloads are disabled.
+    if url.is_none() && options.allow_fullview {
+        url = current_deviation.get_fullview_url();
+    }
+
+    let url = url.context("failed to select an image url")?;
+
+    nd_util::download_to_path(&client.client, url.as_str(), file_name).await?;
+
+    Ok(())
+}
+
+async fn download_film_cli(
+    client: &deviantart::Client,
+    current_deviation: &deviantart::Deviation,
+) -> anyhow::Result<()> {
+    println!("Downloading video...");
+
+    let extension = current_deviation
+        .get_extension()
+        .context("could not determine video extension")?;
+    let title = current_deviation.title.as_str();
+    let deviation_id = current_deviation.deviation_id;
+    let file_name = format!("{title}-{deviation_id}.{extension}");
+    let file_name = sanitize_path(&file_name);
+    println!("Out Path: {file_name}");
+    if tokio::fs::try_exists(&file_name)
+        .await
+        .context("failed to check if file exists")?
+    {
+        println!("file already exists");
+        return Ok(());
+    }
+
+    let url = current_deviation
+        .get_best_video_url()
+        .context("missing video url")?;
+
+    nd_util::download_to_path(&client.client, url.as_str(), file_name).await?;
+
+    Ok(())
+}
+
\ No newline at end of file diff --git a/src/deviantart_cli/commands/login.rs.html b/src/deviantart_cli/commands/login.rs.html new file mode 100644 index 00000000..4827e990 --- /dev/null +++ b/src/deviantart_cli/commands/login.rs.html @@ -0,0 +1,55 @@ +login.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+
use crate::{config::Config, get_cookie_file_path};
+use anyhow::Context;
+
+#[derive(argh::FromArgs)]
+#[argh(subcommand, name = "login")]
+#[argh(description = "login on deviantart and save the credentials to a file")]
+pub struct Options {
+    #[argh(option, description = "your username", short = 'u', long = "username")]
+    pub username: String,
+
+    #[argh(option, description = "your password", short = 'p', long = "password")]
+    pub password: String,
+}
+
+pub async fn execute(_client: deviantart::Client, options: Options) -> anyhow::Result<()> {
+    // TODO: Consider verifying login online + saving new cookies
+
+    let mut config = Config::new();
+    config.username = Some(options.username);
+    config.password = Some(options.password);
+    config.save().await.context("failed to save config")?;
+    if let Err(e) = tokio::fs::remove_file(get_cookie_file_path()?).await {
+        eprintln!("Failed to delete old cookie file: {e}");
+    }
+
+    Ok(())
+}
+
\ No newline at end of file diff --git a/src/deviantart_cli/commands/search.rs.html b/src/deviantart_cli/commands/search.rs.html new file mode 100644 index 00000000..53277e1c --- /dev/null +++ b/src/deviantart_cli/commands/search.rs.html @@ -0,0 +1,115 @@ +search.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+
use crate::{load_config_cli, try_signin_cli};
+use anyhow::Context;
+
+#[derive(argh::FromArgs)]
+#[argh(subcommand, name = "search")]
+#[argh(description = "search on deviantart")]
+pub struct Options {
+    #[argh(positional, description = "the query string")]
+    pub query: String,
+
+    #[argh(option, short = 'c', long = "cursor", description = "the page cursor")]
+    pub cursor: Option<String>,
+
+    #[argh(switch, long = "no-login", description = "do not try to log in")]
+    pub no_login: bool,
+}
+
+pub async fn execute(client: deviantart::Client, options: Options) -> anyhow::Result<()> {
+    let config = load_config_cli().await;
+
+    if !options.no_login {
+        try_signin_cli(
+            &client,
+            config.username.as_deref(),
+            config.password.as_deref(),
+        )
+        .await?;
+    }
+
+    let mut search_cursor = client.search(&options.query, options.cursor.as_deref());
+    let results = search_cursor
+        .next_page()
+        .await
+        .with_context(|| format!("failed to search for '{}'", &options.query))
+        .and_then(|_| {
+            search_cursor
+                .current_deviations()
+                .context("missing page")?
+                .context("failed to look up deviations")
+        })?;
+
+    if results.is_empty() {
+        println!("no results for '{}'", &options.query);
+    } else {
+        println!("Results");
+        for (i, deviation) in results.iter().enumerate() {
+            println!("{}) {}", i + 1, deviation.title);
+            println!("Id: {}", deviation.deviation_id);
+            println!("Kind: {}", deviation.kind);
+            println!("Url: {}", deviation.url);
+            println!("Is downloadable: {}", deviation.is_downloadable);
+            println!();
+        }
+    }
+
+    Ok(())
+}
+
\ No newline at end of file diff --git a/src/deviantart_cli/config.rs.html b/src/deviantart_cli/config.rs.html new file mode 100644 index 00000000..265d28f5 --- /dev/null +++ b/src/deviantart_cli/config.rs.html @@ -0,0 +1,139 @@ +config.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
use anyhow::Context;
+use directories_next::BaseDirs;
+use std::path::PathBuf;
+
+#[derive(Debug, serde::Deserialize, serde::Serialize)]
+pub struct Config {
+    pub username: Option<String>,
+    pub password: Option<String>,
+}
+
+impl Config {
+    pub fn new() -> Self {
+        Config {
+            username: None,
+            password: None,
+        }
+    }
+
+    pub fn get_config_dir() -> anyhow::Result<PathBuf> {
+        let base_dirs = BaseDirs::new().context("failed to get base dirs")?;
+        Ok(base_dirs.config_dir().join("deviantart"))
+    }
+
+    pub fn get_config_path() -> anyhow::Result<PathBuf> {
+        Ok(Self::get_config_dir()?.join("config.toml"))
+    }
+
+    pub async fn create_config_path() -> anyhow::Result<()> {
+        tokio::fs::create_dir_all(Self::get_config_dir()?)
+            .await
+            .context("failed to create config dir")?;
+
+        Ok(())
+    }
+
+    pub async fn save(&self) -> anyhow::Result<()> {
+        Self::create_config_path().await?;
+
+        let config_path = Self::get_config_path()?;
+        let mut new_config = Self::load().await.unwrap_or_else(|_| Self::new());
+
+        if let Some(username) = self.username.clone() {
+            new_config.username = Some(username);
+        }
+
+        if let Some(password) = self.password.clone() {
+            new_config.password = Some(password);
+        }
+
+        let toml_str = toml::to_string_pretty(&new_config).context("failed to serialize config")?;
+
+        tokio::fs::write(config_path, toml_str)
+            .await
+            .context("failed to write config")?;
+
+        Ok(())
+    }
+
+    pub async fn load() -> anyhow::Result<Self> {
+        Self::create_config_path().await?;
+
+        let config_path = Self::get_config_path()?;
+
+        let config_str = tokio::fs::read_to_string(config_path)
+            .await
+            .context("failed to read config file")?;
+        toml::from_str(&config_str).context("failed to parse config")
+    }
+}
+
\ No newline at end of file diff --git a/src/deviantart_cli/main.rs.html b/src/deviantart_cli/main.rs.html new file mode 100644 index 00000000..8ba077be --- /dev/null +++ b/src/deviantart_cli/main.rs.html @@ -0,0 +1,273 @@ +main.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+
mod commands;
+mod config;
+pub mod util;
+
+use self::config::Config;
+use anyhow::bail;
+use anyhow::Context;
+use std::path::PathBuf;
+
+#[derive(argh::FromArgs)]
+#[argh(description = "a tool to interact with deviantart")]
+struct Options {
+    #[argh(subcommand)]
+    subcommand: SubCommand,
+}
+
+#[derive(argh::FromArgs)]
+#[argh(subcommand)]
+enum SubCommand {
+    Login(self::commands::login::Options),
+    Search(self::commands::search::Options),
+    Download(self::commands::download::Options),
+}
+
+fn main() -> anyhow::Result<()> {
+    let options: Options = argh::from_env();
+    real_main(options)
+}
+
+fn real_main(options: Options) -> anyhow::Result<()> {
+    let tokio_rt = tokio::runtime::Builder::new_multi_thread()
+        .enable_all()
+        .build()
+        .context("failed to start tokio runtime")?;
+
+    tokio_rt.block_on(async_main(options))?;
+    eprintln!("Done.");
+
+    Ok(())
+}
+
+async fn async_main(options: Options) -> anyhow::Result<()> {
+    let client = deviantart::Client::new();
+
+    match options.subcommand {
+        SubCommand::Login(options) => {
+            self::commands::login::execute(client, options).await?;
+        }
+        SubCommand::Search(options) => {
+            self::commands::search::execute(client, options).await?;
+        }
+        SubCommand::Download(options) => {
+            self::commands::download::execute(client, options).await?;
+        }
+    }
+
+    Ok(())
+}
+
+async fn try_signin_cli(
+    client: &deviantart::Client,
+    username: Option<&str>,
+    password: Option<&str>,
+) -> anyhow::Result<()> {
+    if let Err(e) = load_cookie_jar(client).await {
+        eprintln!("failed to load cookie jar: {e:?}");
+    }
+
+    if !client
+        .is_logged_in_online()
+        .await
+        .context("failed to check if logged in")?
+    {
+        match (username, password) {
+            (Some(username), Some(password)) => {
+                println!("logging in...");
+                client
+                    .sign_in(username, password)
+                    .await
+                    .context("failed to login")?;
+                println!("logged in");
+                println!();
+
+                if let Err(e) = save_cookie_jar(client)
+                    .await
+                    .context("failed to save cookies")
+                {
+                    println!("{e:?}");
+                }
+            }
+            (None, Some(_password)) => {
+                bail!("missing username");
+            }
+            (Some(_username), None) => {
+                bail!("missing password");
+            }
+            (None, None) => {
+                bail!("missing username and password");
+            }
+        }
+    }
+
+    Ok(())
+}
+
+async fn load_config_cli() -> Config {
+    Config::load().await.unwrap_or_else(|e| {
+        println!("failed to load config: {e:?}");
+        Config::new()
+    })
+}
+
+fn get_cookie_file_path() -> anyhow::Result<PathBuf> {
+    let base_dirs = directories_next::BaseDirs::new().context("failed to get base dirs")?;
+    Ok(base_dirs.data_dir().join("deviantart/cookies.json"))
+}
+
+async fn load_cookie_jar(client: &deviantart::Client) -> anyhow::Result<()> {
+    use std::{fs::File, io::BufReader};
+
+    let cookie_file = File::open(get_cookie_file_path()?).context("failed to read cookies")?;
+    client
+        .load_json_cookies(BufReader::new(cookie_file))
+        .await?;
+    Ok(())
+}
+
+async fn save_cookie_jar(client: &deviantart::Client) -> anyhow::Result<()> {
+    use std::fs::File;
+
+    let cookie_file =
+        File::create(get_cookie_file_path()?).context("failed to create cookie file")?;
+    client.save_json_cookies(cookie_file).await?;
+
+    Ok(())
+}
+
\ No newline at end of file diff --git a/src/deviantart_cli/util.rs.html b/src/deviantart_cli/util.rs.html new file mode 100644 index 00000000..3ac113d2 --- /dev/null +++ b/src/deviantart_cli/util.rs.html @@ -0,0 +1,25 @@ +util.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+
/// Sanitize the given path, returning a santized path with only valid chars.
+pub fn sanitize_path(path: &str) -> String {
+    path.chars()
+        .map(|c| {
+            if [':', '?', '/', '|', '*'].contains(&c) {
+                '-'
+            } else {
+                c
+            }
+        })
+        .collect()
+}
+
\ No newline at end of file diff --git a/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static.files/COPYRIGHT-23e9bde6c69aea69.txt new file mode 100644 index 00000000..1447df79 --- /dev/null +++ b/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt new file mode 100644 index 00000000..d7e9c149 --- /dev/null +++ b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 new file mode 100644 index 00000000..7a1e5fc5 Binary files /dev/null and b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 differ diff --git a/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 new file mode 100644 index 00000000..e766e06c Binary files /dev/null and b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 differ diff --git a/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt new file mode 100644 index 00000000..31aa7938 --- /dev/null +++ b/static.files/LICENSE-MIT-65090b722b3f6c56.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 new file mode 100644 index 00000000..1866ad4b Binary files /dev/null and b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 differ diff --git a/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt new file mode 100644 index 00000000..4b3edc29 --- /dev/null +++ b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 new file mode 100644 index 00000000..462c34ef Binary files /dev/null and b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 differ diff --git a/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt new file mode 100644 index 00000000..0d2941e1 --- /dev/null +++ b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 new file mode 100644 index 00000000..10b558e0 Binary files /dev/null and b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 differ diff --git a/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 new file mode 100644 index 00000000..5ec64eef Binary files /dev/null and b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 differ diff --git a/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 new file mode 100644 index 00000000..181a07f6 Binary files /dev/null and b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 differ diff --git a/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 new file mode 100644 index 00000000..2ae08a7b Binary files /dev/null and b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 differ diff --git a/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md new file mode 100644 index 00000000..175fa4f4 --- /dev/null +++ b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 new file mode 100644 index 00000000..0263fc30 Binary files /dev/null and b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 differ diff --git a/static.files/favicon-2c020d218678b618.svg b/static.files/favicon-2c020d218678b618.svg new file mode 100644 index 00000000..8b34b511 --- /dev/null +++ b/static.files/favicon-2c020d218678b618.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/static.files/favicon-32x32-422f7d1d52889060.png b/static.files/favicon-32x32-422f7d1d52889060.png new file mode 100644 index 00000000..69b8613c Binary files /dev/null and b/static.files/favicon-32x32-422f7d1d52889060.png differ diff --git a/static.files/main-20a3ad099b048cf2.js b/static.files/main-20a3ad099b048cf2.js new file mode 100644 index 00000000..133116e4 --- /dev/null +++ b/static.files/main-20a3ad099b048cf2.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 00000000..469959f1 --- /dev/null +++ b/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static.files/noscript-df360f571f6edeae.css b/static.files/noscript-df360f571f6edeae.css new file mode 100644 index 00000000..4c310ae5 --- /dev/null +++ b/static.files/noscript-df360f571f6edeae.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/static.files/rust-logo-151179464ae7ed46.svg b/static.files/rust-logo-151179464ae7ed46.svg new file mode 100644 index 00000000..62424d8f --- /dev/null +++ b/static.files/rust-logo-151179464ae7ed46.svg @@ -0,0 +1,61 @@ + + + diff --git a/static.files/rustdoc-dd39b87e5fcfba68.css b/static.files/rustdoc-dd39b87e5fcfba68.css new file mode 100644 index 00000000..77f89832 --- /dev/null +++ b/static.files/rustdoc-dd39b87e5fcfba68.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static.files/scrape-examples-ef1e698c1d417c0c.js b/static.files/scrape-examples-ef1e698c1d417c0c.js new file mode 100644 index 00000000..ba830e37 --- /dev/null +++ b/static.files/scrape-examples-ef1e698c1d417c0c.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static.files/search-d52510db62a78183.js b/static.files/search-d52510db62a78183.js new file mode 100644 index 00000000..a2824f29 --- /dev/null +++ b/static.files/search-d52510db62a78183.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-charA,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static.files/settings-4313503d2e1961c2.js b/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 00000000..ab425fe4 --- /dev/null +++ b/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-e66d777a5a92e9b2.js b/static.files/src-script-e66d777a5a92e9b2.js new file mode 100644 index 00000000..d0aebb85 --- /dev/null +++ b/static.files/src-script-e66d777a5a92e9b2.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-118b08c4c78b968e.js b/static.files/storage-118b08c4c78b968e.js new file mode 100644 index 00000000..98189467 --- /dev/null +++ b/static.files/storage-118b08c4c78b968e.js @@ -0,0 +1,24 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ No newline at end of file diff --git a/trait.impl/argh/trait.FromArgs.js b/trait.impl/argh/trait.FromArgs.js new file mode 100644 index 00000000..f08f13f1 --- /dev/null +++ b/trait.impl/argh/trait.FromArgs.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart_cli":[["impl FromArgs for SubCommand"],["impl FromArgs for Options"],["impl FromArgs for Options"],["impl FromArgs for Options"],["impl FromArgs for Options"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/argh/trait.SubCommand.js b/trait.impl/argh/trait.SubCommand.js new file mode 100644 index 00000000..0b458dce --- /dev/null +++ b/trait.impl/argh/trait.SubCommand.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart_cli":[["impl SubCommand for Options"],["impl SubCommand for Options"],["impl SubCommand for Options"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/argh/trait.SubCommands.js b/trait.impl/argh/trait.SubCommands.js new file mode 100644 index 00000000..f24f8630 --- /dev/null +++ b/trait.impl/argh/trait.SubCommands.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart_cli":[["impl SubCommands for SubCommand"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/argh/trait.TopLevelCommand.js b/trait.impl/argh/trait.TopLevelCommand.js new file mode 100644 index 00000000..437599c8 --- /dev/null +++ b/trait.impl/argh/trait.TopLevelCommand.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart_cli":[["impl TopLevelCommand for Options"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 00000000..303874c2 --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart":[["impl Clone for Client"],["impl Clone for Block"],["impl Clone for Html"],["impl Clone for Markup"],["impl Clone for TextContext"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js new file mode 100644 index 00000000..4752670f --- /dev/null +++ b/trait.impl/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart":[["impl From<FromHtmlStrError> for Error"],["impl From<FromHtmlStrError> for Error"],["impl From<ParseError> for Error"],["impl From<Error> for Error"],["impl From<Error> for FromHtmlStrError"],["impl From<Error> for FromHtmlStrError"],["impl From<Error> for Error"],["impl From<JoinError> for Error"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js new file mode 100644 index 00000000..e90a9ed1 --- /dev/null +++ b/trait.impl/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart":[["impl Default for Client"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/error/trait.Error.js b/trait.impl/core/error/trait.Error.js new file mode 100644 index 00000000..ef9be89c --- /dev/null +++ b/trait.impl/core/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart":[["impl Error for Error"],["impl Error for FromHtmlStrError"],["impl Error for FromHtmlStrError"],["impl Error for WrapBoxError"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 00000000..e7f40549 --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl Debug for Error"],["impl Debug for FromHtmlStrError"],["impl Debug for FromHtmlStrError"],["impl Debug for Client"],["impl Debug for WrapBoxError"],["impl Debug for Author"],["impl Debug for Block"],["impl Debug for Deviation"],["impl Debug for DeviationMedia"],["impl Debug for Html"],["impl Debug for Markup"],["impl Debug for MediaType"],["impl Debug for TextContext"],["impl Debug for OEmbed"],["impl Debug for Film"],["impl Debug for ScrapedStashInfo"],["impl Debug for Size"],["impl Debug for BrowsePageStream"],["impl Debug for Config"],["impl Debug for DeviationExtended"],["impl Debug for Download"],["impl Debug for DuperBrowse"],["impl Debug for Entities"],["impl Debug for PublicSession"],["impl Debug for RootStream"],["impl Debug for ScrapedWebPageInfo"],["impl Debug for StreamParams"],["impl Debug for Streams"]], +"deviantart_cli":[["impl Debug for Config"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 00000000..1886b5e6 --- /dev/null +++ b/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"deviantart":[["impl Display for Error"],["impl Display for FromHtmlStrError"],["impl Display for FromHtmlStrError"],["impl Display for WrapBoxError"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 00000000..9a40e422 --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl Freeze for Error",1,["deviantart::Error"]],["impl Freeze for FromHtmlStrError",1,["deviantart::types::scraped_stash_info::FromHtmlStrError"]],["impl Freeze for FromHtmlStrError",1,["deviantart::types::scraped_webpage_info::FromHtmlStrError"]],["impl Freeze for Client",1,["deviantart::client::Client"]],["impl Freeze for WrapBoxError",1,["deviantart::WrapBoxError"]],["impl Freeze for Author",1,["deviantart::types::deviation::Author"]],["impl Freeze for Block",1,["deviantart::types::deviation::Block"]],["impl Freeze for Deviation",1,["deviantart::types::deviation::Deviation"]],["impl Freeze for DeviationMedia",1,["deviantart::types::deviation::DeviationMedia"]],["impl Freeze for Html",1,["deviantart::types::deviation::Html"]],["impl Freeze for Markup",1,["deviantart::types::deviation::Markup"]],["impl Freeze for MediaType",1,["deviantart::types::deviation::MediaType"]],["impl Freeze for TextContext",1,["deviantart::types::deviation::TextContext"]],["impl Freeze for OEmbed",1,["deviantart::types::oembed::OEmbed"]],["impl Freeze for Film",1,["deviantart::types::scraped_stash_info::Film"]],["impl Freeze for ScrapedStashInfo",1,["deviantart::types::scraped_stash_info::ScrapedStashInfo"]],["impl Freeze for Size",1,["deviantart::types::scraped_stash_info::Size"]],["impl Freeze for BrowsePageStream",1,["deviantart::types::scraped_webpage_info::BrowsePageStream"]],["impl Freeze for Config",1,["deviantart::types::scraped_webpage_info::Config"]],["impl Freeze for DeviationExtended",1,["deviantart::types::scraped_webpage_info::DeviationExtended"]],["impl Freeze for Download",1,["deviantart::types::scraped_webpage_info::Download"]],["impl Freeze for DuperBrowse",1,["deviantart::types::scraped_webpage_info::DuperBrowse"]],["impl Freeze for Entities",1,["deviantart::types::scraped_webpage_info::Entities"]],["impl Freeze for PublicSession",1,["deviantart::types::scraped_webpage_info::PublicSession"]],["impl Freeze for RootStream",1,["deviantart::types::scraped_webpage_info::RootStream"]],["impl Freeze for ScrapedWebPageInfo",1,["deviantart::types::scraped_webpage_info::ScrapedWebPageInfo"]],["impl Freeze for StreamParams",1,["deviantart::types::scraped_webpage_info::StreamParams"]],["impl Freeze for Streams",1,["deviantart::types::scraped_webpage_info::Streams"]]], +"deviantart_cli":[["impl Freeze for SubCommand",1,["deviantart_cli::SubCommand"]],["impl Freeze for Options",1,["deviantart_cli::commands::download::Options"]],["impl Freeze for Options",1,["deviantart_cli::commands::login::Options"]],["impl Freeze for Options",1,["deviantart_cli::commands::search::Options"]],["impl Freeze for Config",1,["deviantart_cli::config::Config"]],["impl Freeze for Options",1,["deviantart_cli::Options"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 00000000..105772d0 --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl Send for Error",1,["deviantart::Error"]],["impl Send for FromHtmlStrError",1,["deviantart::types::scraped_stash_info::FromHtmlStrError"]],["impl Send for FromHtmlStrError",1,["deviantart::types::scraped_webpage_info::FromHtmlStrError"]],["impl Send for Client",1,["deviantart::client::Client"]],["impl Send for WrapBoxError",1,["deviantart::WrapBoxError"]],["impl Send for Author",1,["deviantart::types::deviation::Author"]],["impl Send for Block",1,["deviantart::types::deviation::Block"]],["impl Send for Deviation",1,["deviantart::types::deviation::Deviation"]],["impl Send for DeviationMedia",1,["deviantart::types::deviation::DeviationMedia"]],["impl Send for Html",1,["deviantart::types::deviation::Html"]],["impl Send for Markup",1,["deviantart::types::deviation::Markup"]],["impl Send for MediaType",1,["deviantart::types::deviation::MediaType"]],["impl Send for TextContext",1,["deviantart::types::deviation::TextContext"]],["impl Send for OEmbed",1,["deviantart::types::oembed::OEmbed"]],["impl Send for Film",1,["deviantart::types::scraped_stash_info::Film"]],["impl Send for ScrapedStashInfo",1,["deviantart::types::scraped_stash_info::ScrapedStashInfo"]],["impl Send for Size",1,["deviantart::types::scraped_stash_info::Size"]],["impl Send for BrowsePageStream",1,["deviantart::types::scraped_webpage_info::BrowsePageStream"]],["impl Send for Config",1,["deviantart::types::scraped_webpage_info::Config"]],["impl Send for DeviationExtended",1,["deviantart::types::scraped_webpage_info::DeviationExtended"]],["impl Send for Download",1,["deviantart::types::scraped_webpage_info::Download"]],["impl Send for DuperBrowse",1,["deviantart::types::scraped_webpage_info::DuperBrowse"]],["impl Send for Entities",1,["deviantart::types::scraped_webpage_info::Entities"]],["impl Send for PublicSession",1,["deviantart::types::scraped_webpage_info::PublicSession"]],["impl Send for RootStream",1,["deviantart::types::scraped_webpage_info::RootStream"]],["impl Send for ScrapedWebPageInfo",1,["deviantart::types::scraped_webpage_info::ScrapedWebPageInfo"]],["impl Send for StreamParams",1,["deviantart::types::scraped_webpage_info::StreamParams"]],["impl Send for Streams",1,["deviantart::types::scraped_webpage_info::Streams"]]], +"deviantart_cli":[["impl Send for SubCommand",1,["deviantart_cli::SubCommand"]],["impl Send for Options",1,["deviantart_cli::commands::download::Options"]],["impl Send for Options",1,["deviantart_cli::commands::login::Options"]],["impl Send for Options",1,["deviantart_cli::commands::search::Options"]],["impl Send for Config",1,["deviantart_cli::config::Config"]],["impl Send for Options",1,["deviantart_cli::Options"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 00000000..0c8fc2ea --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl Sync for Error",1,["deviantart::Error"]],["impl Sync for FromHtmlStrError",1,["deviantart::types::scraped_stash_info::FromHtmlStrError"]],["impl Sync for FromHtmlStrError",1,["deviantart::types::scraped_webpage_info::FromHtmlStrError"]],["impl Sync for Client",1,["deviantart::client::Client"]],["impl Sync for WrapBoxError",1,["deviantart::WrapBoxError"]],["impl Sync for Author",1,["deviantart::types::deviation::Author"]],["impl Sync for Block",1,["deviantart::types::deviation::Block"]],["impl Sync for Deviation",1,["deviantart::types::deviation::Deviation"]],["impl Sync for DeviationMedia",1,["deviantart::types::deviation::DeviationMedia"]],["impl Sync for Html",1,["deviantart::types::deviation::Html"]],["impl Sync for Markup",1,["deviantart::types::deviation::Markup"]],["impl Sync for MediaType",1,["deviantart::types::deviation::MediaType"]],["impl Sync for TextContext",1,["deviantart::types::deviation::TextContext"]],["impl Sync for OEmbed",1,["deviantart::types::oembed::OEmbed"]],["impl Sync for Film",1,["deviantart::types::scraped_stash_info::Film"]],["impl Sync for ScrapedStashInfo",1,["deviantart::types::scraped_stash_info::ScrapedStashInfo"]],["impl Sync for Size",1,["deviantart::types::scraped_stash_info::Size"]],["impl Sync for BrowsePageStream",1,["deviantart::types::scraped_webpage_info::BrowsePageStream"]],["impl Sync for Config",1,["deviantart::types::scraped_webpage_info::Config"]],["impl Sync for DeviationExtended",1,["deviantart::types::scraped_webpage_info::DeviationExtended"]],["impl Sync for Download",1,["deviantart::types::scraped_webpage_info::Download"]],["impl Sync for DuperBrowse",1,["deviantart::types::scraped_webpage_info::DuperBrowse"]],["impl Sync for Entities",1,["deviantart::types::scraped_webpage_info::Entities"]],["impl Sync for PublicSession",1,["deviantart::types::scraped_webpage_info::PublicSession"]],["impl Sync for RootStream",1,["deviantart::types::scraped_webpage_info::RootStream"]],["impl Sync for ScrapedWebPageInfo",1,["deviantart::types::scraped_webpage_info::ScrapedWebPageInfo"]],["impl Sync for StreamParams",1,["deviantart::types::scraped_webpage_info::StreamParams"]],["impl Sync for Streams",1,["deviantart::types::scraped_webpage_info::Streams"]]], +"deviantart_cli":[["impl Sync for SubCommand",1,["deviantart_cli::SubCommand"]],["impl Sync for Options",1,["deviantart_cli::commands::download::Options"]],["impl Sync for Options",1,["deviantart_cli::commands::login::Options"]],["impl Sync for Options",1,["deviantart_cli::commands::search::Options"]],["impl Sync for Config",1,["deviantart_cli::config::Config"]],["impl Sync for Options",1,["deviantart_cli::Options"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 00000000..8b31e817 --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl Unpin for Error",1,["deviantart::Error"]],["impl Unpin for FromHtmlStrError",1,["deviantart::types::scraped_stash_info::FromHtmlStrError"]],["impl Unpin for FromHtmlStrError",1,["deviantart::types::scraped_webpage_info::FromHtmlStrError"]],["impl Unpin for Client",1,["deviantart::client::Client"]],["impl Unpin for WrapBoxError",1,["deviantart::WrapBoxError"]],["impl Unpin for Author",1,["deviantart::types::deviation::Author"]],["impl Unpin for Block",1,["deviantart::types::deviation::Block"]],["impl Unpin for Deviation",1,["deviantart::types::deviation::Deviation"]],["impl Unpin for DeviationMedia",1,["deviantart::types::deviation::DeviationMedia"]],["impl Unpin for Html",1,["deviantart::types::deviation::Html"]],["impl Unpin for Markup",1,["deviantart::types::deviation::Markup"]],["impl Unpin for MediaType",1,["deviantart::types::deviation::MediaType"]],["impl Unpin for TextContext",1,["deviantart::types::deviation::TextContext"]],["impl Unpin for OEmbed",1,["deviantart::types::oembed::OEmbed"]],["impl Unpin for Film",1,["deviantart::types::scraped_stash_info::Film"]],["impl Unpin for ScrapedStashInfo",1,["deviantart::types::scraped_stash_info::ScrapedStashInfo"]],["impl Unpin for Size",1,["deviantart::types::scraped_stash_info::Size"]],["impl Unpin for BrowsePageStream",1,["deviantart::types::scraped_webpage_info::BrowsePageStream"]],["impl Unpin for Config",1,["deviantart::types::scraped_webpage_info::Config"]],["impl Unpin for DeviationExtended",1,["deviantart::types::scraped_webpage_info::DeviationExtended"]],["impl Unpin for Download",1,["deviantart::types::scraped_webpage_info::Download"]],["impl Unpin for DuperBrowse",1,["deviantart::types::scraped_webpage_info::DuperBrowse"]],["impl Unpin for Entities",1,["deviantart::types::scraped_webpage_info::Entities"]],["impl Unpin for PublicSession",1,["deviantart::types::scraped_webpage_info::PublicSession"]],["impl Unpin for RootStream",1,["deviantart::types::scraped_webpage_info::RootStream"]],["impl Unpin for ScrapedWebPageInfo",1,["deviantart::types::scraped_webpage_info::ScrapedWebPageInfo"]],["impl Unpin for StreamParams",1,["deviantart::types::scraped_webpage_info::StreamParams"]],["impl Unpin for Streams",1,["deviantart::types::scraped_webpage_info::Streams"]]], +"deviantart_cli":[["impl Unpin for SubCommand",1,["deviantart_cli::SubCommand"]],["impl Unpin for Options",1,["deviantart_cli::commands::download::Options"]],["impl Unpin for Options",1,["deviantart_cli::commands::login::Options"]],["impl Unpin for Options",1,["deviantart_cli::commands::search::Options"]],["impl Unpin for Config",1,["deviantart_cli::config::Config"]],["impl Unpin for Options",1,["deviantart_cli::Options"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 00000000..88715b85 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl !RefUnwindSafe for Error",1,["deviantart::Error"]],["impl !RefUnwindSafe for FromHtmlStrError",1,["deviantart::types::scraped_stash_info::FromHtmlStrError"]],["impl !RefUnwindSafe for FromHtmlStrError",1,["deviantart::types::scraped_webpage_info::FromHtmlStrError"]],["impl !RefUnwindSafe for Client",1,["deviantart::client::Client"]],["impl !RefUnwindSafe for WrapBoxError",1,["deviantart::WrapBoxError"]],["impl RefUnwindSafe for Author",1,["deviantart::types::deviation::Author"]],["impl RefUnwindSafe for Block",1,["deviantart::types::deviation::Block"]],["impl RefUnwindSafe for Deviation",1,["deviantart::types::deviation::Deviation"]],["impl RefUnwindSafe for DeviationMedia",1,["deviantart::types::deviation::DeviationMedia"]],["impl RefUnwindSafe for Html",1,["deviantart::types::deviation::Html"]],["impl RefUnwindSafe for Markup",1,["deviantart::types::deviation::Markup"]],["impl RefUnwindSafe for MediaType",1,["deviantart::types::deviation::MediaType"]],["impl RefUnwindSafe for TextContext",1,["deviantart::types::deviation::TextContext"]],["impl RefUnwindSafe for OEmbed",1,["deviantart::types::oembed::OEmbed"]],["impl RefUnwindSafe for Film",1,["deviantart::types::scraped_stash_info::Film"]],["impl RefUnwindSafe for ScrapedStashInfo",1,["deviantart::types::scraped_stash_info::ScrapedStashInfo"]],["impl RefUnwindSafe for Size",1,["deviantart::types::scraped_stash_info::Size"]],["impl RefUnwindSafe for BrowsePageStream",1,["deviantart::types::scraped_webpage_info::BrowsePageStream"]],["impl RefUnwindSafe for Config",1,["deviantart::types::scraped_webpage_info::Config"]],["impl RefUnwindSafe for DeviationExtended",1,["deviantart::types::scraped_webpage_info::DeviationExtended"]],["impl RefUnwindSafe for Download",1,["deviantart::types::scraped_webpage_info::Download"]],["impl RefUnwindSafe for DuperBrowse",1,["deviantart::types::scraped_webpage_info::DuperBrowse"]],["impl RefUnwindSafe for Entities",1,["deviantart::types::scraped_webpage_info::Entities"]],["impl RefUnwindSafe for PublicSession",1,["deviantart::types::scraped_webpage_info::PublicSession"]],["impl RefUnwindSafe for RootStream",1,["deviantart::types::scraped_webpage_info::RootStream"]],["impl RefUnwindSafe for ScrapedWebPageInfo",1,["deviantart::types::scraped_webpage_info::ScrapedWebPageInfo"]],["impl RefUnwindSafe for StreamParams",1,["deviantart::types::scraped_webpage_info::StreamParams"]],["impl RefUnwindSafe for Streams",1,["deviantart::types::scraped_webpage_info::Streams"]]], +"deviantart_cli":[["impl RefUnwindSafe for SubCommand",1,["deviantart_cli::SubCommand"]],["impl RefUnwindSafe for Options",1,["deviantart_cli::commands::download::Options"]],["impl RefUnwindSafe for Options",1,["deviantart_cli::commands::login::Options"]],["impl RefUnwindSafe for Options",1,["deviantart_cli::commands::search::Options"]],["impl RefUnwindSafe for Config",1,["deviantart_cli::config::Config"]],["impl RefUnwindSafe for Options",1,["deviantart_cli::Options"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 00000000..1a93a9a3 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl !UnwindSafe for Error",1,["deviantart::Error"]],["impl !UnwindSafe for FromHtmlStrError",1,["deviantart::types::scraped_stash_info::FromHtmlStrError"]],["impl !UnwindSafe for FromHtmlStrError",1,["deviantart::types::scraped_webpage_info::FromHtmlStrError"]],["impl !UnwindSafe for Client",1,["deviantart::client::Client"]],["impl !UnwindSafe for WrapBoxError",1,["deviantart::WrapBoxError"]],["impl UnwindSafe for Author",1,["deviantart::types::deviation::Author"]],["impl UnwindSafe for Block",1,["deviantart::types::deviation::Block"]],["impl UnwindSafe for Deviation",1,["deviantart::types::deviation::Deviation"]],["impl UnwindSafe for DeviationMedia",1,["deviantart::types::deviation::DeviationMedia"]],["impl UnwindSafe for Html",1,["deviantart::types::deviation::Html"]],["impl UnwindSafe for Markup",1,["deviantart::types::deviation::Markup"]],["impl UnwindSafe for MediaType",1,["deviantart::types::deviation::MediaType"]],["impl UnwindSafe for TextContext",1,["deviantart::types::deviation::TextContext"]],["impl UnwindSafe for OEmbed",1,["deviantart::types::oembed::OEmbed"]],["impl UnwindSafe for Film",1,["deviantart::types::scraped_stash_info::Film"]],["impl UnwindSafe for ScrapedStashInfo",1,["deviantart::types::scraped_stash_info::ScrapedStashInfo"]],["impl UnwindSafe for Size",1,["deviantart::types::scraped_stash_info::Size"]],["impl UnwindSafe for BrowsePageStream",1,["deviantart::types::scraped_webpage_info::BrowsePageStream"]],["impl UnwindSafe for Config",1,["deviantart::types::scraped_webpage_info::Config"]],["impl UnwindSafe for DeviationExtended",1,["deviantart::types::scraped_webpage_info::DeviationExtended"]],["impl UnwindSafe for Download",1,["deviantart::types::scraped_webpage_info::Download"]],["impl UnwindSafe for DuperBrowse",1,["deviantart::types::scraped_webpage_info::DuperBrowse"]],["impl UnwindSafe for Entities",1,["deviantart::types::scraped_webpage_info::Entities"]],["impl UnwindSafe for PublicSession",1,["deviantart::types::scraped_webpage_info::PublicSession"]],["impl UnwindSafe for RootStream",1,["deviantart::types::scraped_webpage_info::RootStream"]],["impl UnwindSafe for ScrapedWebPageInfo",1,["deviantart::types::scraped_webpage_info::ScrapedWebPageInfo"]],["impl UnwindSafe for StreamParams",1,["deviantart::types::scraped_webpage_info::StreamParams"]],["impl UnwindSafe for Streams",1,["deviantart::types::scraped_webpage_info::Streams"]]], +"deviantart_cli":[["impl UnwindSafe for SubCommand",1,["deviantart_cli::SubCommand"]],["impl UnwindSafe for Options",1,["deviantart_cli::commands::download::Options"]],["impl UnwindSafe for Options",1,["deviantart_cli::commands::login::Options"]],["impl UnwindSafe for Options",1,["deviantart_cli::commands::search::Options"]],["impl UnwindSafe for Config",1,["deviantart_cli::config::Config"]],["impl UnwindSafe for Options",1,["deviantart_cli::Options"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/de/trait.Deserialize.js b/trait.impl/serde/de/trait.Deserialize.js new file mode 100644 index 00000000..958e93dc --- /dev/null +++ b/trait.impl/serde/de/trait.Deserialize.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl<'de> Deserialize<'de> for Author"],["impl<'de> Deserialize<'de> for Block"],["impl<'de> Deserialize<'de> for Deviation"],["impl<'de> Deserialize<'de> for DeviationMedia"],["impl<'de> Deserialize<'de> for Html"],["impl<'de> Deserialize<'de> for Markup"],["impl<'de> Deserialize<'de> for MediaType"],["impl<'de> Deserialize<'de> for TextContext"],["impl<'de> Deserialize<'de> for OEmbed"],["impl<'de> Deserialize<'de> for Film"],["impl<'de> Deserialize<'de> for ScrapedStashInfo"],["impl<'de> Deserialize<'de> for Size"],["impl<'de> Deserialize<'de> for BrowsePageStream"],["impl<'de> Deserialize<'de> for Config"],["impl<'de> Deserialize<'de> for DeviationExtended"],["impl<'de> Deserialize<'de> for Download"],["impl<'de> Deserialize<'de> for DuperBrowse"],["impl<'de> Deserialize<'de> for Entities"],["impl<'de> Deserialize<'de> for PublicSession"],["impl<'de> Deserialize<'de> for RootStream"],["impl<'de> Deserialize<'de> for ScrapedWebPageInfo"],["impl<'de> Deserialize<'de> for StreamParams"],["impl<'de> Deserialize<'de> for Streams"]], +"deviantart_cli":[["impl<'de> Deserialize<'de> for Config"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/ser/trait.Serialize.js b/trait.impl/serde/ser/trait.Serialize.js new file mode 100644 index 00000000..2a8b6b3f --- /dev/null +++ b/trait.impl/serde/ser/trait.Serialize.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"deviantart":[["impl Serialize for Block"],["impl Serialize for Html"],["impl Serialize for Markup"],["impl Serialize for TextContext"]], +"deviantart_cli":[["impl Serialize for Config"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file