pub enum Protocol {
HTTP,
HTTPS,
Unknown(String),
}
Expand description
Represents HTTP-related protocols.
This enum defines the different protocols that can be used in HTTP communication.
Variants§
HTTP
Represents the HTTP protocol.
This is the standard protocol for unencrypted communication over the web.
HTTPS
Represents the HTTPS protocol.
This is the secure version of HTTP, using encryption for communication.
Unknown(String)
Represents an unknown or custom protocol.
This variant is used for protocols that are not explicitly defined as HTTP or HTTPS, or when the protocol string is not recognized.
Implementations§
Source§impl Protocol
Provides utility methods for the Protocol
type.
impl Protocol
Provides utility methods for the Protocol
type.
Trait Implementations§
Source§impl Default for Protocol
Provides a default value for Protocol
.
impl Default for Protocol
Provides a default value for Protocol
.
The default Protocol
is Protocol::Unknown
with an empty string.
impl Eq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more