daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. error[E0277]: the trait bound `models::Book: diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Bool), _>` is not satisfied
  2.   --> src/models.rs:28:14
  3.    |
  4. 28 |             .load::<Book>(conn)
  5.    |              ^^^^ the trait `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Bool), _>` is not implemented for `models::Book`
  6.    |
  7.    = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, models::Book>` for `diesel::query_builder::SelectStatement<schema::books::table, diesel::query_builder::select_clause::DefaultSelectClause, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::WhereClause<diesel::expression::operators::Eq<schema::books::columns::id, diesel::expression::bound::Bound<diesel::sql_types::Integer, i32>>>>`
  8.  
  9. error[E0061]: this function takes 1 parameter but 2 parameters were supplied
  10.   --> src/models.rs:29:14
  11.    |
  12. 29 |             .expect("Error loading book {}", id)
  13.    |              ^^^^^^ expected 1 parameter
  14.  
  15. error[E0277]: the trait bound `models::Book: diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Bool), _>` is not satisfied
  16.   --> src/models.rs:35:14
  17.    |
  18. 35 |             .load::<Book>(conn)
  19.    |              ^^^^ the trait `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Bool), _>` is not implemented for `models::Book`
  20.    |
  21.    = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, models::Book>` for `diesel::query_builder::SelectStatement<schema::books::table, diesel::query_builder::select_clause::DefaultSelectClause, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::NoWhereClause, diesel::query_builder::order_clause::OrderClause<diesel::expression::operators::Desc<schema::books::columns::id>>>`
  22.  
  23. error[E0277]: the trait bound `models::Book: diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Bool), _>` is not satisfied
  24.   --> src/models.rs:50:14
  25.    |
  26. 50 |             .get_result::<Book>(conn)
  27.    |              ^^^^^^^^^^ the trait `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Text, diesel::sql_types::Text, diesel::sql_types::Bool), _>` is not implemented for `models::Book`
  28.    |
  29.    = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, models::Book>` for `diesel::query_builder::UpdateStatement<schema::books::table, diesel::query_builder::where_clause::WhereClause<diesel::expression::operators::Eq<schema::books::columns::id, diesel::expression::bound::Bound<diesel::sql_types::Integer, i32>>>, (diesel::query_builder::update_statement::changeset::Assign<schema::books::columns::author, diesel::expression::bound::Bound<diesel::sql_types::Text, std::string::String>>, diesel::query_builder::update_statement::changeset::Assign<schema::books::columns::published, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>, diesel::query_builder::update_statement::changeset::Assign<schema::books::columns::title, diesel::expression::bound::Bound<diesel::sql_types::Text, std::string::String>>)>`
  30.  
  31. error: aborting due to 4 previous errors
  32.  
  33. Some errors occurred: E0061, E0277.
  34. For more information about an error, try `rustc --explain E0061`.
  35. error: Could not compile `api`.
  36.  
  37. To learn more, run the command again with --verbose.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top