Skip to main content

Request

Enum Request 

Source
pub enum Request {
    Open(PathBuf),
    CommentsTaken,
    Agent(AgentEvent),
    Test(TestRun),
    Pane(String),
    Reply {
        id: u32,
        author: String,
        text: String,
        found: Sender<bool>,
    },
    Suggest {
        file: String,
        line: usize,
        kind: String,
        quote: String,
        text: String,
        author: String,
        made: Sender<u32>,
    },
    Threads(Sender<String>),
    TakeThreads(Sender<String>),
    Plan {
        path: PathBuf,
        reply: Sender<Decision>,
    },
}
Expand description

Requests that need the app itself, drained on its next tick.

Variants§

§

Open(PathBuf)

§

CommentsTaken

The socket thread already emptied the shared list.

§

Agent(AgentEvent)

§

Test(TestRun)

§

Pane(String)

Input for a Cellix running as a pane, as the mod’s JSON.

§

Reply

An agent answering a comment.

Fields

§id: u32
§author: String
§text: String
§found: Sender<bool>

Whether that comment exists, so an answer can’t vanish with a success.

§

Suggest

An agent suggesting a comment the reviewer didn’t make. Answers with its number.

Fields

§file: String
§line: usize
§kind: String
§quote: String
§text: String
§author: String
§made: Sender<u32>
§

Threads(Sender<String>)

Wants the comments on the project, as JSON.

§

TakeThreads(Sender<String>)

Wants the comments no agent has seen, as JSON, and marks them seen.

§

Plan

A plan is waiting. The connection stays open until reply is answered or dropped.

Fields

§path: PathBuf

Trait Implementations§

Source§

impl Debug for Request

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.