mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-07-10 08:05:33 +00:00
feat(blahd): impl ETag for feed
This commit is contained in:
parent
fac146e859
commit
70481e6c74
4 changed files with 114 additions and 23 deletions
|
@ -1,5 +1,7 @@
|
|||
//! Core message subtypes.
|
||||
use std::fmt;
|
||||
use std::num::ParseIntError;
|
||||
use std::str::FromStr;
|
||||
|
||||
use bitflags_serde_shim::impl_serde_for_bitflags;
|
||||
use serde::{de, ser, Deserialize, Serialize};
|
||||
|
@ -22,6 +24,14 @@ impl fmt::Display for Id {
|
|||
}
|
||||
}
|
||||
|
||||
impl FromStr for Id {
|
||||
type Err = ParseIntError;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
i64::from_str(s).map(Self)
|
||||
}
|
||||
}
|
||||
|
||||
impl Id {
|
||||
pub const MIN: Self = Id(i64::MIN);
|
||||
pub const MAX: Self = Id(i64::MAX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue