Auto Generated Documentation

This commit is contained in:
github-actions[bot]
2021-03-15 09:29:14 +00:00
parent 799a22692f
commit b11f2a46f9
19 changed files with 326 additions and 52 deletions
@@ -31,6 +31,7 @@ implementors["parking_lot"] = [{"text":"impl Clone for WaitTimeoutResult","synth
implementors["parking_lot_core"] = [{"text":"impl Clone for ParkResult","synthetic":false,"types":[]},{"text":"impl Clone for UnparkResult","synthetic":false,"types":[]},{"text":"impl Clone for RequeueOp","synthetic":false,"types":[]},{"text":"impl Clone for FilterOp","synthetic":false,"types":[]},{"text":"impl Clone for UnparkToken","synthetic":false,"types":[]},{"text":"impl Clone for ParkToken","synthetic":false,"types":[]}];
implementors["percent_encoding"] = [{"text":"impl<'a> Clone for PercentEncode<'a>","synthetic":false,"types":[]},{"text":"impl<'a> Clone for PercentDecode<'a>","synthetic":false,"types":[]}];
implementors["proc_macro2"] = [{"text":"impl Clone for TokenStream","synthetic":false,"types":[]},{"text":"impl Clone for Span","synthetic":false,"types":[]},{"text":"impl Clone for TokenTree","synthetic":false,"types":[]},{"text":"impl Clone for Group","synthetic":false,"types":[]},{"text":"impl Clone for Delimiter","synthetic":false,"types":[]},{"text":"impl Clone for Punct","synthetic":false,"types":[]},{"text":"impl Clone for Spacing","synthetic":false,"types":[]},{"text":"impl Clone for Ident","synthetic":false,"types":[]},{"text":"impl Clone for Literal","synthetic":false,"types":[]},{"text":"impl Clone for IntoIter","synthetic":false,"types":[]}];
implementors["rapr"] = [{"text":"impl Clone for RaPost","synthetic":false,"types":[]}];
implementors["reqwest"] = [{"text":"impl Clone for Client","synthetic":false,"types":[]},{"text":"impl Clone for Proxy","synthetic":false,"types":[]},{"text":"impl Clone for Certificate","synthetic":false,"types":[]}];
implementors["ryu"] = [{"text":"impl Clone for Buffer","synthetic":false,"types":[]}];
implementors["serde"] = [{"text":"impl Clone for Error","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for UnitDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for BoolDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for I8Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for I16Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for I32Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for I64Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for IsizeDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for U8Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for U16Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for U64Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for UsizeDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for F32Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for F64Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for CharDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for I128Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for U128Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for U32Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, E&gt; Clone for StrDeserializer&lt;'de, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, E&gt; Clone for BorrowedStrDeserializer&lt;'de, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Clone for StringDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'a, E&gt; Clone for CowStrDeserializer&lt;'a, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'a, E&gt; Clone for BytesDeserializer&lt;'a, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, E&gt; Clone for BorrowedBytesDeserializer&lt;'de, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;I:&nbsp;Clone, E:&nbsp;Clone&gt; Clone for SeqDeserializer&lt;I, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;A:&nbsp;Clone&gt; Clone for SeqAccessDeserializer&lt;A&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, I, E&gt; Clone for MapDeserializer&lt;'de, I, E&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: Iterator + Clone,<br>&nbsp;&nbsp;&nbsp;&nbsp;I::Item: Pair,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;I::Item as Pair&gt;::Second: Clone,&nbsp;</span>","synthetic":false,"types":[]},{"text":"impl&lt;A:&nbsp;Clone&gt; Clone for MapAccessDeserializer&lt;A&gt;","synthetic":false,"types":[]},{"text":"impl Clone for IgnoredAny","synthetic":false,"types":[]},{"text":"impl&lt;'a&gt; Clone for Unexpected&lt;'a&gt;","synthetic":false,"types":[]}];
+1 -1
View File
@@ -32,7 +32,7 @@ implementors["parking_lot"] = [{"text":"impl Debug for WaitTimeoutResult","synth
implementors["parking_lot_core"] = [{"text":"impl Debug for ParkResult","synthetic":false,"types":[]},{"text":"impl Debug for UnparkResult","synthetic":false,"types":[]},{"text":"impl Debug for RequeueOp","synthetic":false,"types":[]},{"text":"impl Debug for FilterOp","synthetic":false,"types":[]},{"text":"impl Debug for UnparkToken","synthetic":false,"types":[]},{"text":"impl Debug for ParkToken","synthetic":false,"types":[]}];
implementors["percent_encoding"] = [{"text":"impl&lt;'a&gt; Debug for PercentDecode&lt;'a&gt;","synthetic":false,"types":[]}];
implementors["proc_macro2"] = [{"text":"impl Debug for TokenStream","synthetic":false,"types":[]},{"text":"impl Debug for LexError","synthetic":false,"types":[]},{"text":"impl Debug for Span","synthetic":false,"types":[]},{"text":"impl Debug for TokenTree","synthetic":false,"types":[]},{"text":"impl Debug for Delimiter","synthetic":false,"types":[]},{"text":"impl Debug for Group","synthetic":false,"types":[]},{"text":"impl Debug for Spacing","synthetic":false,"types":[]},{"text":"impl Debug for Punct","synthetic":false,"types":[]},{"text":"impl Debug for Ident","synthetic":false,"types":[]},{"text":"impl Debug for Literal","synthetic":false,"types":[]},{"text":"impl Debug for IntoIter","synthetic":false,"types":[]}];
implementors["rapr"] = [{"text":"impl Debug for RaprClient","synthetic":false,"types":[]}];
implementors["rapr"] = [{"text":"impl Debug for RaPost","synthetic":false,"types":[]},{"text":"impl Debug for RaSub","synthetic":false,"types":[]},{"text":"impl Debug for RaprClient","synthetic":false,"types":[]}];
implementors["reqwest"] = [{"text":"impl Debug for Error","synthetic":false,"types":[]},{"text":"impl Debug for Body","synthetic":false,"types":[]},{"text":"impl Debug for Client","synthetic":false,"types":[]},{"text":"impl Debug for ClientBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Request","synthetic":false,"types":[]},{"text":"impl Debug for RequestBuilder","synthetic":false,"types":[]},{"text":"impl Debug for Response","synthetic":false,"types":[]},{"text":"impl Debug for Proxy","synthetic":false,"types":[]},{"text":"impl&lt;'a&gt; Debug for Attempt&lt;'a&gt;","synthetic":false,"types":[]},{"text":"impl Debug for Action","synthetic":false,"types":[]},{"text":"impl Debug for Policy","synthetic":false,"types":[]},{"text":"impl Debug for Certificate","synthetic":false,"types":[]},{"text":"impl Debug for Identity","synthetic":false,"types":[]}];
implementors["scopeguard"] = [{"text":"impl Debug for Always","synthetic":false,"types":[]},{"text":"impl&lt;T, F, S&gt; Debug for ScopeGuard&lt;T, F, S&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Debug,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnOnce(T),<br>&nbsp;&nbsp;&nbsp;&nbsp;S: Strategy,&nbsp;</span>","synthetic":false,"types":[]}];
implementors["serde"] = [{"text":"impl Debug for Error","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for UnitDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for BoolDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for I8Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for I16Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for I32Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for I64Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for IsizeDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for U8Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for U16Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for U64Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for UsizeDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for F32Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for F64Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for CharDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for I128Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for U128Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for U32Deserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'a, E&gt; Debug for StrDeserializer&lt;'a, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, E&gt; Debug for BorrowedStrDeserializer&lt;'de, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;E&gt; Debug for StringDeserializer&lt;E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'a, E&gt; Debug for CowStrDeserializer&lt;'a, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'a, E&gt; Debug for BytesDeserializer&lt;'a, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, E&gt; Debug for BorrowedBytesDeserializer&lt;'de, E&gt;","synthetic":false,"types":[]},{"text":"impl&lt;I, E&gt; Debug for SeqDeserializer&lt;I, E&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: Debug,&nbsp;</span>","synthetic":false,"types":[]},{"text":"impl&lt;A:&nbsp;Debug&gt; Debug for SeqAccessDeserializer&lt;A&gt;","synthetic":false,"types":[]},{"text":"impl&lt;'de, I, E&gt; Debug for MapDeserializer&lt;'de, I, E&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: Iterator + Debug,<br>&nbsp;&nbsp;&nbsp;&nbsp;I::Item: Pair,<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;I::Item as Pair&gt;::Second: Debug,&nbsp;</span>","synthetic":false,"types":[]},{"text":"impl&lt;A:&nbsp;Debug&gt; Debug for MapAccessDeserializer&lt;A&gt;","synthetic":false,"types":[]},{"text":"impl Debug for IgnoredAny","synthetic":false,"types":[]},{"text":"impl&lt;'a&gt; Debug for Unexpected&lt;'a&gt;","synthetic":false,"types":[]}];
@@ -39,7 +39,7 @@ implementors["parking_lot"] = [{"text":"impl Freeze for WaitTimeoutResult","synt
implementors["parking_lot_core"] = [{"text":"impl Freeze for ParkResult","synthetic":true,"types":[]},{"text":"impl Freeze for UnparkResult","synthetic":true,"types":[]},{"text":"impl Freeze for RequeueOp","synthetic":true,"types":[]},{"text":"impl Freeze for FilterOp","synthetic":true,"types":[]},{"text":"impl Freeze for UnparkToken","synthetic":true,"types":[]},{"text":"impl Freeze for ParkToken","synthetic":true,"types":[]},{"text":"impl Freeze for SpinWait","synthetic":true,"types":[]}];
implementors["percent_encoding"] = [{"text":"impl Freeze for AsciiSet","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Freeze for PercentEncode&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Freeze for PercentDecode&lt;'a&gt;","synthetic":true,"types":[]}];
implementors["proc_macro2"] = [{"text":"impl Freeze for IntoIter","synthetic":true,"types":[]},{"text":"impl Freeze for TokenStream","synthetic":true,"types":[]},{"text":"impl Freeze for LexError","synthetic":true,"types":[]},{"text":"impl Freeze for Span","synthetic":true,"types":[]},{"text":"impl Freeze for TokenTree","synthetic":true,"types":[]},{"text":"impl Freeze for Group","synthetic":true,"types":[]},{"text":"impl Freeze for Delimiter","synthetic":true,"types":[]},{"text":"impl Freeze for Punct","synthetic":true,"types":[]},{"text":"impl Freeze for Spacing","synthetic":true,"types":[]},{"text":"impl Freeze for Ident","synthetic":true,"types":[]},{"text":"impl Freeze for Literal","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Freeze for RaprClient","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Freeze for RaPost","synthetic":true,"types":[]},{"text":"impl Freeze for RaSub","synthetic":true,"types":[]},{"text":"impl Freeze for RaprClient","synthetic":true,"types":[]}];
implementors["reqwest"] = [{"text":"impl Freeze for Error","synthetic":true,"types":[]},{"text":"impl !Freeze for Body","synthetic":true,"types":[]},{"text":"impl Freeze for Client","synthetic":true,"types":[]},{"text":"impl Freeze for ClientBuilder","synthetic":true,"types":[]},{"text":"impl !Freeze for Request","synthetic":true,"types":[]},{"text":"impl !Freeze for RequestBuilder","synthetic":true,"types":[]},{"text":"impl !Freeze for Response","synthetic":true,"types":[]},{"text":"impl !Freeze for Proxy","synthetic":true,"types":[]},{"text":"impl Freeze for Policy","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Freeze for Attempt&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl Freeze for Action","synthetic":true,"types":[]},{"text":"impl Freeze for Certificate","synthetic":true,"types":[]},{"text":"impl Freeze for Identity","synthetic":true,"types":[]}];
implementors["ryu"] = [{"text":"impl Freeze for Buffer","synthetic":true,"types":[]}];
implementors["scopeguard"] = [{"text":"impl Freeze for Always","synthetic":true,"types":[]},{"text":"impl&lt;T, F, S&gt; Freeze for ScopeGuard&lt;T, F, S&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: Freeze,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Freeze,&nbsp;</span>","synthetic":true,"types":[]}];
+1 -1
View File
@@ -39,7 +39,7 @@ implementors["parking_lot"] = [{"text":"impl Send for WaitTimeoutResult","synthe
implementors["parking_lot_core"] = [{"text":"impl Send for ParkResult","synthetic":true,"types":[]},{"text":"impl Send for UnparkResult","synthetic":true,"types":[]},{"text":"impl Send for RequeueOp","synthetic":true,"types":[]},{"text":"impl Send for FilterOp","synthetic":true,"types":[]},{"text":"impl Send for UnparkToken","synthetic":true,"types":[]},{"text":"impl Send for ParkToken","synthetic":true,"types":[]},{"text":"impl Send for SpinWait","synthetic":true,"types":[]}];
implementors["percent_encoding"] = [{"text":"impl Send for AsciiSet","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Send for PercentEncode&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Send for PercentDecode&lt;'a&gt;","synthetic":true,"types":[]}];
implementors["proc_macro2"] = [{"text":"impl !Send for IntoIter","synthetic":true,"types":[]},{"text":"impl !Send for TokenStream","synthetic":true,"types":[]},{"text":"impl !Send for LexError","synthetic":true,"types":[]},{"text":"impl !Send for Span","synthetic":true,"types":[]},{"text":"impl !Send for TokenTree","synthetic":true,"types":[]},{"text":"impl !Send for Group","synthetic":true,"types":[]},{"text":"impl Send for Delimiter","synthetic":true,"types":[]},{"text":"impl !Send for Punct","synthetic":true,"types":[]},{"text":"impl Send for Spacing","synthetic":true,"types":[]},{"text":"impl !Send for Ident","synthetic":true,"types":[]},{"text":"impl !Send for Literal","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Send for RaprClient","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Send for RaPost","synthetic":true,"types":[]},{"text":"impl Send for RaSub","synthetic":true,"types":[]},{"text":"impl Send for RaprClient","synthetic":true,"types":[]}];
implementors["reqwest"] = [{"text":"impl Send for Error","synthetic":true,"types":[]},{"text":"impl Send for Body","synthetic":true,"types":[]},{"text":"impl Send for Client","synthetic":true,"types":[]},{"text":"impl Send for ClientBuilder","synthetic":true,"types":[]},{"text":"impl Send for Request","synthetic":true,"types":[]},{"text":"impl Send for RequestBuilder","synthetic":true,"types":[]},{"text":"impl Send for Response","synthetic":true,"types":[]},{"text":"impl Send for Proxy","synthetic":true,"types":[]},{"text":"impl Send for Policy","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Send for Attempt&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl Send for Action","synthetic":true,"types":[]},{"text":"impl Send for Certificate","synthetic":true,"types":[]},{"text":"impl Send for Identity","synthetic":true,"types":[]}];
implementors["ryu"] = [{"text":"impl Send for Buffer","synthetic":true,"types":[]}];
implementors["scopeguard"] = [{"text":"impl Send for Always","synthetic":true,"types":[]},{"text":"impl&lt;T, F, S&gt; Send for ScopeGuard&lt;T, F, S&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: Send,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Send,&nbsp;</span>","synthetic":true,"types":[]}];
+1 -1
View File
@@ -39,7 +39,7 @@ implementors["parking_lot"] = [{"text":"impl Sync for WaitTimeoutResult","synthe
implementors["parking_lot_core"] = [{"text":"impl Sync for ParkResult","synthetic":true,"types":[]},{"text":"impl Sync for UnparkResult","synthetic":true,"types":[]},{"text":"impl Sync for RequeueOp","synthetic":true,"types":[]},{"text":"impl Sync for FilterOp","synthetic":true,"types":[]},{"text":"impl Sync for UnparkToken","synthetic":true,"types":[]},{"text":"impl Sync for ParkToken","synthetic":true,"types":[]},{"text":"impl Sync for SpinWait","synthetic":true,"types":[]}];
implementors["percent_encoding"] = [{"text":"impl Sync for AsciiSet","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Sync for PercentEncode&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Sync for PercentDecode&lt;'a&gt;","synthetic":true,"types":[]}];
implementors["proc_macro2"] = [{"text":"impl !Sync for IntoIter","synthetic":true,"types":[]},{"text":"impl !Sync for TokenStream","synthetic":true,"types":[]},{"text":"impl !Sync for LexError","synthetic":true,"types":[]},{"text":"impl !Sync for Span","synthetic":true,"types":[]},{"text":"impl !Sync for TokenTree","synthetic":true,"types":[]},{"text":"impl !Sync for Group","synthetic":true,"types":[]},{"text":"impl Sync for Delimiter","synthetic":true,"types":[]},{"text":"impl !Sync for Punct","synthetic":true,"types":[]},{"text":"impl Sync for Spacing","synthetic":true,"types":[]},{"text":"impl !Sync for Ident","synthetic":true,"types":[]},{"text":"impl !Sync for Literal","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Sync for RaprClient","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Sync for RaPost","synthetic":true,"types":[]},{"text":"impl Sync for RaSub","synthetic":true,"types":[]},{"text":"impl Sync for RaprClient","synthetic":true,"types":[]}];
implementors["reqwest"] = [{"text":"impl Sync for Error","synthetic":true,"types":[]},{"text":"impl Sync for Body","synthetic":true,"types":[]},{"text":"impl Sync for Client","synthetic":true,"types":[]},{"text":"impl Sync for ClientBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Request","synthetic":true,"types":[]},{"text":"impl Sync for RequestBuilder","synthetic":true,"types":[]},{"text":"impl Sync for Response","synthetic":true,"types":[]},{"text":"impl Sync for Proxy","synthetic":true,"types":[]},{"text":"impl Sync for Policy","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Sync for Attempt&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl Sync for Action","synthetic":true,"types":[]},{"text":"impl Sync for Certificate","synthetic":true,"types":[]},{"text":"impl Sync for Identity","synthetic":true,"types":[]}];
implementors["ryu"] = [{"text":"impl Sync for Buffer","synthetic":true,"types":[]}];
implementors["scopeguard"] = [{"text":"impl Sync for Always","synthetic":true,"types":[]},{"text":"impl&lt;T, F, S&gt; Sync for ScopeGuard&lt;T, F, S&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Sync,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: FnOnce(T),<br>&nbsp;&nbsp;&nbsp;&nbsp;S: Strategy,&nbsp;</span>","synthetic":false,"types":[]}];
+1 -1
View File
@@ -39,7 +39,7 @@ implementors["parking_lot"] = [{"text":"impl Unpin for WaitTimeoutResult","synth
implementors["parking_lot_core"] = [{"text":"impl Unpin for ParkResult","synthetic":true,"types":[]},{"text":"impl Unpin for UnparkResult","synthetic":true,"types":[]},{"text":"impl Unpin for RequeueOp","synthetic":true,"types":[]},{"text":"impl Unpin for FilterOp","synthetic":true,"types":[]},{"text":"impl Unpin for UnparkToken","synthetic":true,"types":[]},{"text":"impl Unpin for ParkToken","synthetic":true,"types":[]},{"text":"impl Unpin for SpinWait","synthetic":true,"types":[]}];
implementors["percent_encoding"] = [{"text":"impl Unpin for AsciiSet","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Unpin for PercentEncode&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Unpin for PercentDecode&lt;'a&gt;","synthetic":true,"types":[]}];
implementors["proc_macro2"] = [{"text":"impl Unpin for IntoIter","synthetic":true,"types":[]},{"text":"impl Unpin for TokenStream","synthetic":true,"types":[]},{"text":"impl Unpin for LexError","synthetic":true,"types":[]},{"text":"impl Unpin for Span","synthetic":true,"types":[]},{"text":"impl Unpin for TokenTree","synthetic":true,"types":[]},{"text":"impl Unpin for Group","synthetic":true,"types":[]},{"text":"impl Unpin for Delimiter","synthetic":true,"types":[]},{"text":"impl Unpin for Punct","synthetic":true,"types":[]},{"text":"impl Unpin for Spacing","synthetic":true,"types":[]},{"text":"impl Unpin for Ident","synthetic":true,"types":[]},{"text":"impl Unpin for Literal","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Unpin for RaprClient","synthetic":true,"types":[]}];
implementors["rapr"] = [{"text":"impl Unpin for RaPost","synthetic":true,"types":[]},{"text":"impl Unpin for RaSub","synthetic":true,"types":[]},{"text":"impl Unpin for RaprClient","synthetic":true,"types":[]}];
implementors["reqwest"] = [{"text":"impl Unpin for Error","synthetic":true,"types":[]},{"text":"impl Unpin for Body","synthetic":true,"types":[]},{"text":"impl Unpin for Client","synthetic":true,"types":[]},{"text":"impl Unpin for ClientBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Request","synthetic":true,"types":[]},{"text":"impl Unpin for RequestBuilder","synthetic":true,"types":[]},{"text":"impl Unpin for Response","synthetic":true,"types":[]},{"text":"impl Unpin for Proxy","synthetic":true,"types":[]},{"text":"impl Unpin for Policy","synthetic":true,"types":[]},{"text":"impl&lt;'a&gt; Unpin for Attempt&lt;'a&gt;","synthetic":true,"types":[]},{"text":"impl Unpin for Action","synthetic":true,"types":[]},{"text":"impl Unpin for Certificate","synthetic":true,"types":[]},{"text":"impl Unpin for Identity","synthetic":true,"types":[]}];
implementors["ryu"] = [{"text":"impl Unpin for Buffer","synthetic":true,"types":[]}];
implementors["scopeguard"] = [{"text":"impl Unpin for Always","synthetic":true,"types":[]},{"text":"impl&lt;T, F, S&gt; Unpin for ScopeGuard&lt;T, F, S&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: Unpin,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: Unpin,&nbsp;</span>","synthetic":true,"types":[]}];
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -3,4 +3,4 @@
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rapr/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate rapr</p><div class="block version"><p>Version 0.1.0</p></div><a id="all-types" href="index.html"><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span>
</span>
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.RaprClient.html">RaprClient</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "rapr";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
<span class="in-band">List of all items</span></h1><h3 id="Structs">Structs</h3><ul class="structs docblock"><li><a href="struct.RaPost.html">RaPost</a></li><li><a href="struct.RaSub.html">RaSub</a></li><li><a href="struct.RaprClient.html">RaprClient</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "rapr";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
+27 -2
View File
@@ -1,5 +1,30 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `rapr` crate."><meta name="keywords" content="rust, rustlang, rust-lang, rapr"><title>rapr - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rapr/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate rapr</p><div class="block version"><p>Version 0.1.0</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all rapr's items</p></a><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"></p><script>window.sidebarCurrent = {name: "rapr", ty: "mod", relpath: "../"};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/rapr/lib.rs.html#1-17" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">rapr</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.RaprClient.html" title="rapr::RaprClient struct">RaprClient</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "rapr";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/rapr/lib.rs.html#1-44" title="goto source code">[src]</a></span><span class="in-band">Crate <a class="mod" href="">rapr</a></span></h1><div class="docblock"><h1 id="reddit-api-wrapper" class="section-header"><a href="#reddit-api-wrapper">Reddit api wrapper</a></h1>
<p>Example program<br />
You need tokio to use this.<br />
Make sure to use <code>tokio = { version = &quot;1.3.*&quot;, features = [&quot;full&quot;] }</code></p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">rapr</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">tokio</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">rapr</span>::{<span class="ident">RaprClient</span>,<span class="ident">RaSub</span>};
<span class="attribute">#[<span class="ident">tokio</span>::<span class="ident">main</span>]</span>
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">main</span>() {
<span class="kw">let</span> <span class="ident">client</span> <span class="op">=</span> <span class="ident">RaprClient</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sub</span> <span class="op">=</span> <span class="ident">RaSub</span>::<span class="ident">new</span>(<span class="string">&quot;pics&quot;</span>);
<span class="ident">client</span>.<span class="ident">fetch</span>(<span class="number">10</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">sub</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
<span class="kw">for</span> <span class="ident">post</span> <span class="kw">in</span> <span class="ident">sub</span>.<span class="ident">posts</span> {
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{}&quot;</span>,<span class="ident">post</span>.<span class="ident">title</span>);
}
}</pre></div>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.RaPost.html" title="rapr::RaPost struct">RaPost</a></td><td class="docblock-short"><p>Reddit post object
(more like repost object).<br />
Keeps track of post information.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RaSub.html" title="rapr::RaSub struct">RaSub</a></td><td class="docblock-short"><p>RaSub</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.RaprClient.html" title="rapr::RaprClient struct">RaprClient</a></td><td class="docblock-short"><p>Reddit api client.<br />
Uses a <a href="https://docs.rs/reqwest/0.11.2/reqwest/struct.Client.html">reqwest::Client</a> internally.<br />
Currently no authentication</p>
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "rapr";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../rapr/struct.RaPost.html">
</head>
<body>
<p>Redirecting to <a href="../../rapr/struct.RaPost.html">../../rapr/struct.RaPost.html</a>...</p>
<script>location.replace("../../rapr/struct.RaPost.html" + location.search + location.hash);</script>
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../rapr/struct.RaSub.html">
</head>
<body>
<p>Redirecting to <a href="../../rapr/struct.RaSub.html">../../rapr/struct.RaSub.html</a>...</p>
<script>location.replace("../../rapr/struct.RaSub.html" + location.search + location.hash);</script>
</body>
</html>
+1 -1
View File
@@ -1 +1 @@
initSidebarItems({"struct":[["RaprClient",""]]});
initSidebarItems({"struct":[["RaPost","Reddit post object (more like repost object). Keeps track of post information."],["RaSub","RaSubSubreddit object Keeps track of posts"],["RaprClient","Reddit api client. Uses a reqwest::Client internally. Currently no authentication"]]});
+40
View File
@@ -0,0 +1,40 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RaPost` struct in crate `rapr`."><meta name="keywords" content="rust, rustlang, rust-lang, RaPost"><title>rapr::RaPost - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rapr/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RaPost</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.datetime">datetime</a><a href="#structfield.downvotes">downvotes</a><a href="#structfield.id">id</a><a href="#structfield.json">json</a><a href="#structfield.permalink">permalink</a><a href="#structfield.text">text</a><a href="#structfield.title">title</a><a href="#structfield.upvotes">upvotes</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.parse">parse</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">rapr</a></p><script>window.sidebarCurrent = {name: "RaPost", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/rapr/rapr.rs.html#24-34" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">rapr</a>::<wbr><a class="struct" href="">RaPost</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RaPost {
pub id: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
pub datetime: <a class="struct" href="../chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/local/struct.Local.html" title="struct chrono::offset::local::Local">Local</a>&gt;,
pub title: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
pub text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
pub permalink: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
pub upvotes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
pub downvotes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
pub json: <a class="enum" href="../json/value/enum.JsonValue.html" title="enum json::value::JsonValue">JsonValue</a>,
// some fields omitted
}</pre></div><div class="docblock"><p>Reddit post object
(more like repost object).<br />
Keeps track of post information.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.id" class="structfield small-section-header"><a href="#structfield.id" class="anchor field"></a><code>id: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.datetime" class="structfield small-section-header"><a href="#structfield.datetime" class="anchor field"></a><code>datetime: <a class="struct" href="../chrono/datetime/struct.DateTime.html" title="struct chrono::datetime::DateTime">DateTime</a>&lt;<a class="struct" href="../chrono/offset/local/struct.Local.html" title="struct chrono::offset::local::Local">Local</a>&gt;</code></span><span id="structfield.title" class="structfield small-section-header"><a href="#structfield.title" class="anchor field"></a><code>title: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.text" class="structfield small-section-header"><a href="#structfield.text" class="anchor field"></a><code>text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;</code></span><span id="structfield.permalink" class="structfield small-section-header"><a href="#structfield.permalink" class="anchor field"></a><code>permalink: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.upvotes" class="structfield small-section-header"><a href="#structfield.upvotes" class="anchor field"></a><code>upvotes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span id="structfield.downvotes" class="structfield small-section-header"><a href="#structfield.downvotes" class="anchor field"></a><code>downvotes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></span><span id="structfield.json" class="structfield small-section-header"><a href="#structfield.json" class="anchor field"></a><code>json: <a class="enum" href="../json/value/enum.JsonValue.html" title="enum json::value::JsonValue">JsonValue</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#50-105" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;id: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;title: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;text: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;texttype: TextType, <br>&nbsp;&nbsp;&nbsp;&nbsp;permalink: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;upvotes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;downvotes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;json: &amp;<a class="enum" href="../json/value/enum.JsonValue.html" title="enum json::value::JsonValue">JsonValue</a><br>) -&gt; Self</code><a class="srclink" href="../src/rapr/rapr.rs.html#52-77" title="goto source code">[src]</a></h4><div class="docblock"><p>Generate new post object (you probably don't need this).</p>
</div><h4 id="method.parse" class="method"><code>pub fn <a href="#method.parse" class="fnname">parse</a>(post: &amp;<a class="enum" href="../json/value/enum.JsonValue.html" title="enum json::value::JsonValue">JsonValue</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a>, <a class="enum" href="../json/error/enum.Error.html" title="enum json::error::Error">Error</a>&gt;</code><a class="srclink" href="../src/rapr/rapr.rs.html#79-104" title="goto source code">[src]</a></h4><div class="docblock"><p>Parse json from <code>json['data']['children']</code> array elements.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#23" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a class="srclink" href="../src/rapr/rapr.rs.html#23" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#36-48" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/rapr/rapr.rs.html#37-47" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="../src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="../tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="../tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="../src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="../src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-ToOwned" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code><a href="#impl-ToOwned" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Owned" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4 id="method.to_owned" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fnname">to_owned</a>(&amp;self) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4 id="method.clone_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fnname">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91" title="goto source code">[src]</a></h4><div class="item-info hidden"><div class="stab unstable"><details><summary><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "rapr";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RaSub` struct in crate `rapr`."><meta name="keywords" content="rust, rustlang, rust-lang, RaSub"><title>rapr::RaSub - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rapr/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RaSub</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.name">name</a><a href="#structfield.posts">posts</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">rapr</a></p><script>window.sidebarCurrent = {name: "RaSub", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/rapr/rapr.rs.html#111-115" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">rapr</a>::<wbr><a class="struct" href="">RaSub</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RaSub {
pub name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
pub posts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a>&gt;,
// some fields omitted
}</pre></div><div class="docblock"><h1 id="rasub" class="section-header"><a href="#rasub">RaSub</a></h1>
<p>Subreddit object<br />
Keeps track of posts</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.name" class="structfield small-section-header"><a href="#structfield.name" class="anchor field"></a><code>name: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span><span id="structfield.posts" class="structfield small-section-header"><a href="#structfield.posts" class="anchor field"></a><code>posts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a>&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#117-126" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a class="srclink" href="../src/rapr/rapr.rs.html#119-125" title="goto source code">[src]</a></h4><div class="docblock"><p>Generate subreddit object</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#110" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/rapr/rapr.rs.html#110" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-Instrument" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="../tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href="#impl-Instrument" class="anchor"></a><a class="srclink" href="../src/tracing/instrument.rs.html#155" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.instrument" class="method hidden"><code>pub fn <a href="../tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="../tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="../src/tracing/instrument.rs.html#38-40" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
</div><h4 id="method.in_current_span" class="method hidden"><code>pub fn <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span" class="fnname">in_current_span</a>(self) -&gt; <a class="struct" href="../tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class="srclink" href="../src/tracing/instrument.rs.html#74-76" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="../tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541-548" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-547" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#589-598" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#595-597" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#575-584" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#581-583" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "rapr";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
+7 -2
View File
@@ -1,7 +1,12 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RaprClient` struct in crate `rapr`."><meta name="keywords" content="rust, rustlang, rust-lang, RaprClient"><title>rapr::RaprClient - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rapr/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RaprClient</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.fetch">fetch</a><a href="#method.new">new</a><a href="#method.subreddit">subreddit</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">rapr</a></p><script>window.sidebarCurrent = {name: "RaprClient", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/rapr/rapr.rs.html#79-82" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">rapr</a>::<wbr><a class="struct" href="">RaprClient</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RaprClient { /* fields omitted */ }</pre></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#84-139" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; Self</code><a class="srclink" href="../src/rapr/rapr.rs.html#85-90" title="goto source code">[src]</a></h4><h4 id="method.subreddit" class="method"><code>pub fn <a href="#method.subreddit" class="fnname">subreddit</a>(name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; RaSub</code><a class="srclink" href="../src/rapr/rapr.rs.html#91-97" title="goto source code">[src]</a></h4><h4 id="method.fetch" class="method"><code>pub async fn <a href="#method.fetch" class="fnname">fetch</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;sub: &amp;mut RaSub<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;RaPost&gt;, Error&gt;</code><a class="srclink" href="../src/rapr/rapr.rs.html#98-138" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#78" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/rapr/rapr.rs.html#78" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../rapr/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct RaprClient</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.fetch">fetch</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">rapr</a></p><script>window.sidebarCurrent = {name: "RaprClient", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/rapr/rapr.rs.html#132-135" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">rapr</a>::<wbr><a class="struct" href="">RaprClient</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct RaprClient { /* fields omitted */ }</pre></div><div class="docblock"><p>Reddit api client.<br />
Uses a <a href="https://docs.rs/reqwest/0.11.2/reqwest/struct.Client.html">reqwest::Client</a> internally.<br />
Currently no authentication</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#137-190" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; Self</code><a class="srclink" href="../src/rapr/rapr.rs.html#138-143" title="goto source code">[src]</a></h4><h4 id="method.fetch" class="method"><code>pub async fn <a href="#method.fetch" class="fnname">fetch</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;sub: &amp;mut <a class="struct" href="../rapr/struct.RaSub.html" title="struct rapr::RaSub">RaSub</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../rapr/struct.RaPost.html" title="struct rapr::RaPost">RaPost</a>&gt;, Error&gt;</code><a class="srclink" href="../src/rapr/rapr.rs.html#147-189" title="goto source code">[src]</a></h4><div class="docblock"><p>Fetch posts from subreddit and store them in the subreddit object.
Note: First fetch always seems to pull two pinned posts which are not marked pinned in the json</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/rapr/rapr.rs.html#131" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/rapr/rapr.rs.html#131" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../rapr/struct.RaprClient.html" title="struct rapr::RaprClient">RaprClient</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../src/rapr/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
+1 -1
View File
File diff suppressed because one or more lines are too long
+61 -7
View File
@@ -18,22 +18,76 @@
<span id="15">15</span>
<span id="16">16</span>
<span id="17">17</span>
<span id="18">18</span>
<span id="19">19</span>
<span id="20">20</span>
<span id="21">21</span>
<span id="22">22</span>
<span id="23">23</span>
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//!# Reddit api wrapper</span>
<span class="doccomment">//!Example program </span>
<span class="doccomment">//!You need tokio to use this. </span>
<span class="doccomment">//!Make sure to use `tokio = { version = &quot;1.3.*&quot;, features = [&quot;full&quot;] }`</span>
<span class="doccomment">//!```rust</span>
<span class="doccomment">//!extern crate rapr;</span>
<span class="doccomment">//!extern crate tokio;</span>
<span class="doccomment">//!use crate::rapr::{RaprClient,RaSub};</span>
<span class="doccomment">//!#[tokio::main]</span>
<span class="doccomment">//!async fn main() {</span>
<span class="doccomment">//! let client = RaprClient::new();</span>
<span class="doccomment">//! let mut sub = RaSub::new(&quot;pics&quot;);</span>
<span class="doccomment">//! client.fetch(10, &amp;mut sub).await.unwrap();</span>
<span class="doccomment">//! for post in sub.posts {</span>
<span class="doccomment">//! println!(&quot;{}&quot;,post.title);</span>
<span class="doccomment">//! }</span>
<span class="doccomment">//!}</span>
<span class="kw">mod</span> <span class="ident">rapr</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">rapr</span>::<span class="ident">RaprClient</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">rapr</span>::{<span class="ident">RaPost</span>, <span class="ident">RaSub</span>, <span class="ident">RaprClient</span>};
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
<span class="kw">mod</span> <span class="ident">tests</span> {
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">rapr</span>::{<span class="ident">RaSub</span>, <span class="ident">RaprClient</span>};
<span class="attribute">#[<span class="ident">tokio</span>::<span class="ident">test</span>]</span>
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">subreddit</span>() {
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">rapr</span>::<span class="ident">RaprClient</span>;
<span class="kw">let</span> <span class="ident">client</span> <span class="op">=</span> <span class="ident">RaprClient</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sub</span> <span class="op">=</span> <span class="ident">RaprClient</span>::<span class="ident">subreddit</span>(<span class="string">&quot;rust&quot;</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sub</span> <span class="op">=</span> <span class="ident">RaSub</span>::<span class="ident">new</span>(<span class="string">&quot;rust&quot;</span>);
<span class="ident">client</span>.<span class="ident">fetch</span>(<span class="number">10</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">sub</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:#?}&quot;</span>, <span class="ident">sub</span>.<span class="ident">posts</span>.<span class="ident">len</span>());
<span class="ident">client</span>.<span class="ident">fetch</span>(<span class="number">5</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">sub</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:#?}&quot;</span>, <span class="ident">sub</span>.<span class="ident">posts</span>.<span class="ident">len</span>());
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:#?}&quot;</span>, <span class="ident">sub</span>.<span class="ident">pinned_posts</span>());
<span class="comment">// println!(&quot;{:#?}&quot;, sub.posts.len());</span>
<span class="comment">// client.fetch(5, &amp;mut sub).await.unwrap();</span>
<span class="kw">for</span> <span class="ident">post</span> <span class="kw">in</span> <span class="ident">sub</span>.<span class="ident">posts</span> {
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{:#?}&quot;</span>, <span class="ident">post</span>);
}
}
<span class="attribute">#[<span class="ident">tokio</span>::<span class="ident">test</span>]</span>
<span class="kw">async</span> <span class="kw">fn</span> <span class="ident">title</span>() {
<span class="kw">let</span> <span class="ident">client</span> <span class="op">=</span> <span class="ident">RaprClient</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">sub</span> <span class="op">=</span> <span class="ident">RaSub</span>::<span class="ident">new</span>(<span class="string">&quot;rust&quot;</span>);
<span class="ident">client</span>.<span class="ident">fetch</span>(<span class="number">10</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">sub</span>).<span class="kw">await</span>.<span class="ident">unwrap</span>();
<span class="kw">for</span> <span class="ident">post</span> <span class="kw">in</span> <span class="ident">sub</span>.<span class="ident">posts</span> {
<span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">post</span>.<span class="ident">title</span>);
}
}
}
</pre></div>
+133 -31
View File
@@ -140,6 +140,57 @@
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">json</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">reqwest</span>;
@@ -153,14 +204,27 @@
<span class="ident">HttpGetError</span>,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">Copy</span>)]</span>
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">TextType</span> {
<span class="ident">HTML</span>,
<span class="ident">Raw</span>,
<span class="ident">Empty</span>,
}
<span class="doccomment">/// Reddit post object</span>
<span class="doccomment">/// (more like repost object). </span>
<span class="doccomment">/// Keeps track of post information.</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RaPost</span> {
<span class="ident">id</span>: <span class="ident">String</span>,
<span class="ident">datetime</span>: <span class="ident">DateTime</span><span class="op">&lt;</span><span class="ident">Local</span><span class="op">&gt;</span>,
<span class="ident">title</span>: <span class="ident">String</span>,
<span class="ident">text</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">json</span>: <span class="ident">json</span>::<span class="ident">JsonValue</span>,
<span class="ident">pinned</span>: <span class="ident">bool</span>,
<span class="kw">pub</span> <span class="ident">id</span>: <span class="ident">String</span>,
<span class="kw">pub</span> <span class="ident">datetime</span>: <span class="ident">DateTime</span><span class="op">&lt;</span><span class="ident">Local</span><span class="op">&gt;</span>,
<span class="kw">pub</span> <span class="ident">title</span>: <span class="ident">String</span>,
<span class="kw">pub</span> <span class="ident">text</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
<span class="ident">texttype</span>: <span class="ident">TextType</span>,
<span class="kw">pub</span> <span class="ident">permalink</span>: <span class="ident">String</span>,
<span class="kw">pub</span> <span class="ident">upvotes</span>: <span class="ident">u32</span>,
<span class="kw">pub</span> <span class="ident">downvotes</span>: <span class="ident">u32</span>,
<span class="kw">pub</span> <span class="ident">json</span>: <span class="ident">json</span>::<span class="ident">JsonValue</span>,
}
<span class="kw">impl</span> <span class="ident">fmt</span>::<span class="ident">Debug</span> <span class="kw">for</span> <span class="ident">RaPost</span> {
@@ -170,31 +234,73 @@
.<span class="ident">field</span>(<span class="string">&quot;datetime&quot;</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">datetime</span>)
.<span class="ident">field</span>(<span class="string">&quot;title&quot;</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">title</span>)
.<span class="ident">field</span>(<span class="string">&quot;text&quot;</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">text</span>)
.<span class="ident">field</span>(<span class="string">&quot;texttype&quot;</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">texttype</span>)
.<span class="ident">field</span>(<span class="string">&quot;upvotes&quot;</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">upvotes</span>)
.<span class="ident">field</span>(<span class="string">&quot;downvotes&quot;</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">downvotes</span>)
.<span class="ident">finish</span>()
}
}
<span class="kw">impl</span> <span class="ident">RaPost</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">id</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">title</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">json</span>: <span class="kw-2">&amp;</span><span class="ident">json</span>::<span class="ident">JsonValue</span>, <span class="ident">pinned</span>: <span class="ident">bool</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="doccomment">/// Generate new post object (you probably don&#39;t need this).</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
<span class="ident">id</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
<span class="ident">title</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
<span class="ident">text</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">str</span><span class="op">&gt;</span>,
<span class="ident">texttype</span>: <span class="ident">TextType</span>,
<span class="ident">permalink</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
<span class="ident">upvotes</span>: <span class="ident">u32</span>,
<span class="ident">downvotes</span>: <span class="ident">u32</span>,
<span class="ident">json</span>: <span class="kw-2">&amp;</span><span class="ident">json</span>::<span class="ident">JsonValue</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="self">Self</span> {
<span class="kw">let</span> <span class="ident">_text</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">text</span> {
<span class="prelude-val">Some</span>(<span class="ident">text</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">Some</span>(<span class="ident">text</span>.<span class="ident">to_string</span>()),
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="prelude-val">None</span>,
};
<span class="self">Self</span> {
<span class="ident">id</span>: <span class="ident">id</span>.<span class="ident">to_string</span>(),
<span class="ident">title</span>: <span class="ident">title</span>.<span class="ident">to_string</span>(),
<span class="ident">datetime</span>: <span class="ident">Local</span>::<span class="ident">now</span>(), <span class="comment">// Temp</span>
<span class="ident">text</span>: <span class="prelude-val">Some</span>(<span class="ident">String</span>::<span class="ident">from</span>(<span class="string">&quot;&quot;</span>)),
<span class="ident">text</span>: <span class="ident">_text</span>,
<span class="ident">texttype</span>,
<span class="ident">permalink</span>: <span class="ident">String</span>::<span class="ident">from</span>(<span class="ident">permalink</span>),
<span class="ident">upvotes</span>,
<span class="ident">downvotes</span>,
<span class="ident">json</span>: <span class="ident">json</span>.<span class="ident">clone</span>(),
<span class="ident">pinned</span>,
}
}
<span class="doccomment">/// Parse json from `json[&#39;data&#39;][&#39;children&#39;]` array elements.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">parse</span>(<span class="ident">post</span>: <span class="kw-2">&amp;</span><span class="ident">json</span>::<span class="ident">JsonValue</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">RaPost</span>, <span class="ident">json</span>::<span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">text</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">str</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">post</span>[<span class="string">&quot;selftext&quot;</span>].<span class="ident">as_str</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">texttype</span>: <span class="ident">TextType</span> <span class="op">=</span> <span class="ident">TextType</span>::<span class="ident">Empty</span>;
<span class="comment">// Reddit always returns an empty string on selftext</span>
<span class="comment">// if there is no text. So this shouldn&#39;t panic!</span>
<span class="comment">// Some also have both selftext and selftext_html</span>
<span class="comment">// I am only taking selftext from these.</span>
<span class="kw">if</span> <span class="ident">text</span>.<span class="ident">unwrap</span>().<span class="ident">is_empty</span>() {
<span class="ident">text</span> <span class="op">=</span> <span class="ident">post</span>[<span class="string">&quot;selftext_html&quot;</span>].<span class="ident">as_str</span>();
<span class="kw">if</span> <span class="ident">text</span> <span class="op">!</span><span class="op">=</span> <span class="prelude-val">None</span> {
<span class="ident">texttype</span> <span class="op">=</span> <span class="ident">TextType</span>::<span class="ident">HTML</span>;
}
} <span class="kw">else</span> {
<span class="ident">texttype</span> <span class="op">=</span> <span class="ident">TextType</span>::<span class="ident">Raw</span>;
}
<span class="prelude-val">Ok</span>(<span class="ident">RaPost</span>::<span class="ident">new</span>(
<span class="ident">json</span>::<span class="ident">stringify</span>(<span class="ident">post</span>[<span class="string">&quot;name&quot;</span>].<span class="ident">clone</span>()).<span class="ident">as_str</span>(),
<span class="ident">json</span>::<span class="ident">stringify</span>(<span class="ident">post</span>[<span class="string">&quot;title&quot;</span>].<span class="ident">clone</span>()).<span class="ident">as_str</span>(),
<span class="ident">post</span>[<span class="string">&quot;name&quot;</span>].<span class="ident">as_str</span>().<span class="ident">unwrap</span>(),
<span class="ident">post</span>[<span class="string">&quot;title&quot;</span>].<span class="ident">as_str</span>().<span class="ident">unwrap</span>(),
<span class="ident">text</span>,
<span class="ident">texttype</span>,
<span class="ident">post</span>[<span class="string">&quot;permalink&quot;</span>].<span class="ident">as_str</span>().<span class="ident">unwrap</span>(),
<span class="ident">post</span>[<span class="string">&quot;ups&quot;</span>].<span class="ident">as_u32</span>().<span class="ident">unwrap</span>(),
<span class="ident">post</span>[<span class="string">&quot;downs&quot;</span>].<span class="ident">as_u32</span>().<span class="ident">unwrap</span>(),
<span class="ident">post</span>,
<span class="ident">post</span>[<span class="string">&quot;pinned&quot;</span>].<span class="ident">as_bool</span>().<span class="ident">unwrap</span>(),
))
}
}
<span class="doccomment">///# RaSub</span>
<span class="doccomment">///Subreddit object </span>
<span class="doccomment">///Keeps track of posts</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RaSub</span> {
<span class="kw">pub</span> <span class="ident">name</span>: <span class="ident">String</span>,
@@ -203,21 +309,19 @@
}
<span class="kw">impl</span> <span class="ident">RaSub</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pinned_posts</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">RaPost</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pinned_posts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">RaPost</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">post</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">posts</span> {
<span class="kw">if</span> <span class="ident">post</span>.<span class="ident">pinned</span> {
<span class="ident">pinned_posts</span>.<span class="ident">push</span>(<span class="ident">post</span>.<span class="ident">clone</span>());
}
}
<span class="kw">if</span> <span class="ident">pinned_posts</span>.<span class="ident">is_empty</span>() {
<span class="kw">return</span> <span class="prelude-val">None</span>;
} <span class="kw">else</span> {
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">pinned_posts</span>);
<span class="doccomment">/// Generate subreddit object</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">RaSub</span> {
<span class="ident">RaSub</span> {
<span class="ident">name</span>: <span class="ident">String</span>::<span class="ident">from</span>(<span class="ident">name</span>),
<span class="ident">posts</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
<span class="ident">after</span>: <span class="prelude-val">None</span>,
}
}
}
<span class="doccomment">/// Reddit api client. </span>
<span class="doccomment">/// Uses a [reqwest::Client](https://docs.rs/reqwest/0.11.2/reqwest/struct.Client.html) internally. </span>
<span class="doccomment">/// Currently no authentication</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">RaprClient</span> {
<span class="ident">oauth</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
@@ -231,13 +335,9 @@
<span class="ident">rwclient</span>: <span class="ident">reqwest</span>::<span class="ident">Client</span>::<span class="ident">new</span>(),
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">subreddit</span>(<span class="ident">name</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">RaSub</span> {
<span class="ident">RaSub</span> {
<span class="ident">name</span>: <span class="ident">String</span>::<span class="ident">from</span>(<span class="ident">name</span>),
<span class="ident">posts</span>: <span class="ident">Vec</span>::<span class="ident">new</span>(),
<span class="ident">after</span>: <span class="prelude-val">None</span>,
}
}
<span class="doccomment">/// Fetch posts from subreddit and store them in the subreddit object.</span>
<span class="doccomment">/// Note: First fetch always seems to pull two pinned posts which are not marked pinned in the json</span>
<span class="kw">pub</span> <span class="kw">async</span> <span class="kw">fn</span> <span class="ident">fetch</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">count</span>: <span class="ident">u32</span>, <span class="ident">sub</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">RaSub</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">RaPost</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">url</span> <span class="op">=</span> <span class="kw">match</span> <span class="self">self</span>.<span class="ident">oauth</span> {
<span class="prelude-val">None</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;https://reddit.com/r/{}.json&quot;</span>, <span class="ident">sub</span>.<span class="ident">name</span>),
@@ -271,7 +371,9 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">parsed_posts</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">RaPost</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">post</span> <span class="kw">in</span> <span class="ident">raw_posts</span> {
<span class="ident">parsed_posts</span>.<span class="ident">push</span>(<span class="ident">RaPost</span>::<span class="ident">parse</span>(<span class="kw-2">&amp;</span><span class="ident">post</span>[<span class="string">&quot;data&quot;</span>]).<span class="ident">unwrap</span>());
<span class="kw">if</span> <span class="ident">post</span>[<span class="string">&quot;kind&quot;</span>].<span class="ident">as_str</span>().<span class="ident">unwrap</span>() <span class="op">=</span><span class="op">=</span> <span class="string">&quot;t3&quot;</span> {
<span class="ident">parsed_posts</span>.<span class="ident">push</span>(<span class="ident">RaPost</span>::<span class="ident">parse</span>(<span class="kw-2">&amp;</span><span class="ident">post</span>[<span class="string">&quot;data&quot;</span>]).<span class="ident">unwrap</span>());
}
}
<span class="kw">if</span> <span class="ident">parsed</span>[<span class="string">&quot;data&quot;</span>][<span class="string">&quot;after&quot;</span>].<span class="ident">is_string</span>() {
<span class="ident">sub</span>.<span class="ident">after</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">parsed</span>[<span class="string">&quot;data&quot;</span>][<span class="string">&quot;after&quot;</span>].<span class="ident">to_string</span>());