Rust

Fix Rust E0599 "no method named" — Import the Trait, Fix the Receiver, or Use the Current Name

The compiler searched the receiver's type, every type it dereferences to, and every trait in scope, and the name was in none of them. This guide separates the reasons — a trait that was never imported, a receiver one wrapper away from the type that has the method, a name that is misspelled, renamed, or removed, a function that takes no instance at all, a method another module keeps private, and an operation aimed at the wrong stage of an iterator chain — and matches each one to its repair.

Written November 22, 2026 · Tested with Rust 1.99.0 · 48 min read

By the end of this guide
  • The rule underneath: a method call is a search with a fixed route
  • The first failure: the method exists, but its trait is not in scope
  • The second failure: the method is on a different type than the receiver
  • The third failure: the name is a typo

Written November 22, 2026

Tested with Rust 1.99.0

What this guide is

Error E0599 has one sentence at its center: a method was used on a type which does not implement it. That is the wording of the error codes index, and its own example is the smallest form of the error — a struct with no methods at all, called as if it had one. The errors worked through below are less empty than that. In each of them the method exists somewhere: on a trait the type implements, on a type wrapped inside the receiver, on a neighboring stage of a pipeline, under a slightly different name, or under the same name in a module that keeps it private. The compiler searched, did not find a visible method of that name for that receiver, and reported the search's failure. The repair is decided by asking where the method actually lives and why the search did not reach it.

That question is the whole guide. E0599 is never really about the call site alone; it is about the distance between the call site and the method's home. Sometimes the distance is one import line, because trait methods are callable only when the trait is in scope. Sometimes it is one layer of wrapping — an Option, a &str where an owned string was needed, a field inside a struct. Sometimes it is time: the name was correct in an older standard library and has been renamed or removed since. Sometimes it is grammar: the function was never a method, because it has no self parameter, and no instance can call it. And sometimes the method exists, is spelled right, and is simply not visible from the module doing the calling.

This guide works through the error in the order that separates its causes: the lookup rule underneath — which places the compiler searches, in which order — then the failures one family at a time: the trait out of scope, the wrong receiver, the wrong name, the associated function called as a method, the private method, and the iterator pipeline. Then the fixes in reach order, the traps, a decision table, and a checklist.

Build every program in this guide with rustc --edition 2021. The two file-reading programs also need a file named data.txt beside them, holding the single line hello, rust. In the compiler transcripts below, the full file path in the location line is shortened to the file name.

The rule underneath: a method call is a search with a fixed route

The Reference describes a method call as a lookup with a defined procedure. The compiler first builds a list of candidate receiver types: the receiver's own type, then each type reached by repeatedly dereferencing it, with an array-to-slice unsized coercion attempted at the end, and after each type in the list, its &T and &mut T forms. Then, for each candidate type, it searches two places in order: the type's inherent methods — the ones defined directly on the type in its own impl blocks — and the methods provided by visible traits implemented by that type. Visible is the load-bearing word in both places. A trait method counts only if the trait is in scope at the call site, and any method counts only if it is visible from the module doing the calling.

Hold that procedure in mind and every form of E0599 becomes a statement about the search. The name was not an inherent method of any candidate type. It was not a method of any in-scope trait those types implement. Or it was never a method at all. The error codes index's example is the pure case, where the search had nothing to find:

Rust
struct Mouth;
fn main() {
    let x = Mouth;
    x.chocolate();
}
Terminal
$ rustc --edition 2021 fail_canonical.rs -o fail_canonical
error[E0599]: no method named `chocolate` found for struct `Mouth` in the current scope
 --> fail_canonical.rs:4:7
  |
1 | struct Mouth;
  | ------------ method `chocolate` not found for this struct
...
4 |     x.chocolate();
  |       ^^^^^^^^^ method not found in `Mouth`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

The index's repair for its example is to implement the method, and for a method that genuinely does not exist anywhere, that is the repair here too: define it, in an inherent impl block or through a trait. But before writing a new method, read the rest of the diagnostic. Modern E0599 errors usually carry notes and help lines that report how close the search came — a trait that provides the method but is not in scope, a method of the same name on a field, a similar name with a different signature, an associated function that is not a method. Those lines are the compiler showing its work, and each one names a different family below. The first line tells you the error; the notes tell you which repair family you are in.

One consequence of the search route is worth stating before the failures, because it prevents a common misdiagnosis. References and smart pointers rarely cause this error by themselves. Because the candidate list walks dereferences, a method defined on a type is normally callable through a reference to it, through a Box of it, and on a Vec through the slice it dereferences to. A program at the end of the second failure below calls methods through all three. When E0599 names a reference or a wrapper as the receiver, the problem is almost never that a dereference is missing — the compiler already tried those — it is that the method lives on a different type than the whole dereference chain reaches, as the second failure shows.

The first failure: the method exists, but its trait is not in scope

The first E0599 in this guide is the one where nothing is wrong with the method, the type, or the call — except that the trait providing the method was never imported. The Book's traits chapter states the rule from the caller's side: to call a trait's methods on a type, the user must bring the trait into scope as well as the type. Implementing a trait and importing a trait are separate acts, and method syntax requires both. A locally defined trait shows the pure form — the implementation is in the same file, a few lines above the call, and the call still fails:

Rust
mod shapes {
    pub trait Describe {
        fn describe(&self) -> String;
    }
    pub struct Circle { pub radius: i32 }
    impl Describe for Circle {
        fn describe(&self) -> String { format!("circle r={}", self.radius) }
    }
}
use shapes::Circle;
fn main() {
    let c = Circle { radius: 3 };
    println!("{}", c.describe());
}
Terminal
$ rustc --edition 2021 fail_trait_local.rs -o fail_trait_local
error[E0599]: no method named `describe` found for struct `Circle` in the current scope
  --> fail_trait_local.rs:13:22
   |
 3 |         fn describe(&self) -> String;
   |            -------- the method is available for `Circle` here
 4 |     }
 5 |     pub struct Circle { pub radius: i32 }
   |     ----------------- method `describe` not found for this struct
...
13 |     println!("{}", c.describe());
   |                      ^^^^^^^^ method not found in `Circle`
   |
   = help: items from traits can only be used if the trait is in scope
