Skip to content

Add how to use the std library documentation #497

Closed
@mdinger

Description

@mdinger

The std library can be confusing, especially if you haven't used them yet. Add a how to read the std library section. It should do:

  • Should be near the beginning
  • There is no global list of methods available on a type. They are generally grouped by traits the type has available.
  • typeExt is a common convention for where the most important methods go.
    • This is because the methods are implemented by the std library and aren't built-in
    • If the type is built-in then you cannot extend it from std. So you need a new trait. That's why typeExt are there.
  • To use a trait, you can examine the implementors to determine which types have that ability.
  • A type which impements Deref will have methods available from non-obvious sources. This is detailed on reddit

[EDITS]

  • changed core to built-in
  • Added Deref bullet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions