longportapp / openapi-sdk

LongPort OpenAPI SDK Base.
https://open.longportapp.com
Apache License 2.0
112 stars 11 forks source link

Rust SDK中`PushEvent.sequence` 可见性问题 #102

Open WANG-lp opened 1 day ago

WANG-lp commented 1 day ago

Rust SDK中PushEvent.sequence设置为了 pub(crate) ,导致使用时无法获取sequence,是否考虑调整为pub

/// Push event
#[derive(Debug)]
pub struct PushEvent {
    #[allow(dead_code)]
    pub(crate) sequence: i64,
    /// Security code
    pub symbol: String,
    /// Event detail
    pub detail: PushEventDetail,
}
sunli829 commented 23 hours ago

对于用户来说这个sequence意义不大,你希望通过这个值来判断是否有丢失的推送吗?

WANG-lp commented 23 hours ago

对于用户来说这个sequence意义不大,你希望通过这个值来判断是否有丢失的推送吗?

是的,seq不连续的话有可能需要做一些操作。