15

Least complex rust type signature

Comments
  • 7
    I don’t have a clue about what all of that means but I love it!
  • 1
    looks like some attribute essentially containing a function pointer

    but not even sure, havent seen that 'for' in signatures yet.

    definitely based.
  • 3
    A lazy static byte slice with thread safe obtainment logic.

    The none reference param suggests that it implements a type parameter of some sort which takes a generic dependency, otherwise you could just wrap whatever function get_stuff you're assigning in a closure and turn
    `for<'a> FnOnce(&'a ()) -> &'a [u8]`
    into
    `FnOnce() -> &'static [u8]`
Add Comment