help: trait `Describe` which provides `describe` is implemented but not in scope; perhaps you want to import it
   |
 1 + use crate::shapes::Describe;
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Read the diagnostic's shape, because it is the signature of this whole family. The compiler points back at the trait definition and notes that the method is available for the type there. It then states the rule as a help line — items from traits can only be used if the trait is in scope — and names the exact import that fixes it. When an E0599 carries the words "implemented but not in scope; perhaps you want to import it," the diagnosis is already complete: the method exists, the implementation exists, and the missing piece is one use line. Nothing about the call, the type, or the method body needs to change.

The standard library produces this family constantly, because so much of its behavior is delivered through traits rather than inherent methods. Reading bytes is the textbook case. File has no inherent read method; read is provided by the Read trait, which the std::io documentation describes as the trait for reading bytes from a source, with read itself as its one required method and the rest provided in terms of it. Without the import, the call fails even though File implements the trait:

Rust
use std::fs::File;
fn main() {
    let mut f = File::open("data.txt").expect("open");
    let mut buf = [0u8; 4];
    let n = f.read(&mut buf).expect("read");
    println!("n = {n}");
}
Terminal
$ rustc --edition 2021 fail_read.rs -o fail_read
error[E0599]: no method named `read` found for struct `File` in the current scope
 --> fail_read.rs:5:15
  |
5 |     let n = f.read(&mut buf).expect("read");
  |               ^^^^
  |
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/alloc/src/io/read.rs:167:7
  |
  = note: the method is available for `File` here
  |
  = help: items from traits can only be used if the trait is in scope
help: there is a method `read_at` with a similar name, but with different arguments
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/std/src/os/unix/fs.rs:61:4
help: trait `Read` which provides `read` is implemented but not in scope; perhaps you want to import it
  |
1 + use std::io::Read;
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Note the extra help line this diagnostic carries: a method read_at with a similar name but different arguments. That suggestion is a detour — read_at belongs to a different, platform-specific trait and reads at an offset — and it appears alongside the real diagnosis, the Read import help below it. This family teaches the first reading skill for E0599: when the diagnostic offers both a similar name and a trait import, the import is the diagnosis and the similar name is noise. The fixes section returns to this program with the import added and the file actually read.

Buffered reading repeats the pattern one trait over. read_line is provided by BufRead, not by BufReader itself, so wrapping a file in a BufReader — the step that feels like it should unlock line reading — still fails until the second trait is imported:

Rust
use std::fs::File;
use std::io::BufReader;
fn main() {
    let f = File::open("data.txt").expect("open");
    let mut reader = BufReader::new(f);
    let mut line = String::new();
    let n = reader.read_line(&mut line).expect("read");
    println!("n = {n}");
}
Terminal
$ rustc --edition 2021 fail_bufread.rs -o fail_bufread
error[E0599]: no method named `read_line` found for struct `BufReader<R>` in the current scope
 --> fail_bufread.rs:7:20
  |
7 |     let n = reader.read_line(&mut line).expect("read");
  |                    ^^^^^^^^^ method not found in `BufReader<File>`
  |
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/alloc/src/io/buf_read.rs:342:7
  |
  = note: the method is available for `BufReader<File>` here
  |
  = help: items from traits can only be used if the trait is in scope
help: trait `BufRead` which provides `read_line` is implemented but not in scope; perhaps you want to import it
  |
1 + use std::io::BufRead;
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Two traits, two imports, one lesson: in Rust, a type's callable surface is not a fixed list attached to the type. It is the inherent methods plus the methods of whichever traits the calling module has brought into scope. The same value gains methods as imports are added, which is why this error so often appears after code is moved: a function relocated to a new module keeps its types and its calls, loses the imports that traveled with its old home, and meets E0599 on a method that worked yesterday. When a method call fails right after a move or a refactor, check the imports before checking anything else.

The second failure: the method is on a different type than the receiver

The second family is a receiver problem. The method name is real and correctly spelled, but it belongs to a type other than the one in front of the dot — often a type closely related to the receiver: the owned version of a borrowed type, the value inside a wrapper, the field inside a struct.

The borrowed-versus-owned form is the one met first. A string slice can be read, compared, and sliced, but it cannot grow, because growing needs an owned buffer to grow into. The appending methods live on String, not on &str:

Rust
fn main() {
    let s: &str = "hello";
    let mut t = s;
    t.push_str(" world");
    println!("{t}");
}
Terminal
$ rustc --edition 2021 fail_str_push.rs -o fail_str_push
error[E0599]: no method named `push_str` found for reference `&str` in the current scope
 --> fail_str_push.rs:4:7
  |
4 |     t.push_str(" world");
  |       ^^^^^^^^ method not found in `&str`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

The diagnostic is bare — no similar name, no trait help — because the search was not close to anything: push_str simply is not in the &str method set at any dereference step. The repair is not a conversion of the call but a change of the value's type at its declaration: the variable that will be appended to must be a String from the start. This is the string half of a general rule for this family — when the method mutates or consumes, it tends to live on the owned type, and a borrowed receiver is the program stating, in type form, that it does not have the owned thing the method needs.

The wrapper form hides the right type one layer down. An Option<String> is not a String with extra confidence; it is a different type with its own method set, and the inner value's methods are not among them:

Rust
fn main() {
    let maybe: Option<String> = Some(String::from("hello"));
    println!("{}", maybe.to_uppercase());
}
Terminal
$ rustc --edition 2021 fail_option_method.rs -o fail_option_method
error[E0599]: no method named `to_uppercase` found for enum `Option<T>` in the current scope
 --> fail_option_method.rs:3:26
  |
3 |     println!("{}", maybe.to_uppercase());
  |                          ^^^^^^^^^^^^ method not found in `Option<String>`
  |
note: the method `to_uppercase` exists on the type `String`
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/alloc/src/str.rs:648:4
help: consider using `Option::expect` to unwrap the `String` value, panicking if the value is an `Option::None`
  |
3 |     println!("{}", maybe.expect("REASON").to_uppercase());
  |                         +++++++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

