Closed jsandler18 closed 4 years ago
You can't use GenericClient
as a trait object. You can instead use it as a type parameter:
pub async fn get_user_by_username<T>(client: &T, username: &str) -> Result<Option<Self>, Error>
where
T: GenericClient,
{
...
}
Hello, I have this simple function:
And I am getting this error:
Any idea what is wrong or how I can fix it? The Rust Compiler Error Index seems to say that it is on the trait owner to fix it? Does this mean I am SOL?