INNER CODE UNIT · Rust

weak_eq

TheWaWaR/simple-http-server · src/handlers.rs:122

    fn weak_eq(&self, other: &Self) -> bool {
        self.tag == other.tag
    }

    fn header_value(&self) -> String {
        if self.weak {
            format!("W/\"{}\"", self.tag)
        } else {
            format!("\"{}\"", self.tag)
        }
    }
}

impl ChannelBody {
    fn new(receiver: mpsc::Receiver<io::Result<Bytes>>, exact_len: Option<u64>) -> Self {
        Self {
            receiver,
            exact_len,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…