This diagnostic is unusually informative. The note states where the method does exist — on the type String — and the help proposes reaching it through the wrapper, by unwrapping with expect. Whether unwrapping is the right repair depends on what the None case means in the program: if the value is required, unwrapping states that honestly; if the value is genuinely optional, the repair is to map over the Option and apply the method only when a value is present, leaving None as None. Either way, the shape of the fix is the same — cross the wrapper deliberately, in code, rather than expecting method lookup to cross it silently. Method lookup walks dereferences; an Option is not a dereference, it is a branch, and the program must take the branch.

The field form is the same geometry inside a struct. A wrapper struct does not inherit its fields' methods:

Rust
struct Wrapper { inner: String }
fn main() {
    let w = Wrapper { inner: String::from("hello") };
    println!("len = {}", w.len());
}
Terminal
$ rustc --edition 2021 fail_wrapper_field.rs -o fail_wrapper_field
error[E0599]: no method named `len` found for struct `Wrapper` in the current scope
 --> fail_wrapper_field.rs:4:28
  |
1 | struct Wrapper { inner: String }
  | -------------- method `len` not found for this struct
...
4 |     println!("len = {}", w.len());
  |                            ^^^ method not found in `Wrapper`
  |
  = help: items from traits can only be used if the trait is implemented and in scope
  = note: the following trait defines an item `len`, perhaps you need to implement it:
          candidate #1: `ExactSizeIterator`
help: one of the expressions' fields has a method of the same name
  |
4 |     println!("len = {}", w.inner.len());
  |                            ++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Here the help does the diagnosis in one line: one of the expressions' fields has a method of the same name, and it shows the corrected call through the field. The repair options are the two honest ones — call through the field, as the help shows, or give the wrapper a method of its own that delegates, which is the right choice when the wrapper is a public type and the operation is part of its own meaning. What does not work is expecting the field's surface to show through the wrapper automatically; Rust has no field-based method inheritance, and the absence is deliberate, because it keeps a type's callable surface exactly the one its author wrote.

The limiting case of this family is a receiver with no relation to the method at all:

Rust
fn main() {
    let n: i32 = 42;
    println!("len = {}", n.len());
}
Terminal
$ rustc --edition 2021 fail_int_len.rs -o fail_int_len
error[E0599]: no method named `len` found for type `i32` in the current scope
 --> fail_int_len.rs:3:28
  |
3 |     println!("len = {}", n.len());
  |                            ^^^
  |
help: there is a method `le` with a similar name, but with different arguments
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/core/src/cmp.rs:1440:4

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

An integer has no length, and the compiler's similar-name help — a comparison method, le, with different arguments — is the search reporting the nearest name it could find on a type where the intended method was never going to live. A bare diagnostic with an irrelevant suggestion is itself information: the receiver is the wrong value, not merely the wrong form of the right value. In real code this form usually means the call was written against the wrong variable — the collection's name and the count's name swapped, or a value replaced during editing by the number derived from it. Read the receiver's declaration before reading anything else.

What does resolve: the dereference chain the compiler already walks

The contrast case keeps this family from being overdiagnosed. Methods do resolve through references, boxes, and dereference targets, with no syntax at the call:

Rust
struct Counter { n: i32 }
impl Counter {
    fn get(&self) -> i32 { self.n }
}
fn main() {
    let c = Counter { n: 7 };
    let r = &c;
    println!("via ref = {}", r.get());
    let boxed = Box::new(Counter { n: 9 });
    println!("via box = {}", boxed.get());
    let mut v = vec![3, 1, 2];
    v.sort();
    println!("sorted = {v:?}");
    let s = String::from("hello");
    println!("via string = {}", s.len());
}
Terminal
$ rustc --edition 2021 ok_autoderef.rs -o ok_autoderef
$ ./ok_autoderef
via ref = 7
via box = 9
sorted = [1, 2, 3]
via string = 5

Four calls, four different receiver shapes, one method set each time. The reference reaches Counter's method because &Counter is in the candidate list beside Counter. The Box reaches it by dereferencing. The vector sorts because Vec dereferences to a slice and the slice's sort is found at that step of the search. The owned string answers len directly. So when an E0599 names a receiver that is a reference or a smart pointer, adding a dereference by hand is almost never the missing piece — the lookup already dereferenced, repeatedly, and found nothing. The method is on some type the chain never reaches: the owned form, the wrapped value, the field. Fix the receiver's type, not its punctuation.

The third failure: the name is a typo

The third family is the smallest distance of all: the method exists on exactly this type, under a name one or two characters away from the one written. Rust does not guess, but the diagnostic reports the near miss:

Rust
fn main() {
    let text = String::from("hello");
    println!("len = {}", text.lengh());
}
Terminal
$ rustc --edition 2021 fail_typo_len.rs -o fail_typo_len
error[E0599]: no method named `lengh` found for struct `String` in the current scope
 --> fail_typo_len.rs:3:31
  |
3 |     println!("len = {}", text.lengh());
  |                               ^^^^^
  |
help: there is a method `len` with a similar name
  |
3 -     println!("len = {}", text.lengh());
3 +     println!("len = {}", text.len());
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

The help names the similar method and shows the call rewritten with it. In these transcripts the suggested name differs from the written name by a small spelling change, and for a genuine typo that is exactly the evidence needed: the intended method, on the intended type, at edit distance one. The second common typo shape is a word-boundary error — a name remembered with its words separated differently than the library spells them:

Rust
fn main() {
    let text = String::from("hello");
    println!("{}", text.to_upper_case());
}
Terminal
$ rustc --edition 2021 fail_typo_case.rs -o fail_typo_case
error[E0599]: no method named `to_upper_case` found for struct `String` in the current scope
 --> fail_typo_case.rs:3:25
  |
3 |     println!("{}", text.to_upper_case());
  |                         ^^^^^^^^^^^^^
  |
help: there is a method `to_uppercase` with a similar name
  |
3 -     println!("{}", text.to_upper_case());
3 +     println!("{}", text.to_uppercase());
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

