Struct dot4ch::threadlist::Catalog [−][src]
pub struct Catalog { /* fields omitted */ }
Expand description
A summarized list of all threads on a board including thread numbers, their modification time and reply count.
Example
let list1 = Catalog::new(&mut client, "g")?; println!("{:?}", resp.threads)
to get all threads from catalog
Implementations
impl Catalog
[src]
impl Catalog
[src]pub async fn new(
client: &mut Arc<Mutex<Client>>,
board: &str
) -> Result<Self, Box<dyn Error>>
[src]
pub async fn new(
client: &mut Arc<Mutex<Client>>,
board: &str
) -> Result<Self, Box<dyn Error>>
[src]Returns a new ThreadList
from a given board.
Error
This function will return an error if the board isn’t valid
pub fn update_time(self)
[src]
pub fn page(&self, idx: usize) -> Option<&Page>
[src]
pub fn page(&self, idx: usize) -> Option<&Page>
[src]Returns a reference to the thread depending on argument.
Uses the get()
method on Vec
.
- Returns
None
if the provided index is out of bounds. - Returns a single element if a single index is provided.
- Returns a slice of elements if a range is provided.
Example
let threadlist: ThreadList = /* your threadlist */; println!("{:?}", thread.get(1..4));
pub fn all_pages(self) -> Vec<Page>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnwindSafe for Catalog
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]