Naming Conventions
Rust
Retrieval Functions
The prefix determines what is being returned.
get*() -> T
orget*() -> Result<T>
- Return a non-
Option
object, usually wrapped in aResult<T>
- Example:
get_by_names()
find*() -> Option<T>
orfind*() -> Result<Option<T>>
- Returns a single optional object
search*() -> Vec<T>
orsearch*() -> Result<Vec<T>>
- Returns a list of objects
map*_by_*() -> HashMap<TKey, TValue>
ormap*_by_*() -> Result<HashMap>
- Returns a mapping of some sort
In many cases, there is a _by_
which indicates how the item is found.
Metadata
Project
- Project Home
- Documentation
- Repository
- Issues
- Project ID: 0194c2b5-a914-780a-8e3c-d58c3fc45770