Struct spot::Spot[][src]

pub struct Spot { /* fields omitted */ }

Implementations

Returns a Spot HTTP server instance with worker threads equal to the specified amount.

#Panics

panics if amount of threads is 0

Add middleware for specified resources.

The middleware function takes inn a function that returns a modified response and request, aswell as a boolean is true if the request should be forwarded or false if you wish the server to write the current response.

Add a http resource route which takes in the request and a premade respons, then returns a modifed response that is written to the client

Add a file to routes, it’s route is equal to the path where the file lies

Make all the files in the specified directory publicly avalible

Bind the server to the specified IP address and listen for inncomming http requests

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.