pub struct Catalog { /* private fields */ }
Expand description

A summarized list of all threads on a board including thread numbers, their modification time and reply count.

Example

let catalog = Catalog::new(&client, "g").await.unwrap();

// print the first page

println!("{:?}", catalog.page(0));

to get all threads from catalog

Implementations

Returns a new Catalog from a given board.

Errors

This function will return an error if the board isn’t valid

Updates the last accessed time to be the current time.

Returns a reference to the [Page] if it exists. None otherwise

Returns all the [Page]s from the Catalog.

Trait Implementations

Formats the value using the given formatter. Read more

Fetches the given URL with an If-Modifed-Since header.

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Refreshes the time in the Thread instance. also handles the sleep of the thread update.

Errors

This function should probably not fail but can fail if the subtraction from time::Duration results in an overflow which normally should not occur, in which case, the program will panic

Updates the status of a Response and generates a new Catalog if needed.

Converts the Response into a Catalog

The Output type.

Returns an updated catalog.

The type of the output.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

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

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more