Skip to content

Instantly share code, notes, and snippets.

View stella3d's full-sized avatar

Stella Cannefax stella3d

View GitHub Profile
@stella3d
stella3d / example.rs
Last active March 26, 2025 20:06
Send not general error example
pub struct ExampleClient { }
impl ExampleClient {
// calling .iter().map(|s| s.as_str()) on a Vec<String>
// and passing it into the function with this signature causes a
// compile error in poem_openapi's macro that compiles the server,
// about Send's implementation not being general enough for &sqlx::Pool<_> and &ShardConfig,
// saying they're only implemented for some &'0 T
pub async fn get_with_str_iter<T>(
&self,