MCPcopy Create free account
hub / github.com/fadeevab/design-patterns-rust / new

Method new

behavioral/iterator/users.rs:8–12  ·  view source on GitHub ↗

Returns a custom user collection.

()

Source from the content-addressed store, hash-verified

6impl UserCollection {
7 /// Returns a custom user collection.
8 pub fn new() -> Self {
9 Self {
10 users: ["Alice", "Bob", "Carl"],
11 }
12 }
13
14 /// Returns an iterator over a user collection.
15 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected