Hello rust community
I created a trait that returns a Result of Vec. But I am getting this error "size of values of Self cannot be known at compilation time. Can you help me understand why this error is happening, and how to fix it?
error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> src/schema/mod.rs:19:17
|
19 | ) -> Result<Vec<Self>, sqlx::Error>
| ^^^^^^^^^ doesn't have a size known at compile-time
|
note: required by a bound in `Vec`
--> /Users/leen.alhaimy/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:400:16
|
400 | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ^ required by this bound in `Vec`