to_upper_case reads naturally and is wrong; the standard library spells the method to_uppercase, one word for the adjective. Both typo forms share the repair: accept the suggested name, after one check — confirm the suggested method's signature is the operation you meant. That check matters because a similar name can belong to a different operation, as the fourth failure shows what happens when the nearest name is a different operation wearing a similar spelling. For a typo, the check passes in seconds: len takes no arguments and returns a count, to_uppercase takes no arguments and returns a new string. Accept, and move on.

The fourth failure: the name was renamed or removed

The fourth family is the typo family's older relative: the name was correct once. Code carried across standard library versions, examples copied from old answers, and habits imported from other languages all produce method names that the current library no longer provides — or provides only as a deprecated alias on its way out.

A removal first. Older Rust had a Vec method that removed an element by value; it was removed from the standard library, and the name now fails outright:

Rust
fn main() {
    let mut v = vec![1, 2, 3];
    v.remove_item(&2);
    println!("{v:?}");
}
Terminal
$ rustc --edition 2021 fail_remove_item.rs -o fail_remove_item
error[E0599]: no method named `remove_item` found for struct `Vec<{integer}>` in the current scope
 --> fail_remove_item.rs:3:7
  |
3 |     v.remove_item(&2);
  |       ^^^^^^^^^^^
  |
help: there is a method `remove` with a similar name
  |
3 -     v.remove_item(&2);
3 +     v.remove(&2);
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

The similar-name help offers remove — and this is where this family turns dangerous, because remove is a different operation: it removes by index, not by value. Its argument is a position. Accepting the suggestion verbatim does not restore the old behavior; it changes the meaning of the call and then fails anyway, as the traps section demonstrates with the compiler's own verdict on the suggested code. The correct modern repair rebuilds the old operation from its parts: find the position of the value, then remove at that position — or state the intent directly with retain, which keeps every element that does not match. The fixes section runs the position form.

Bulk appending has the same history. An old push_all name, familiar from early Rust and from other languages' vector types, is not in the current library:

Rust
fn main() {
    let mut v = vec![1, 2];
    v.push_all(&[3, 4]);
    println!("{v:?}");
}
Terminal
$ rustc --edition 2021 fail_push_all.rs -o fail_push_all
error[E0599]: no method named `push_all` found for struct `Vec<{integer}>` in the current scope
 --> fail_push_all.rs:3:7
  |
3 |     v.push_all(&[3, 4]);
  |       ^^^^^^^^
  |
help: there is a method `push` with a similar name
  |
3 -     v.push_all(&[3, 4]);
3 +     v.push(&[3, 4]);
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Again the similar-name help is a near miss in the wrong direction: push appends one element, and its argument is the element itself, not a slice of elements. The current name for appending a slice's contents is extend_from_slice — not similar in spelling at all, and no transcript in this guide offers it as a suggestion. This family's lesson generalizes: for a removed name, the replacement is found by operation, not by spelling. Ask what the old method did, then find which current method does that — the documentation for the type, read as a list of operations, answers it; the diagnostic's spelling suggestion did not in either case here.

The third member of the family is still in transit. Some renamed methods keep their old name as a deprecated alias, which compiles with a warning that names the replacement:

Rust
fn main() {
    let s = "hello   ";
    println!("[{}]", s.trim_right());
}
Terminal
$ rustc --edition 2021 warn_trim_right.rs -o warn_trim_right
warning: use of deprecated method `core::str::<impl str>::trim_right`: superseded by `trim_end`
 --> warn_trim_right.rs:3:24
  |
3 |     println!("[{}]", s.trim_right());
  |                        ^^^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default
help: replace the use of the deprecated method
  |
3 -     println!("[{}]", s.trim_right());
3 +     println!("[{}]", s.trim_end());
  |

warning: 1 warning emitted

$ ./warn_trim_right
[hello]

This program compiles and runs — the output is correct — and the warning is the library stating its direction: trim_right is superseded by trim_end, a name that also covers the left/right pair's replacement by start/end terms that survive right-to-left text. A deprecated alias is a renamed method photographed mid-removal: today it is a warning, in a later version it is this section's E0599. Treat the warning as the error arriving early, and rename at the warning, while the compiler is still telling you the new name for free. The fixes section runs the renamed call alongside the other two repairs.

The fifth failure: an associated function called as a method

The fifth family is a grammar error wearing a method error's clothes. The Book's method chapter draws the line the error rests on: all functions defined in an impl block are associated functions, and the ones whose first parameter is self are methods. The ones without self — constructors like new and from are the everyday examples — do not need an instance, cannot be called on one, and are reached through the type with the :: syntax instead. Calling one through an instance produces E0599 with a note that says exactly what happened:

Rust
fn main() {
    let v: Vec<i32> = Vec::new();
    let w = v.new();
    println!("w = {w:?}");
}
Terminal
$ rustc --edition 2021 fail_assoc_as_method.rs -o fail_assoc_as_method
error[E0599]: no method named `new` found for struct `Vec<i32>` in the current scope
 --> fail_assoc_as_method.rs:3:15
  |
3 |     let w = v.new();
  |               ^^^ this is an associated function, not a method
  |
  = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
  = note: the candidate is defined in an impl for the type `Vec<T>`
help: there is a method `ne` with a similar name, but with different arguments
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/core/src/cmp.rs:275:4
help: use associated function syntax instead
  |
3 -     let w = v.new();
3 +     let w = Vec::<i32>::new();
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

Read the notes in order. The first states the defect plainly: this is an associated function, not a method. The second states the rule: to be used as methods, functions must have a self parameter. The help then offers two repairs, and they are not equivalent. The similar-name suggestion, ne, is the spelling engine again — a comparison method that happens to be two letters long. The second help, use associated function syntax instead, is the actual fix, and the fixes section runs it. When an E0599's notes mention associated functions, ignore every similar-name line in the same diagnostic; the name is right and the call form is wrong.

The reverse direction — a method called as an associated function — completes the pair, and it is labeled with its own code, because the defect is different in kind. A method is an associated function, so the path String::len resolves; what fails is the missing receiver argument:

Rust
fn main() {
    let s = String::from("hello");
    let n = String::len();
    println!("n = {n}, s = {s}");
}
Terminal
$ rustc --edition 2021 fail_method_as_assoc.rs -o fail_method_as_assoc
error[E0061]: this function takes 1 argument but 0 arguments were supplied
 --> fail_method_as_assoc.rs:3:13
  |
