Skip to content

jmfrank63/no-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Option Take and Retry Example

This project demonstrates the use of Rust's Option<T> for handling values that may or may not exist, showcasing a pattern where a value is taken out of an Option, processed, and potentially put back for a retry.

Overview

The code provides an example of a retry mechanism using a custom struct NoClone that does not implement the Copy or Clone traits. This struct is wrapped in an Option, and the take() method is used to consume the value for processing. If the processing fails, the value is modified and returned for a retry.

Usage

The main logic is contained in main.rs. Run the Rust program to see the retry mechanism in action.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages