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

doc(rust): add rust doc #485

Merged
merged 4 commits into from
Apr 20, 2023
Merged

doc(rust): add rust doc #485

merged 4 commits into from
Apr 20, 2023

Conversation

ShadowySpirits
Copy link
Member

close #483

Add rust doc for rust SDK: Preview link

@lizhanhui @aaron-ai PTAL, you can login preview website via your Github account and leave comments.

image

After this pr, we can publish the rust SDK on crates.io.

@lizhanhui
Copy link
Contributor

Nice work

rust/src/conf.rs Outdated Show resolved Hide resolved
pub fn message_group(&self) -> Option<&str> {
self.message_group.as_deref()
}

/// get delivery timestamp of delay message
pub fn delivery_timestamp(&self) -> Option<i64> {
Copy link
Contributor

@lizhanhui lizhanhui Apr 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return Option<Instant>?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instant seems could not be created by ourselves.

A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

pub fn born_host(&self) -> &str {
&self.born_host
}

/// get born timestamp of message
pub fn born_timestamp(&self) -> i64 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

pub fn born_timestamp(&self) -> i64 {
self.born_timestamp
}

/// get delivery attempt of message
pub fn delivery_attempt(&self) -> i32 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i32 or usize?

@lizhanhui lizhanhui merged commit bc47512 into apache:master Apr 20, 2023
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.

Improve test and doc for rust sdk
3 participants