3 |     let n = String::len();
  |             ^^^^^^^^^^^-- argument #1 of type `&String` is missing
  |
note: method defined here
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/alloc/src/string.rs:1876:17
help: provide the argument
  |
3 |     let n = String::len(/* &String */);
  |                         +++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0061`.

The code is E0061, not E0599: this function takes 1 argument but 0 arguments were supplied, and the missing argument is the &String receiver itself. That is the proof, in the compiler's own terms, that method syntax is associated-function syntax with the receiver filled in — s.len() and String::len(&s) are the same call in two spellings, and the fixes section runs both side by side. Three codes, three different defects, again separated by the first line: E0599, the name was not found as a method on the receiver; E0061, the name was found and the receiver argument was not supplied; and the next section's code, where the method was found and the caller was not allowed to use it.

The sixth failure: the method is private to another module

The sixth family is the one where the method exists, is spelled right, is a real method, and is still not callable — because visibility, not existence, is what failed. The Reference states the default: everything is private unless declared pub, and a private item may be accessed only by the module it is defined in and that module's descendants. A method defined without pub inside a module is therefore callable from inside that module and nowhere else:

Rust
mod vault {
    pub struct Vault { code: i32 }
    impl Vault {
        pub fn new(code: i32) -> Vault { Vault { code } }
        fn secret(&self) -> i32 { self.code }
    }
}
use vault::Vault;
fn main() {
    let v = Vault::new(42);
    println!("secret = {}", v.secret());
}
Terminal
$ rustc --edition 2021 fail_private.rs -o fail_private
error[E0624]: method `secret` is private
  --> fail_private.rs:11:31
   |
 5 |         fn secret(&self) -> i32 { self.code }
   |         ----------------------- private method defined here
...
11 |     println!("secret = {}", v.secret());
   |                               ^^^^^^ private method

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0624`.

The code is E0624, not E0599, and the distinction is worth the detour, because the two errors look alike from the caller's chair — a method that cannot be called — while demanding opposite repairs. E0599 means the lookup found no visible method of that name; E0624 means the lookup found the method and privacy refused it, and the diagnostic says so in its first line: method secret is private, with the definition pointed at directly. There is no search problem to solve. Either the method's visibility is the defect — it was meant to be part of the module's surface and the pub was forgotten, which the fixes section repairs — or the privacy is the design, and the repair is to stop reaching for the private method and use whatever public operation the module offers instead, or ask the module's owner to expose one. Reading which code you got is what tells you whether you are fixing a call or negotiating an interface.

Visibility is decided at the definition, never at the call.

The seventh failure: the method belongs to a different stage of the pipeline

The last family is specific to iterator chains, because a chain changes the receiver's type at every link. After .iter(), the receiver is an iterator struct — for a vector's borrowed iterator, std::slice::Iter — whose method set is the Iterator trait's adapters and consumers: map, filter, collect, count, and their relatives. The collection's own methods are not in that set, because the collection is no longer the receiver. Calling one anyway:

Rust
fn main() {
    let names = vec!["ada", "grace", "linus"];
    let joined = names.iter().join(", ");
    println!("{joined}");
}
Terminal
$ rustc --edition 2021 fail_iter_join.rs -o fail_iter_join
error[E0599]: no method named `join` found for struct `std::slice::Iter<'a, T>` in the current scope
 --> fail_iter_join.rs:3:31
  |
3 |     let joined = names.iter().join(", ");
  |                  -----        ^^^^ method not found in `std::slice::Iter<'_, &str>`
  |                  |
  |                  method `join` is available on `&[&str]`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

The diagnostic draws the pipeline geometry precisely. The method is reported not found in std::slice::Iter<'_, &str>, and the note adds where it is available: on &[&str], the slice type the iterator was made from. Joining is an operation on a slice of strings, not on an iterator of them, so the repair is to call it before entering the pipeline — on the vector or its slice — or to collect the iterator back into a collection and call it there. The compiler cannot choose between those for you, because they differ in what the program still needs downstream.

The mutation form is the same error with the roles read the other way. An iterator borrows its collection; it is a cursor over the elements, not the collection, and it has no operation for adding elements:

Rust
fn main() {
    let v = vec![1, 2, 3];
    let it = v.iter();
    it.push(4);
    println!("v = {v:?}");
}
Terminal
$ rustc --edition 2021 fail_iter_push.rs -o fail_iter_push
error[E0599]: no method named `push` found for struct `std::slice::Iter<'a, T>` in the current scope
 --> fail_iter_push.rs:4:8
  |
4 |     it.push(4);
  |        ^^^^ method not found in `std::slice::Iter<'_, {integer}>`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

And the adapter form completes the family: a method applied to an adapter's output as if the output were the collection the adapter was consuming toward. chars produces a Chars iterator of characters; pushing a character is a Vec operation, one collect away:

Rust
fn main() {
    let word = "hello";
    let letters: Vec<char> = word.chars().push('!');
    println!("{letters:?}");
}
Terminal
$ rustc --edition 2021 fail_chars_push.rs -o fail_chars_push
error[E0599]: no method named `push` found for struct `Chars<'a>` in the current scope
 --> fail_chars_push.rs:3:43
  |
3 |     let letters: Vec<char> = word.chars().push('!');
  |                                           ^^^^ method not found in `Chars<'_>`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0599`.

All three forms have one shape: the operation is real, the name is right, and it belongs to a value the pipeline has already moved past or has not yet produced. The diagnostic's named receiver type is the tell — when it is an iterator or adapter type (Iter, Chars, Map, Filter, and their relatives) and the method you called is a collection operation (join, push, sort, len on the underlying data), the repair is positional: move the call to the stage whose type has the method, before the iterator is created or after it is collected. The fixes section runs all three repairs in one program.

Fix 1: import the trait that provides the method

The first fix to reach for adds no call-site code at all. It completes the scope: the use line that brings the providing trait into the module, which is the entire repair for the first failure family. For the local trait, the import joins the type's import on the same line:

Rust
mod shapes {
    pub trait Describe {
        fn describe(&self) -> String;
    }
    pub struct Circle { pub radius: i32 }
    impl Describe for Circle {
        fn describe(&self) -> String { format!("circle r={}", self.radius) }
    }
}
use shapes::{Circle, Describe};
fn main() {
    let c = Circle { radius: 3 };
    println!("{}", c.describe());
}
Terminal
$ rustc --edition 2021 fix_trait_import.rs -o fix_trait_import
$ ./fix_trait_import
circle r=3

The call is character-for-character the one that failed. Only the import changed — Describe named beside Circle — and the method the compiler could see implemented but could not use is now callable. For the standard library's reading traits, the same one-line repair, twice:

Rust
use std::fs::File;
use std::io::Read;
fn main() {
    let mut f = File::open("data.txt").expect("open");
    let mut buf = [0u8; 4];
    let n = f.read(&mut buf).expect("read");
    println!("n = {n}, text = {}", String::from_utf8_lossy(&buf[..n]));
}
Terminal
$ rustc --edition 2021 fix_read_import.rs -o fix_read_import
$ ./fix_read_import
n = 4, text = hell

Four bytes read, and the buffer holds the first four bytes of the file's line. The File did not change; the module's scope did. The buffered reader is the identical repair with the second trait:

Rust
use std::fs::File;
use std::io::{BufRead, BufReader};
fn main() {
    let f = File::open("data.txt").expect("open");
    let mut reader = BufReader::new(f);
    let mut line = String::new();
    let n = reader.read_line(&mut line).expect("read");
    println!("n = {n}, line = {}", line.trim_end());
}
Terminal
$ rustc --edition 2021 fix_bufread_import.rs -o fix_bufread_import
$ ./fix_bufread_import
n = 12, line = hello, rust

The whole line is read this time, all twelve bytes including its newline. The discipline for this fix is placement: import the trait in the module that makes the calls, at the narrowest scope that covers them — a function-level use inside the one function that reads is a legitimate, tidy form of this fix when only that function needs the trait. What does not belong in the repair is a workaround at the call site: rewriting a trait method call as a free function, or collecting through a different API to dodge one import line, trades a one-line scope fix for a permanent distortion of the code.

Fix 2: fix the receiver — own it, unwrap it, or go through the field

When the method lives on a related type, the repair changes what stands in front of the dot. The three receiver repairs from the second failure, in one program:

Rust
struct Wrapper { inner: String }
fn main() {
    let mut owned = String::from("hello");
    owned.push_str(" world");
    println!("{owned}");
    let maybe: Option<String> = Some(String::from("hello"));
    println!("{}", maybe.expect("a value").to_uppercase());
    let w = Wrapper { inner: String::from("hello") };
    println!("len = {}", w.inner.len());
}
Terminal
$ rustc --edition 2021 fix_receiver.rs -o fix_receiver
$ ./fix_receiver
hello world
HELLO
len = 5

Each line crosses exactly the distance its failure measured. The appended-to value is declared as a String, so the owned type's method set is the receiver's own. The optional value is unwrapped with expect before the inner value's method is called — the right spelling here because the program states the value is required; where absence is a real case, the same crossing is written with map, applying the method inside the Option and leaving None untouched. The wrapper's length is read through its field, the path the diagnostic itself proposed. In all three, nothing about the method changed: the name, the arguments, and the operation are the ones that failed. Only the receiver became the type the method was always defined on.

Fix 3: use the current name — after checking what it does

For the wrong-name families, the repair is a rename, but the two families rename differently. A typo renames to the suggested method, whose signature the failure section already checked:

Rust
fn main() {
    let text = String::from("hello");
    println!("len = {}", text.len());
    println!("{}", text.to_uppercase());
}
Terminal
$ rustc --edition 2021 fix_typo.rs -o fix_typo
$ ./fix_typo
len = 5
HELLO

A removed name renames by operation, not by spelling. The value-removal is rebuilt as position-then-remove, the bulk append becomes extend_from_slice, and the deprecated alias becomes its stated replacement:

Rust
fn main() {
    let mut v = vec![1, 2, 3];
    if let Some(pos) = v.iter().position(|&x| x == 2) {
        v.remove(pos);
    }
    println!("{v:?}");
    let mut w = vec![1, 2];
    w.extend_from_slice(&[3, 4]);
    println!("{w:?}");
    let s = "hello   ";
    println!("[{}]", s.trim_end());
}
Terminal
$ rustc --edition 2021 fix_removed.rs -o fix_removed
$ ./fix_removed
[1, 3]
[1, 2, 3, 4]
[hello]

The output is the behavior each old name promised: the 2 is gone from the first vector, the second vector gained both appended elements, and the trailing spaces are trimmed by the current name. The verification step is what separates this fix from the trap below: before renaming, read the replacement's signature and state, in one sentence, that it performs the same operation on the same kind of argument. remove fails that test for remove_item — index in, element out, against value in, nothing out — and extend_from_slice passes it for push_all. A rename that cannot pass that sentence is not this fix; it is a behavior change with a compiler error as its only announcement.

Fix 4: call the associated function on the type

For the associated-function family, the repair is the call form: the type goes in front of the ::, the instance — if the function needs one at all — goes away or becomes an ordinary argument:

Rust
fn main() {
    let mut v: Vec<i32> = Vec::new();
    v.push(7);
    println!("v = {v:?}");
    let s = String::from("hello");
    let n = String::len(&s);
    println!("n = {n}");
    println!("m = {}", s.len());
}
Terminal
$ rustc --edition 2021 fix_assoc.rs -o fix_assoc
$ ./fix_assoc
v = [7]
n = 5
m = 5

The first line is the failed program's help, applied: Vec::new() called on the type, producing the vector the instance call could not. The last three lines are the equivalence the E0061 boundary case exposed, run both ways: String::len(&s) passes the receiver as the explicit first argument and returns the same count as the method spelling s.len(). Keep both spellings in your reading vocabulary, because library documentation lists methods and associated functions in one list, and the presence or absence of the self parameter in a signature is the entire difference between the two call forms. Constructors, factories, and parsers — new, from, from_str and their kin — are associated functions, and they are always called on the type.

Fix 5: widen the visibility, or use the public operation the module offers

For the private-method family, the repair is at the definition, because visibility is a property of the definition. When the method was meant to be callable, one keyword is the whole fix:

Rust
mod vault {
    pub struct Vault { code: i32 }
    impl Vault {
        pub fn new(code: i32) -> Vault { Vault { code } }
        pub fn secret(&self) -> i32 { self.code }
    }
}
use vault::Vault;
fn main() {
    let v = Vault::new(42);
    println!("secret = {}", v.secret());
}
Terminal
$ rustc --edition 2021 fix_private.rs -o fix_private
$ ./fix_private
secret = 42

The method body, the call, and the module structure are untouched; pub on the definition is the only change, and the previously refused call now prints. The judgment this fix requires is the one the sixth failure stated: is the privacy a defect or a design? Inside one program, where the module is an organizational device, a forgotten pub is the usual story and widening is right. Across a library boundary, the private method is the author's statement that the operation is an implementation detail, and the caller's repair is different — find the public operation that covers the need, or do without, or raise the missing operation with the library as a feature rather than reaching through the wall. Widening someone else's visibility is not available to you in any case: the fix exists only where you own the definition.

Fix 6: move the call to the stage that has the method

For the pipeline family, the repair relocates the operation along the chain — to the collection before iteration begins, or to the collection that collection of the iterator produces:

Rust
fn main() {
    let names = vec!["ada", "grace", "linus"];
    let joined = names.join(", ");
    println!("{joined}");
    let mut v = vec![1, 2, 3];
    v.push(4);
    println!("v = {v:?}");
    let word = "hello";
    let mut letters: Vec<char> = word.chars().collect();
    letters.push('!');
    println!("{letters:?}");
    let doubled: Vec<i32> = v.iter().map(|&x| x * 2).collect();
    println!("doubled = {doubled:?}");
}
Terminal
$ rustc --edition 2021 fix_iter.rs -o fix_iter
$ ./fix_iter
ada, grace, linus
v = [1, 2, 3, 4]
['h', 'e', 'l', 'l', 'o', '!']
doubled = [2, 4, 6, 8]

Each repair is positional. The join happens on the vector itself, before any iterator exists, because joining is a slice operation. The push happens on the vector, not on the cursor borrowing it. The extra character is pushed after collect has turned the Chars iterator into the Vec<char> that owns push. And the last two lines show the chain used as intended in between: map is an adapter the iterator genuinely has, applied while the receiver is an iterator, and collect ends the pipeline at the type the next operation needs. Read iterator E0599 errors as stage directions: the diagnostic names the stage you are at, the note often names the stage the method lives at, and the fix is moving the call — or inserting the collect that changes the stage — until the two match.

The traps: accepting the similar name blindly, and importing around a receiver problem

Trap
Two responses to E0599 compile the call site into a different error, or a different program, and both are tempting because both are small edits the diagnostic itself appears to endorse.

The first is accepting the similar-name suggestion without the signature check Fix 3 requires. For the removed Vec names, the suggestion is not merely unhelpful — the suggested code does not compile, and the compiler says so when it is tried. Here is the remove_item diagnostic's own suggestion, applied verbatim:

Rust
fn main() {
    let mut v = vec![1, 2, 3];
    v.remove(&2);
    println!("{v:?}");
}
Terminal
$ rustc --edition 2021 trap_remove_suggestion.rs -o trap_remove_suggestion
error[E0308]: mismatched types
 --> trap_remove_suggestion.rs:3:14
  |
3 |     v.remove(&2);
  |       ------ ^^ expected `usize`, found `&{integer}`
  |       |
  |       arguments to this method are incorrect
  |
note: method defined here
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/alloc/src/vec/mod.rs:2397:11
help: consider removing the borrow
  |
3 -     v.remove(&2);
3 +     v.remove(2);
  |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.

The error is now E0308, mismatched types: the suggestion traded a missing method for a wrong argument type, because remove takes an index and was handed a reference to a value. The push_all suggestion fails identically:

Rust
fn main() {
    let mut v = vec![1, 2];
    v.push(&[3, 4]);
    println!("{v:?}");
}
Terminal
$ rustc --edition 2021 trap_push_suggestion.rs -o trap_push_suggestion
error[E0308]: mismatched types
 --> trap_push_suggestion.rs:3:12
  |
3 |     v.push(&[3, 4]);
  |       ---- ^^^^^^^ expected integer, found `&[{integer}; 2]`
  |       |
  |       arguments to this method are incorrect
  |
note: method defined here
 --> /rustc/b940084d7eb6a299eb4bfeb8e34901bc051e7ac4/library/alloc/src/vec/mod.rs:995:11

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0308`.

