http-type 18.4.1

A comprehensive Rust type library for HTTP operations and concurrent programming. Provides core HTTP types (Request/Response with builder patterns, Method, HttpStatus, HttpVersion, ContentType, FileExtension with MIME mapping, Cookie parsing/building, HttpUrl parsing, WebSocket frame/opcode, protocol upgrade types, stream/task management, panic handling), thread-safe concurrent wrappers (ArcMutex, ArcRwLock, BoxRwLock, RcRwLock), dynamic dispatch types (BoxAny, RcAny, ArcAny with Send/Sync variants), high-performance hash collections (HashMapXxHash3_64, HashSetXxHash3_64), and static lifetime utilities (BoxLeak, Lifetime trait).
Documentation
use crate::*;

/// Implementation of `From` trait for `Attribute`.
impl From<&str> for Attribute {
    /// Converts a string slice into an `Attribute`.
    ///
    /// # Arguments
    ///
    /// - `&str` - The string slice to convert.
    ///
    /// # Returns
    ///
    /// - `Attribute` - The converted attribute key.
    #[inline(always)]
    fn from(key: &str) -> Self {
        Attribute::External(key.to_string())
    }
}

/// Implementation of `From` trait for `Attribute`.
impl From<String> for Attribute {
    /// Converts a `String` into an `Attribute`.
    ///
    /// # Arguments
    ///
    /// - `String` - The string to convert.
    ///
    /// # Returns
    ///
    /// - `Attribute` - The converted attribute key.
    #[inline(always)]
    fn from(key: String) -> Self {
        Attribute::External(key)
    }
}

/// Implementation of `From` trait for `Attribute`.
impl From<InternalAttribute> for Attribute {
    /// Converts an `InternalAttribute` into an `Attribute`.
    ///
    /// # Arguments
    ///
    /// - `InternalAttribute` - The internal attribute key to convert.
    ///
    /// # Returns
    ///
    /// - `Attribute` - The converted attribute key.
    #[inline(always)]
    fn from(key: InternalAttribute) -> Self {
        Attribute::Internal(key)
    }
}