Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BersisSe/feather
/ functions
Functions
143 in github.com/BersisSe/feather
⨍
Functions
143
◇
Types & classes
31
↓ 29 callers
Method
set_state
Insert or replace a state value keyed by its concrete type. State values are stored as `Arc<T>` and can be accessed from any middleware. # Example
crates/feather/src/internals/context.rs:268
↓ 23 callers
Method
send_text
Sends given String as given text
crates/feather-runtime/src/http/response.rs:121
↓ 21 callers
Method
set_status
Sets the StatusCode of the response and Returns a Muteable Reference to the Response ```rust,ignore res.status(200).send_text("hello"); ```
crates/feather-runtime/src/http/response.rs:39
↓ 11 callers
Method
listen
Start the application and listen for incoming requests. This method blocks the current thread and starts accepting connections on the specified addre
crates/feather/src/internals/app.rs:363
↓ 9 callers
Method
add_header
Adds a header to the response. The header is a key-value pair that provides additional information about the response.
crates/feather-runtime/src/http/response.rs:47
↓ 9 callers
Method
to_raw
Converts the `Response` into a raw HTTP response as Bytes.
crates/feather-runtime/src/http/response.rs:54
↓ 8 callers
Method
use_middleware
(&mut self, middleware: impl Middleware + 'static)
crates/feather/src/internals/app.rs:331
↓ 5 callers
Method
send_json
(&mut self, data: &T)
crates/feather-runtime/src/http/response.rs:145
↓ 4 callers
Method
path
Returns the path of the Request
crates/feather-runtime/src/http/request.rs:101
↓ 3 callers
Method
context
Returns a mutable reference to the [AppContext]. The context is used for application-wide state management. Use it to store and retrieve data that ne
crates/feather/src/internals/app.rs:181
↓ 3 callers
Method
handle
(&self, req: Request, _stream: Option<TcpStream>)
crates/feather-runtime/tests/common/mod.rs:16
↓ 3 callers
Method
handle_io_error
(&self, e: io::Error, path: &Path, response: &mut Response)
crates/feather/src/middlewares/builtins.rs:144
↓ 3 callers
Method
lock
Get a mutable lock guard to access the inner state directly. This is useful when you need to hold the lock for multiple operations or need direct acc
crates/feather/src/internals/context.rs:131
↓ 2 callers
Function
create_test_request
Helper to create a test HTTP request
crates/feather-runtime/tests/common/mod.rs:26
↓ 2 callers
Method
handle
(&self, mut req: feather_runtime::http::Request, _stream: Option<MayStream>)
crates/feather/src/internals/service.rs:98
↓ 2 callers
Method
handle
(&self, request: &mut Request, response: &mut Response, ctx: &AppContext)
crates/feather/src/middlewares/common.rs:52
↓ 2 callers
Method
jwt
(&self)
crates/feather/src/internals/context.rs:248
↓ 2 callers
Method
send_bytes
Sends Given Bytes as plain text
crates/feather-runtime/src/http/response.rs:128
↓ 2 callers
Method
send_html
Takes a String(Should be valid HTML) and sends it's as Html
crates/feather-runtime/src/http/response.rs:135
↓ 2 callers
Method
set_common_headers
Internal helper to set common headers
crates/feather-runtime/src/http/response.rs:28
↓ 2 callers
Function
split_request
(buf: &[u8])
crates/feather-runtime/tests/common/mod.rs:39
↓ 1 callers
Function
api_router
()
examples/router/src/api.rs:4
↓ 1 callers
Method
decode
Decode and validate a token into claims of type `T`. # Arguments `token` - The JWT token string # Returns The decoded claims if valid, or an error
crates/feather/src/jwt.rs:136
↓ 1 callers
Method
encode
Encode claims into a JWT token. # Arguments `claims` - The claims to encode (must implement Serialize) # Returns The JWT token string if successfu
crates/feather/src/jwt.rs:170
↓ 1 callers
Method
finish_json
(&mut self, data: &T)
crates/feather/src/internals/runtime_extensions.rs:34
↓ 1 callers
Method
generate_simple
Generate a simple token with subject and time-to-live. This is a convenience method for quick token generation without defining a custom claims struc
crates/feather/src/jwt.rs:190
↓ 1 callers
Method
mount
Mount a [Router] to a specific path prefix. All routes within the router will be prepended with this prefix. # Example ```rust,ignore let mut app = Ap
crates/feather/src/internals/app.rs:293
↓ 1 callers
Method
query
Returns a Hashmap of the query parameters of the Request. Returns a Error if parsing fails
crates/feather-runtime/src/http/request.rs:84
↓ 1 callers
Method
run
Runs the server until shutdown is called
crates/feather-runtime/src/runtime/server.rs:76
↓ 1 callers
Method
set_error_handler
(&mut self, handler: ErrorHandler)
crates/feather/src/internals/app.rs:200
↓ 1 callers
Method
set_jwt
(&mut self, jwt: JwtManager)
crates/feather/src/internals/context.rs:227
↓ 1 callers
Method
set_params
(&mut self, params: HashMap<String, String>)
crates/feather-runtime/src/http/request.rs:92
↓ 1 callers
Method
validate
(&self)
crates/feather/src/jwt.rs:58
Function
_chainer
Can be used to chain two middlewares together. The first middleware will be executed first. If it returns `MiddlewareResult::Next`, the second middlew
crates/feather/src/middlewares/common.rs:101
Method
conn_handler
The main coroutine function: reads, dispatches, and manages stream lifecycle.
crates/feather-runtime/src/runtime/server.rs:143
Method
decrement
Decrement the counter
examples/counter/src/main.rs:16
Method
default
()
crates/feather/src/internals/context.rs:332
Method
default
()
crates/feather-runtime/src/runtime/server.rs:29
Function
derive_claim
(input: TokenStream)
crates/feather-macros/src/lib.rs:72
Method
finish_bytes
(&mut self, data: impl Into<Vec<u8>>)
crates/feather/src/internals/runtime_extensions.rs:28
Method
finish_html
(&mut self, data: impl Into<String>)
crates/feather/src/internals/runtime_extensions.rs:23
Method
finish_text
(&mut self, text: impl Into<String>)
crates/feather/src/internals/runtime_extensions.rs:18
Function
first
()
examples/middleware/src/main.rs:32
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
crates/feather-runtime/src/http/request.rs:111
Method
get_clone
Get a clone of the inner state. This is a convenience method for cloneable state types. It automatically acquires the lock, clones the value, and rel
crates/feather/src/internals/context.rs:154
Function
get_data
()
examples/router/src/api.rs:19
Function
get_handler
()
examples/api/src/main.rs:53
Method
get_state
Get state by type, panicking if not found. # Panics Panics if state of the requested type has not been set. Use [`try_get_state`] if you want to ha
crates/feather/src/internals/context.rs:310
Function
get_user
()
examples/context/src/main.rs:68
Function
global_logger
()
examples/router/src/main.rs:5
Method
guess_content_type
(path: &Path)
crates/feather/src/middlewares/builtins.rs:164
Method
handle
(&self, _request: &mut feather::Request, _response: &mut feather::Response, _ctx: &feather::AppContext)
examples/middleware/src/middleware.rs:8
Method
handle
(&self, req: &mut Request, res: &mut Response, ctx: &AppContext)
crates/feather/src/internals/router.rs:67
Method
handle
(&self, _request: &mut Request, _: &mut Response, _: &AppContext)
crates/feather/src/middlewares/builtins.rs:36
Method
increment
Increment the counter
examples/counter/src/main.rs:12
Method
json
(&self)
crates/feather-runtime/src/http/request.rs:79
Function
jwt_required
(_attr: TokenStream, item: TokenStream)
crates/feather-macros/src/lib.rs:356
Method
len_to_header_value
A Utily Function for wrapping HeaderValue for Content-Lenght
crates/feather-runtime/src/http/response.rs:211
Function
login
()
examples/context/src/main.rs:37
Function
main
Example: Error pipeline in Feather Demonstrates propagating errors from handlers and customizing error responses.
examples/error-pipeline/src/main.rs:5
Function
main
()
examples/middleware/src/main.rs:4
Function
main
()
examples/counter/src/main.rs:21
Function
main
To Use this example you need to have a 'public' directory with some static files in it in the same directory as this file. This example shows how to u
examples/serve/src/main.rs:6
Function
main
()
examples/logging/src/main.rs:6
Function
main
Main function
examples/basic-app/src/main.rs:7
Function
main
()
examples/context/src/main.rs:10
Function
main
()
examples/dynamic_route/src/main.rs:6
Function
main
()
examples/api/src/main.rs:8
Function
main
()
examples/router/src/main.rs:10
Function
main
()
examples/jwt/src/main.rs:9
Method
match_route
(pattern: &'r str, path: &'r str)
crates/feather/src/internals/service.rs:76
Method
max_body
(&mut self, size: usize)
crates/feather/src/internals/app.rs:211
Function
middleware_fn
(_attr: TokenStream, item: TokenStream)
crates/feather-macros/src/lib.rs:229
Method
new
Create a new JWT manager with a secret key. # Arguments `secret` - A cryptographically secure secret for signing/verifying tokens # Example ```rus
crates/feather/src/jwt.rs:109
Method
new
()
crates/feather/src/internals/app.rs:64
Method
new
()
crates/feather/src/internals/router.rs:30
Method
new
Creates a new State wrapping the given value.
crates/feather/src/internals/context.rs:63
Method
new
(origin: String)
crates/feather/src/middlewares/builtins.rs:78
Method
new
Create a new Server instance with the given Service
crates/feather-runtime/src/runtime/server.rs:51
Method
param
(&self, key: &str)
crates/feather-runtime/src/http/request.rs:96
Method
parse
Parses a Request from raw bytes if parsing fails returns a error
crates/feather-runtime/src/http/request.rs:36
Function
protected2
(claims: MyClaim)
examples/jwt/src/main.rs:78
Method
read_timeout
(&mut self, seconds: u64)
crates/feather/src/internals/app.rs:223
Method
redirect
Redirect the Request to the given location using a `location` header.
crates/feather-runtime/src/http/response.rs:197
Method
remote_addr
Returns the Remote address of the Request.
crates/feather-runtime/src/http/request.rs:105
Method
remove_state
Remove a state value of the given type. Returns `true` if the state was present and removed, `false` otherwise. # Example ```rust,ignore if ctx.rem
crates/feather/src/internals/context.rs:325
Method
route
(&mut self, method: Method, path: impl Into<Cow<'static, str>>, middleware: M)
crates/feather/src/internals/app.rs:276
Method
route
(&mut self, method: Method, path: impl Into<Cow<'static, str>>, mw: M)
crates/feather/src/internals/router.rs:41
Method
run_middleware
(mut request: &mut Request, routes: &[Route], global_middleware: &[Arc<dyn Middleware>], context: &AppContext,
crates/feather/src/internals/service.rs:23
Function
second
()
examples/middleware/src/main.rs:38
Method
send_error
Helper to send basic HTTP errors with proper headers
crates/feather-runtime/src/runtime/server.rs:127
Method
send_file
Take a [File] Struct and sends it as a file. File size is limited to 4MB. For larger files, chunked transfer\[WIP] is recommended.
crates/feather-runtime/src/http/response.rs:165
Method
shutdown
Initiates a graceful shutdown of the server
crates/feather-runtime/src/runtime/server.rs:71
Function
split_request
(buf: &[u8])
crates/feather-runtime/tests/request_tests.rs:6
Method
stack_size
(&mut self, size: usize)
crates/feather/src/internals/app.rs:248
Method
strip_unc
Internal Strip the Windows UNC Prefix.
crates/feather/src/middlewares/builtins.rs:135
Function
test_arc_sharing
()
crates/feather/src/internals/context.rs:451
Function
test_clone_shares_state
()
crates/feather/src/internals/context.rs:467
Function
test_complex_type
()
crates/feather/src/internals/context.rs:503
Function
test_concurrent_reads
()
crates/feather/src/internals/context.rs:558
next →
1–100 of 143, ranked by callers