Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andrewleverette/rust_warp_api
/ functions
Functions
15 in github.com/andrewleverette/rust_warp_api
⨍
Functions
15
◇
Types & classes
1
↓ 5 callers
Function
with_db
(db: Db)
src/routes.rs:71
↓ 2 callers
Function
json_body
()
src/routes.rs:75
↓ 1 callers
Function
create_customer
POST /customers
src/routes.rs:30
↓ 1 callers
Function
customer_routes
All customer routes
src/routes.rs:9
↓ 1 callers
Function
customers_list
GET /customers
src/routes.rs:20
↓ 1 callers
Function
delete_customer
DELETE /customers/{guid}
src/routes.rs:62
↓ 1 callers
Function
get_customer
GET /customers/{guid}
src/routes.rs:41
↓ 1 callers
Function
init_db
Initializes the data store Returns a Db type that either contains customer data or is empty.
src/db.rs:16
↓ 1 callers
Function
update_customer
PUT /customers/{guid}
src/routes.rs:51
Function
create_customer
Creates a new customer Adds a new customer object to the data store if the customer doesn't already exist # Arguments `new_customer` - `Customer` t
src/handlers.rs:28
Function
delete_customer
Deletes a customer from the data store If the customer exists in the data store, the customer is removed and a NO CONTENT status code is returned. If
src/handlers.rs:102
Function
get_customer
Gets a single customer from the data store Returns a JSON object of an existing customer. If the customer is not found, it returns a NOT FOUND status
src/handlers.rs:53
Function
list_customers
Returns a list of customers as JSON # Arguments `db` - `Db` -> thread safe vector of Customer objects
src/handlers.rs:13
Function
main
()
src/main.rs:9
Function
update_customer
Updates an existing customer Overwrites an existing customer in the data store and returns an OK status code. If the customer is not found, a NOT FOU
src/handlers.rs:75