Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Implement more traits for UriRefBuf and UriBuf #22

Closed
Luro02 opened this issue Mar 30, 2020 · 3 comments
Closed

Implement more traits for UriRefBuf and UriBuf #22

Luro02 opened this issue Mar 30, 2020 · 3 comments
Labels
enhancement New feature or request P3 Priority 3

Comments

@Luro02
Copy link
Contributor

Luro02 commented Mar 30, 2020

The following traits could be implemented

  • FromStr
  • TryFrom
    -> TryFrom<&str>
    -> TryFrom<&String>
    -> TryFrom<String> (only for UriBuf)
    -> impl<T: AsRef<UriRef>> TryFrom<T>

Most of these traits can be simply delegated to their respective function

use std::str::FromStr;

impl FromStr for UriBuf {
   type Err = ParseError;

    fn from_str(input: &str) -> Result<Self, Self::Err> { Self::from_str(input) }
}
@Luro02
Copy link
Contributor Author

Luro02 commented Mar 30, 2020

I am working on this :)

@Luro02 Luro02 changed the title Implement more traits for Uri, UriBuf Implement more traits for UriRefBuf and UriBuf Mar 30, 2020
@darconeous
Copy link
Contributor

Cool! Having a look now.

@darconeous
Copy link
Contributor

This landed via 99a61ee.

@darconeous darconeous added enhancement New feature or request P3 Priority 3 labels Apr 11, 2020
@darconeous darconeous added this to To do in async-coap-uri via automation Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request P3 Priority 3
Projects
async-coap-uri
  
To do
Development

Successfully merging a pull request may close this issue.

2 participants