Enum fancp::Request[][src]

pub enum Request {
    Get(GetRequest),
    Set(SetRequest),
    Adj(AdjRequest),
}
Expand description

Types of FCP requests.

Variants

The GETrequest.

The SET request.

The ADJ (adjust) request.

Implementations

Tries to parse a slice of bytes into a Request.

Errors

parse will error if the string is not a valid FCP request.

Examples

use fancp::{Request, SetRequest};
let req = "SET %25";
assert_eq!(Ok(Request::Set(SetRequest::Percentage(25))), Request::parse(req));

Returns the method name, as a static &str.

Examples

use fancp::{Request, GetRequest};
let req = Request::Get(GetRequest::Config);
assert_eq!("GET", req.method());

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

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

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

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.