One element was expected; a reference to an array was supplied. Two suggestions, two fresh errors — because each suggestion pairs the written name with a close-spelled name on the same type, without matching its arguments, return value, or what the operation does. The discipline is mechanical: a similar-name help is a hypothesis, and the hypothesis is tested by reading the suggested method's signature before applying it. When the signature's arguments match the call you wrote, it was a typo and the suggestion is the fix. When they do not, the name you wrote is not a misspelling of the suggestion — it is a different operation, a removed name, or a method from another language, and the repair is Fix 3's operation-first search, not the nearest spelling.

The second trap is the mirror image: treating every E0599 as a scope problem and hunting for an import that does not exist. There is no trait to import that gives &str a push_str, no import that gives an iterator a push, and no import that makes an associated function callable on an instance. Importing at random — pulling in a prelude-style bundle of traits to see whether the error moves — can even appear to work, by bringing in an extension trait whose method of the same name does something different from the one intended, silently changing the call's meaning while clearing the error. The diagnostic already separates the families: in every diagnostic in this guide, the words "implemented but not in scope" appear in the trait family, and there an import is the repair. An E0599 in this guide without those words is telling you the search failed for a structural reason — receiver, name, call form, visibility, or stage — and each of those has its own fix above. Add imports when the compiler names the trait; fix the structure when it does not.

