Get last possible Msg id
This commit is contained in:
parent
2beb44a17c
commit
d638ba2887
4 changed files with 15 additions and 0 deletions
|
|
@ -284,6 +284,11 @@ pub struct SessionView {
|
|||
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct Snowflake(pub u64);
|
||||
|
||||
impl Snowflake {
|
||||
pub const MIN: Self = Snowflake(u64::MIN);
|
||||
pub const MAX: Self = Snowflake(u64::MAX);
|
||||
}
|
||||
|
||||
impl Serialize for Snowflake {
|
||||
fn serialize<S: ser::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
// Convert u64 to base36 string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue