Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Eden (eden@weirder.earth)'s status on Tuesday, 26-Feb-2019 18:12:12 EST Eden Eden

    Major struggling with using #Rust traits.

    I've put the relevant bits of code here;
    https://pastebin.com/tqBLiqdZ

    I've written a trait that has associated types <T1, T2>, and is implemented for a struct with basic types <usize, i32>.

    In another function with the trait boundary Struct<t1, t2> : trait<t1, t2>, I'm trying to use the object to call the functions in the trait.

    Rust is unhappywith <t1, t2>, and instead wants where Struct<'_, t1, i32>: STruct<'t1, i32>

    Could anyone please explain why?

    In conversation Tuesday, 26-Feb-2019 18:12:12 EST from weirder.earth permalink

    Attachments

    1. [Rust] pub struct DataLayer
      from Pastebin
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.