A third, smaller trap completes the map: defining a same-named method of your own to silence the error — an inherent method on a wrapper that forwards almost correctly, an extension trait written on the spot. Sometimes that is the right design, and the second failure names the legitimate case: a wrapper whose operation is part of its own meaning should grow a delegating method deliberately. As an error response, though, it buries the diagnosis: the new method compiles, the call succeeds, and the question the error was asking — where does this operation actually live, and why was the call aimed somewhere else — never gets answered. Add a method when the type's design calls for one, not when a diagnostic does.

Which fix for which error

What the diagnostic shows What is actually happening First fix to reach for
"trait which provides the method is implemented but not in scope" The type implements the trait; the calling module never imported it Fix 1 — add the use line for the trait, at the narrowest covering scope
Method not found in &str, receiver is a borrowed string The method mutates or consumes and lives on the owned String Fix 2 — declare the value as String from the start
Method not found in Option<T> (or another wrapper), note names the inner type The method belongs to the wrapped value; lookup does not cross wrappers Fix 2 — unwrap with expect if required, or map the method over the wrapper
Method not found in a struct, help points at a field The method belongs to a field's type; wrappers do not inherit field methods Fix 2 — call through the field, or add a deliberate delegating method
Method not found on a primitive or unrelated type, suggestion is irrelevant The call is aimed at the wrong variable entirely Read the receiver's declaration; the defect is the variable, not the method
"there is a method with a similar name" and its signature matches the call A typo: the intended method, at edit distance one or two Fix 3 — accept the suggested name
Similar name offered, but its arguments differ from the call The written name is a removed or foreign name, not a misspelling Fix 3 — find the current operation by what it does, not by spelling
A deprecation warning names a replacement (superseded by) The old name is an alias on its way to removal Fix 3 — rename to the stated replacement now, while it is still a warning
Notes say "this is an associated function, not a method" The function has no self parameter; no instance can call it Fix 4 — call it on the type: Type::name(...)
E0061: an argument of the receiver's type is missing A method was called in associated-function form without its receiver Fix 4 — pass the receiver explicitly, or use method syntax
E0624: method is private The method exists and was found; visibility refused the call Fix 5 — add pub if you own the definition and it was meant to be public; otherwise use the module's public API
Method not found in an iterator type (Iter, Chars, Map), method is a collection operation The operation belongs to a stage before or after the iterator Fix 6 — call it on the collection, or collect first and call it on the result
Method not found, no notes, no similar name, on your own type The method genuinely does not exist yet Implement it — in an inherent impl block, or through a trait if it is shared behavior

Checklist

  • Read the first line literally: it names the method, the receiver's type, and the scope searched. Those three facts, plus the notes, select the repair family before any code is changed.
  • Search the notes for the trait sentence first. If the diagnostic says a trait provides the method but is not in scope, the repair is one import line and nothing else — do that before touching the call.
  • If there is no trait sentence, do not hunt for imports. The failure is structural: receiver, name, call form, visibility, or pipeline stage.
  • Name the type the method actually lives on — the owned form, the wrapped value, the field, the collection on either side of an iterator — and make the receiver that type, deliberately, in code.
  • Remember what the lookup already tried: every dereference of the receiver, with references at each step. A hand-written dereference is almost never the missing piece.
  • Test every similar-name suggestion against its signature. Matching arguments mean a typo; differing arguments mean the suggestion is a different operation.
  • For a name that used to work, search by operation, not spelling: state what the old method did and find the current method that does it.
  • Rename at the deprecation warning. The warning names the replacement; the later E0599 for the same name will not.
  • Check the self parameter before choosing a call form. No self means associated-function syntax on the type; a method called with :: still owes its receiver as the first argument.
  • Separate E0599 from its neighbors by code: E0061 is a found method missing its receiver argument; E0624 is a found method refused by privacy. Each has a different repair.
  • For a private method, decide whether the privacy is a defect or a design before editing — and remember the fix exists only where you own the definition.
  • In an iterator chain, identify the stage the receiver is at and the stage the method belongs to. Move the call, or insert the collect that changes the stage.
  • After the fix, reread the call for the question the error was asking: on this receiver, in this scope, under this name, in this call form — which of those four was wrong, and where is the correction written?
  • Fix Rust E0308 "mismatched types" — the companion repair manual for the type-disagreement error, which is also where a blindly accepted E0599 suggestion lands: the nearest-name remove and push calls fail there, on argument types.
  • Fix Rust E0382 "borrow of moved value" — the companion repair manual for the ownership error: a value given away and then used, where this guide is the manual for a call whose method the lookup could not find.
  • Rust Ownership and Borrowing — the concepts guide behind the receiver half of this error: owned and borrowed forms of a value, and which methods each form can honestly offer.

Sources

  • Rust Project, Error codes index: E0599 — for the definition of E0599 as a method used on a type which does not implement it, and for the index's own example of a method called on a struct that has none, with implementing the method as its repair.
  • Rust Project, The Rust Reference: Method call expressions — for the method lookup procedure: the candidate receiver types built by repeated dereferencing with &T and &mut T at each step, and the search order of inherent methods first, then methods of visible traits implemented by each candidate.
  • Rust Project, The Rust Programming Language: Defining Shared Behavior with Traits — for the rule that a trait's methods can be called on a type only when the user brings the trait into scope as well as the type, and for implementing a trait on a type as a separate act from importing it.
  • Rust Project, The Rust Programming Language: Method Syntax — for methods as the associated functions whose first parameter is self, for associated functions without self as constructors called with the :: syntax on the type, and for automatic referencing and dereferencing at method calls.
  • Rust Project, The Rust Reference: Visibility and privacy — for items being private by default, for a private item being accessible only from its defining module and that module's descendants, and for pub as the declaration that makes an item accessible outside it.
  • Rust Project, std::io::Read — for read as the Read trait's one required method with the remaining reading methods provided in terms of it, and for File as an implementor of the trait rather than the owner of an inherent read.
  • Rust Project, std::iter::Iterator — for the adapter and consumer method set that defines an iterator receiver's callable surface in a pipeline, and for collect as the consumer that turns an iterator back into a collection.
  • Rust Project, std::vec::Vec — for the current Vec method list read as operations: push taking a single element, remove taking an index, and extend_from_slice appending a slice's contents.

Keep Exploring