Enum trawler::LobstersRequest [] [src]

pub enum LobstersRequest {
    Frontpage,
    Recent,
    User(u32),
    Story([u8; 6]),
    Login(u32),
    Logout(u32),
    StoryVote(u32[u8; 6]Vote),
    CommentVote(u32[u8; 6]Vote),
    Submit {
        id: [u8; 6],
        user: u32,
        title: String,
    },
    Comment {
        id: [u8; 6],
        user: u32,
        story: [u8; 6],
        parent: Option<[u8; 6]>,
    },
}

A single lobste.rs client request.

Note that one request may end up issuing multiple backend queries. To see which queries are executed by the real lobste.rs, see the lobste.rs source code.

Variants

Render the frontpage.

Render a user's profile.

Note that the id here should be treated as a username.

Render a particular story.

Log in the given user.

Note that a user need not be logged in by a LobstersRequest in order for a user-action (like LobstersRequest::Submit) to be issued for that user. The id here should be considered both a username and an id. The user with the username derived from this id should have the given id.

Log out the given user.

Note that a user need not be logged in by a LobstersRequest in order for a user-action (like LobstersRequest::Submit) to be issued for that user.

Have the given user issue an up or down vote for the given story.

Note that the load generator does not guarantee that a given user will only issue a single vote for a given story, nor that they will issue an equivalent number of upvotes and downvotes for a given story.

Have the given user issue an up or down vote for the given comment.

Note that the load generator does not guarantee that a given user will only issue a single vote for a given comment, nor that they will issue an equivalent number of upvotes and downvotes for a given comment.

Have the given user submit a new story to the site.

Note that the generator dictates the ids of new stories so that it can more easily keep track of which stories exist, and thus which stories can be voted for or commented on.

Fields of Submit

The new story's id.

The story's submitter.

The story's title.

Have the given user submit a new comment to the given story.

Note that the generator dictates the ids of new comments so that it can more easily keep track of which comments exist for the purposes of generating comment votes and deeper threads.

Fields of Comment

The new comment's id.

The comment's author.

The story the comment is for.

The id of the comment's parent comment, if any.

Trait Implementations

impl Debug for LobstersRequest
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for LobstersRequest
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for LobstersRequest
[src]

impl PartialEq for LobstersRequest
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Ord for LobstersRequest
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for LobstersRequest
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for LobstersRequest
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations