Struct Authority
pub struct Authority {
pub user_info: Option<Basic>,
pub address: HostWithOptPort,
}net only.Expand description
Fields§
§user_info: Option<Basic>§address: HostWithOptPortImplementations§
§impl Authority
impl Authority
pub const fn new(addr: HostWithOptPort) -> Authority
pub const fn new(addr: HostWithOptPort) -> Authority
Creates a new Authority from a HostWithOptPort.
pub const fn new_with_user_info(
addr: HostWithOptPort,
user_info: Basic,
) -> Authority
pub const fn new_with_user_info( addr: HostWithOptPort, user_info: Basic, ) -> Authority
Creates a new Authority from a HostWithOptPort and user-info (Basic).
pub const fn local_ipv4() -> Authority
pub const fn local_ipv4() -> Authority
pub const fn local_ipv4_with_port(port: u16) -> Authority
pub const fn local_ipv4_with_port(port: u16) -> Authority
pub const fn local_ipv6() -> Authority
pub const fn local_ipv6() -> Authority
pub const fn local_ipv6_with_port(port: u16) -> Authority
pub const fn local_ipv6_with_port(port: u16) -> Authority
pub const fn default_ipv4() -> Authority
pub const fn default_ipv4() -> Authority
pub const fn default_ipv4_with_port(port: u16) -> Authority
pub const fn default_ipv4_with_port(port: u16) -> Authority
pub const fn default_ipv6() -> Authority
pub const fn default_ipv6() -> Authority
pub const fn default_ipv6_with_port(port: u16) -> Authority
pub const fn default_ipv6_with_port(port: u16) -> Authority
pub const fn broadcast_ipv4() -> Authority
pub const fn broadcast_ipv4() -> Authority
pub const fn broadcast_ipv4_with_port(port: u16) -> Authority
pub const fn broadcast_ipv4_with_port(port: u16) -> Authority
pub const fn example_domain() -> Authority
pub const fn example_domain() -> Authority
Creates a new example domain Authority without a port.
pub const fn example_domain_http() -> Authority
pub const fn example_domain_http() -> Authority
Creates a new example domain HostWithOptPort for the http default port.
pub const fn example_domain_https() -> Authority
pub const fn example_domain_https() -> Authority
Creates a new example domain HostWithOptPort for the https default port.
pub const fn example_domain_with_port(port: u16) -> Authority
pub const fn example_domain_with_port(port: u16) -> Authority
Creates a new example domain HostWithOptPort for the given port.
pub const fn localhost_domain() -> Authority
pub const fn localhost_domain() -> Authority
Creates a new localhost domain HostWithOptPort without a port.
pub const fn localhost_domain_http() -> Authority
pub const fn localhost_domain_http() -> Authority
Creates a new localhost domain HostWithOptPort for the http default port.
pub const fn localhost_domain_https() -> Authority
pub const fn localhost_domain_https() -> Authority
Creates a new localhost domain HostWithOptPort for the https default port.
pub const fn localhost_domain_with_port(port: u16) -> Authority
pub const fn localhost_domain_with_port(port: u16) -> Authority
Creates a new localhost domain HostWithOptPort for the given port.
pub fn maybe_with_port(self, port: Option<u16>) -> Authority
pub fn maybe_with_port(self, port: Option<u16>) -> Authority
(un)set port (u16) of Authority
pub fn maybe_set_port(&mut self, port: Option<u16>) -> &mut Authority
pub fn maybe_set_port(&mut self, port: Option<u16>) -> &mut Authority
(un)set port (u16) of Authority
pub fn without_port(self) -> Authority
pub fn without_port(self) -> Authority
(un)set port (u16) of Authority
pub fn unset_port(&mut self) -> &mut Authority
pub fn unset_port(&mut self) -> &mut Authority
(un)set port (u16) of Authority
pub fn maybe_with_user_info(self, user_info: Option<Basic>) -> Authority
pub fn maybe_with_user_info(self, user_info: Option<Basic>) -> Authority
pub fn maybe_set_user_info(
&mut self,
user_info: Option<Basic>,
) -> &mut Authority
pub fn maybe_set_user_info( &mut self, user_info: Option<Basic>, ) -> &mut Authority
pub fn with_user_info(self, user_info: Basic) -> Authority
pub fn with_user_info(self, user_info: Basic) -> Authority
pub fn set_user_info(&mut self, user_info: Basic) -> &mut Authority
pub fn set_user_info(&mut self, user_info: Basic) -> &mut Authority
pub fn without_user_info(self) -> Authority
pub fn without_user_info(self) -> Authority
pub fn unset_user_info(&mut self) -> &mut Authority
pub fn unset_user_info(&mut self) -> &mut Authority
Trait Implementations§
§impl<'de> Deserialize<'de> for Authority
impl<'de> Deserialize<'de> for Authority
§fn deserialize<D>(
deserializer: D,
) -> Result<Authority, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Authority, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl From<&SocketAddr> for Authority
impl From<&SocketAddr> for Authority
§fn from(addr: &SocketAddr) -> Authority
fn from(addr: &SocketAddr) -> Authority
§impl From<&SocketAddress> for Authority
impl From<&SocketAddress> for Authority
§fn from(addr: &SocketAddress) -> Authority
fn from(addr: &SocketAddress) -> Authority
§impl From<Authority> for HostWithOptPort
impl From<Authority> for HostWithOptPort
§fn from(addr: Authority) -> HostWithOptPort
fn from(addr: Authority) -> HostWithOptPort
§impl From<DomainAddress> for Authority
impl From<DomainAddress> for Authority
§fn from(addr: DomainAddress) -> Authority
fn from(addr: DomainAddress) -> Authority
§impl From<HostWithOptPort> for Authority
impl From<HostWithOptPort> for Authority
§fn from(addr: HostWithOptPort) -> Authority
fn from(addr: HostWithOptPort) -> Authority
§impl From<HostWithPort> for Authority
impl From<HostWithPort> for Authority
§fn from(addr: HostWithPort) -> Authority
fn from(addr: HostWithPort) -> Authority
§impl From<SocketAddr> for Authority
impl From<SocketAddr> for Authority
§fn from(addr: SocketAddr) -> Authority
fn from(addr: SocketAddr) -> Authority
§impl From<SocketAddress> for Authority
impl From<SocketAddress> for Authority
§fn from(addr: SocketAddress) -> Authority
fn from(addr: SocketAddress) -> Authority
§impl Serialize for Authority
impl Serialize for Authority
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl Eq for Authority
impl StructuralPartialEq for Authority
Auto Trait Implementations§
impl Freeze for Authority
impl RefUnwindSafe for Authority
impl Send for Authority
impl Sync for Authority
impl Unpin for Authority
impl UnwindSafe for Authority
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
§impl<T> ToSmolStr for T
impl<T> ToSmolStr for T
fn to_smolstr(&self) -> SmolStr
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.