feat(blahd): impl ETag for feed

This commit is contained in:
oxalica 2024-09-25 13:33:38 -04:00
parent fac146e859
commit 70481e6c74
4 changed files with 114 additions and 23 deletions

View file

@ -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);