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

Use IntoBody and IntoBytes to write data #10

Merged
merged 3 commits into from
May 17, 2024
Merged

Use IntoBody and IntoBytes to write data #10

merged 3 commits into from
May 17, 2024

Conversation

atimin
Copy link
Member

@atimin atimin commented May 17, 2024

Closes #

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Feature

What was changed?

Instead of using Bytes implicitly as the data format, we use IntoBody and IntoBytes traits in generic methods:

Before:

   bucket
        .write_record("entry-1")
        .timestamp(timestamp)
        .data(Bytes::from("Hello, World!"))
        .send()
        .await?;

Now

   bucket
        .write_record("entry-1")
        .timestamp(timestamp)
        .data("Hello, World!")
        .send()
        .await?;

Related issues

No

Does this PR introduce a breaking change?

No

Other information:

@atimin atimin changed the title Use IntoBody and `IntoBytes to write data Use IntoBody and IntoBytes to write data May 17, 2024
@atimin atimin merged commit 46f21da into main May 17, 2024
7 checks passed
@atimin atimin deleted the use-into-body-data branch May 17, 2024 16:21
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