Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rationalise Value to string methods #3539

Open
jcamiel opened this issue Dec 19, 2024 · 0 comments
Open

Rationalise Value to string methods #3539

jcamiel opened this issue Dec 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Dec 19, 2024

hurl::runner::value::Value implements many methods to be converted as a String. It's not clear which one we should call in which context.
At least, these methods and their usage should be documented in hurl::runner::value.rs.

  • hurl/runner/value.rs:
impl fmt::Display for Value {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
impl Value {
    pub fn render(&self) -> Option<String> {
  • hurl/runner/predicates.rs:
impl Value {
    pub fn display(&self) -> String {

Maybe also ?:

impl Value {
   pub(crate) fn format(&self) -> String {

This code "renders" a value to a string...

let value = Value::String("foo".to_string())
value.to_string();
value.render();
value.display();
value.format();
@jcamiel jcamiel added the enhancement New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants