Skip to content

Step 1.5: Conversions, casting and dereferencing#6

Open
ziimakc wants to merge 1 commit intomainfrom
1_5_convert_cast_deref
Open

Step 1.5: Conversions, casting and dereferencing#6
ziimakc wants to merge 1 commit intomainfrom
1_5_convert_cast_deref

Conversation

@ziimakc
Copy link
Owner

@ziimakc ziimakc commented Jan 25, 2026

Resolves Step 1.5

Task

Implement the following types:

  1. EmailString - a type, which value can be only a valid email address string.
  2. Random<T> - a smart pointer, which takes 3 values of the pointed-to type on creation and points to one of them randomly every time is used.

Provide conversion and Deref implementations for these types on your choice, to make their usage and interoperability with std types easy and ergonomic.

Solution

Create EmailString and Random<T> types and useful conversions/Deref implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant