pub enum SocketAddr {
V4(SocketAddrV4),
V6(SocketAddrV6),
}Expand description
An internet socket address, either IPv4 or IPv6.
Internet socket addresses consist of an IP address, a 16-bit port number, as well
as possibly some version-dependent additional information. See SocketAddrV4โs and
SocketAddrV6โs respective documentation for more details.
ยงPortability
SocketAddr is intended to be a portable representation of socket addresses and is likely not
the same as the internal socket address type used by the target operating systemโs API. Like all
repr(Rust) structs, however, its exact layout remains undefined and should not be relied upon
between builds.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!("127.0.0.1:8080".parse(), Ok(socket));
assert_eq!(socket.port(), 8080);
assert_eq!(socket.is_ipv4(), true);Variantsยง
Implementationsยง
Sourceยงimpl SocketAddr
impl SocketAddr
Sourcepub fn parse_ascii(b: &[u8]) -> Result<SocketAddr, AddrParseError>
๐ฌThis is a nightly-only experimental API. (addr_parse_ascii)
pub fn parse_ascii(b: &[u8]) -> Result<SocketAddr, AddrParseError>
addr_parse_ascii)Parse a socket address from a slice of bytes.
#![feature(addr_parse_ascii)]
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
let socket_v4 = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
let socket_v6 = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)), 8080);
assert_eq!(SocketAddr::parse_ascii(b"127.0.0.1:8080"), Ok(socket_v4));
assert_eq!(SocketAddr::parse_ascii(b"[::1]:8080"), Ok(socket_v6));Sourceยงimpl SocketAddr
impl SocketAddr
1.7.0 (const: 1.69.0) ยท Sourcepub const fn new(ip: IpAddr, port: u16) -> SocketAddr
pub const fn new(ip: IpAddr, port: u16) -> SocketAddr
Creates a new socket address from an IP address and a port number.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.ip(), IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)));
assert_eq!(socket.port(), 8080);1.7.0 (const: 1.69.0) ยท Sourcepub const fn ip(&self) -> IpAddr
pub const fn ip(&self) -> IpAddr
Returns the IP address associated with this socket address.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.ip(), IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)));1.9.0 (const: 1.87.0) ยท Sourcepub const fn set_ip(&mut self, new_ip: IpAddr)
pub const fn set_ip(&mut self, new_ip: IpAddr)
Changes the IP address associated with this socket address.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let mut socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
socket.set_ip(IpAddr::V4(Ipv4Addr::new(10, 10, 0, 1)));
assert_eq!(socket.ip(), IpAddr::V4(Ipv4Addr::new(10, 10, 0, 1)));1.0.0 (const: 1.69.0) ยท Sourcepub const fn port(&self) -> u16
pub const fn port(&self) -> u16
Returns the port number associated with this socket address.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.port(), 8080);1.9.0 (const: 1.87.0) ยท Sourcepub const fn set_port(&mut self, new_port: u16)
pub const fn set_port(&mut self, new_port: u16)
Changes the port number associated with this socket address.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let mut socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
socket.set_port(1025);
assert_eq!(socket.port(), 1025);1.16.0 (const: 1.69.0) ยท Sourcepub const fn is_ipv4(&self) -> bool
pub const fn is_ipv4(&self) -> bool
Returns true if the IP address in this SocketAddr is an
IPv4 address, and false otherwise.
ยงExamples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.is_ipv4(), true);
assert_eq!(socket.is_ipv6(), false);1.16.0 (const: 1.69.0) ยท Sourcepub const fn is_ipv6(&self) -> bool
pub const fn is_ipv6(&self) -> bool
Returns true if the IP address in this SocketAddr is an
IPv6 address, and false otherwise.
ยงExamples
use std::net::{IpAddr, Ipv6Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 65535, 0, 1)), 8080);
assert_eq!(socket.is_ipv4(), false);
assert_eq!(socket.is_ipv6(), true);Trait Implementationsยง
ยงimpl<'a> AddAnyAttr for SocketAddr
impl<'a> AddAnyAttr for SocketAddr
ยงtype Output<SomeNewAttr: Attribute> = SocketAddr
type Output<SomeNewAttr: Attribute> = SocketAddr
ยงfn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <SocketAddr as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
fn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <SocketAddr as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
ยงimpl AttributeValue for SocketAddr
impl AttributeValue for SocketAddr
ยงtype AsyncOutput = SocketAddr
type AsyncOutput = SocketAddr
ยงtype State = (Element, SocketAddr)
type State = (Element, SocketAddr)
ยงtype Cloneable = SocketAddr
type Cloneable = SocketAddr
FnMut() continues mutating the same
closure), but making a String cloneable does not necessarily need to make it an
Arc<str>, as two different clones of a String will still have the same value.ยงtype CloneableOwned = SocketAddr
type CloneableOwned = SocketAddr
'static. This is used for spreading across types when the
spreadable attribute needs to be owned. In some cases (&'a str to Arc<str>, etc.) the owned
cloneable type has worse performance than the cloneable type, so they are separate.ยงfn to_template(_key: &str, _buf: &mut String)
fn to_template(_key: &str, _buf: &mut String)
<template>.ยงfn hydrate<const FROM_SERVER: bool>(
self,
key: &str,
el: &Element,
) -> <SocketAddr as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <SocketAddr as AttributeValue>::State
<template>.ยงfn build(self, el: &Element, key: &str) -> <SocketAddr as AttributeValue>::State
fn build(self, el: &Element, key: &str) -> <SocketAddr as AttributeValue>::State
ยงfn rebuild(self, key: &str, state: &mut <SocketAddr as AttributeValue>::State)
fn rebuild(self, key: &str, state: &mut <SocketAddr as AttributeValue>::State)
ยงfn into_cloneable(self) -> <SocketAddr as AttributeValue>::Cloneable
fn into_cloneable(self) -> <SocketAddr as AttributeValue>::Cloneable
ยงfn into_cloneable_owned(self) -> <SocketAddr as AttributeValue>::CloneableOwned
fn into_cloneable_owned(self) -> <SocketAddr as AttributeValue>::CloneableOwned
'static.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <SocketAddr as AttributeValue>::AsyncOutput
async fn resolve(self) -> <SocketAddr as AttributeValue>::AsyncOutput
Sourceยงimpl<'de, __Context> BorrowDecode<'de, __Context> for SocketAddr
impl<'de, __Context> BorrowDecode<'de, __Context> for SocketAddr
Sourceยงfn borrow_decode<D>(decoder: &mut D) -> Result<SocketAddr, DecodeError>where
D: BorrowDecoder<'de, Context = __Context>,
fn borrow_decode<D>(decoder: &mut D) -> Result<SocketAddr, DecodeError>where
D: BorrowDecoder<'de, Context = __Context>,
1.0.0 ยท Sourceยงimpl Clone for SocketAddr
impl Clone for SocketAddr
Sourceยงfn clone(&self) -> SocketAddr
fn clone(&self) -> SocketAddr
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreยงimpl Connected<IncomingStream<'_, TcpListener>> for SocketAddr
impl Connected<IncomingStream<'_, TcpListener>> for SocketAddr
ยงfn connect_info(stream: IncomingStream<'_, TcpListener>) -> SocketAddr
fn connect_info(stream: IncomingStream<'_, TcpListener>) -> SocketAddr
ยงimpl Connected<SocketAddr> for SocketAddr
impl Connected<SocketAddr> for SocketAddr
ยงfn connect_info(remote_addr: SocketAddr) -> SocketAddr
fn connect_info(remote_addr: SocketAddr) -> SocketAddr
1.0.0 ยท Sourceยงimpl Debug for SocketAddr
impl Debug for SocketAddr
Sourceยงimpl<Context> Decode<Context> for SocketAddr
impl<Context> Decode<Context> for SocketAddr
Sourceยงfn decode<D>(decoder: &mut D) -> Result<SocketAddr, DecodeError>where
D: Decoder<Context = Context>,
fn decode<D>(decoder: &mut D) -> Result<SocketAddr, DecodeError>where
D: Decoder<Context = Context>,
Sourceยงimpl<'de> Deserialize<'de> for SocketAddr
Available on crate feature std or non-no_core_net only.
impl<'de> Deserialize<'de> for SocketAddr
std or non-no_core_net only.Sourceยงfn deserialize<D>(
deserializer: D,
) -> Result<SocketAddr, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SocketAddr, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
1.0.0 ยท Sourceยงimpl Display for SocketAddr
impl Display for SocketAddr
Sourceยงimpl Encode for SocketAddr
impl Encode for SocketAddr
1.17.0 (const: unstable) ยท Sourceยงimpl<I> From<(I, u16)> for SocketAddr
impl<I> From<(I, u16)> for SocketAddr
Sourceยงfn from(pieces: (I, u16)) -> SocketAddr
fn from(pieces: (I, u16)) -> SocketAddr
Converts a tuple struct (Into<IpAddr>, u16) into a SocketAddr.
This conversion creates a SocketAddr::V4 for an IpAddr::V4
and creates a SocketAddr::V6 for an IpAddr::V6.
u16 is treated as port of the newly created SocketAddr.
ยงimpl From<SocketAddr> for SockAddr
impl From<SocketAddr> for SockAddr
ยงfn from(addr: SocketAddr) -> SockAddr
fn from(addr: SocketAddr) -> SockAddr
ยงimpl From<SocketAddr> for SocketAddrAny
impl From<SocketAddr> for SocketAddrAny
ยงfn from(from: SocketAddr) -> SocketAddrAny
fn from(from: SocketAddr) -> SocketAddrAny
1.16.0 (const: unstable) ยท Sourceยงimpl From<SocketAddrV4> for SocketAddr
impl From<SocketAddrV4> for SocketAddr
Sourceยงfn from(sock4: SocketAddrV4) -> SocketAddr
fn from(sock4: SocketAddrV4) -> SocketAddr
Converts a SocketAddrV4 into a SocketAddr::V4.
1.16.0 (const: unstable) ยท Sourceยงimpl From<SocketAddrV6> for SocketAddr
impl From<SocketAddrV6> for SocketAddr
Sourceยงfn from(sock6: SocketAddrV6) -> SocketAddr
fn from(sock6: SocketAddrV6) -> SocketAddr
Converts a SocketAddrV6 into a SocketAddr::V6.
1.0.0 ยท Sourceยงimpl FromStr for SocketAddr
impl FromStr for SocketAddr
Sourceยงtype Err = AddrParseError
type Err = AddrParseError
Sourceยงfn from_str(s: &str) -> Result<SocketAddr, AddrParseError>
fn from_str(s: &str) -> Result<SocketAddr, AddrParseError>
s to return a value of this type. Read more1.0.0 ยท Sourceยงimpl Hash for SocketAddr
impl Hash for SocketAddr
1.0.0 ยท Sourceยงimpl Ord for SocketAddr
impl Ord for SocketAddr
Sourceยงfn cmp(&self, other: &SocketAddr) -> Ordering
fn cmp(&self, other: &SocketAddr) -> Ordering
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.0.0 ยท Sourceยงimpl PartialEq for SocketAddr
impl PartialEq for SocketAddr
1.0.0 ยท Sourceยงimpl PartialOrd for SocketAddr
impl PartialOrd for SocketAddr
ยงimpl PatchField for SocketAddr
impl PatchField for SocketAddr
ยงfn patch_field(
&mut self,
new: SocketAddr,
path: &StorePath,
notify: &mut dyn FnMut(&StorePath),
)
fn patch_field( &mut self, new: SocketAddr, path: &StorePath, notify: &mut dyn FnMut(&StorePath), )
ยงimpl PatchField for SocketAddr
impl PatchField for SocketAddr
ยงfn patch_field(
&mut self,
new: SocketAddr,
path: &StorePath,
notify: &mut dyn FnMut(&StorePath),
)
fn patch_field( &mut self, new: SocketAddr, path: &StorePath, notify: &mut dyn FnMut(&StorePath), )
ยงimpl Render for SocketAddr
impl Render for SocketAddr
ยงtype State = SocketAddrState
type State = SocketAddrState
ยงfn build(self) -> <SocketAddr as Render>::State
fn build(self) -> <SocketAddr as Render>::State
ยงfn rebuild(self, state: &mut <SocketAddr as Render>::State)
fn rebuild(self, state: &mut <SocketAddr as Render>::State)
ยงimpl RenderHtml for SocketAddr
impl RenderHtml for SocketAddr
ยงconst MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
ยงtype AsyncOutput = SocketAddr
type AsyncOutput = SocketAddr
ยงtype Owned = SocketAddr
type Owned = SocketAddr
'static.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <SocketAddr as RenderHtml>::AsyncOutput
async fn resolve(self) -> <SocketAddr as RenderHtml>::AsyncOutput
ยงfn to_html_with_buf(
self,
buf: &mut String,
position: &mut Position,
_escape: bool,
_mark_branches: bool,
_extra_attrs: Vec<AnyAttribute>,
)
fn to_html_with_buf( self, buf: &mut String, position: &mut Position, _escape: bool, _mark_branches: bool, _extra_attrs: Vec<AnyAttribute>, )
ยงfn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <SocketAddr as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <SocketAddr as Render>::State
ยงfn into_owned(self) -> <SocketAddr as RenderHtml>::Owned
fn into_owned(self) -> <SocketAddr as RenderHtml>::Owned
'static.ยงconst EXISTS: bool = true
const EXISTS: bool = true
ยงfn to_html_branching(self) -> Stringwhere
Self: Sized,
fn to_html_branching(self) -> Stringwhere
Self: Sized,
ยงfn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)where
Self: Sized,
fn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)where
Self: Sized,
ยงfn hydrate_async(
self,
cursor: &Cursor,
position: &PositionState,
) -> impl Future<Output = Self::State>
fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> impl Future<Output = Self::State>
ยงfn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
RenderHtml::hydrate, beginning at the given element.ยงfn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
RenderHtml::hydrate, beginning at the given element and position.Sourceยงimpl Serialize for SocketAddr
Available on crate feature std or non-no_core_net only.
impl Serialize for SocketAddr
std or non-no_core_net only.Sourceยง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 SocketAddrArg for SocketAddr
impl SocketAddrArg for SocketAddr
ยงunsafe fn with_sockaddr<R>(
&self,
f: impl FnOnce(*const SocketAddrOpaque, u32) -> R,
) -> R
unsafe fn with_sockaddr<R>( &self, f: impl FnOnce(*const SocketAddrOpaque, u32) -> R, ) -> R
ยงunsafe fn write_sockaddr(&self, storage: *mut SocketAddrStorage) -> u32
unsafe fn write_sockaddr(&self, storage: *mut SocketAddrStorage) -> u32
SocketAddrStorage. Read more1.0.0 ยท Sourceยงimpl ToSocketAddrs for SocketAddr
impl ToSocketAddrs for SocketAddr
Sourceยงtype Iter = IntoIter<SocketAddr>
type Iter = IntoIter<SocketAddr>
Sourceยงfn to_socket_addrs(&self) -> Result<IntoIter<SocketAddr>, Error>
fn to_socket_addrs(&self) -> Result<IntoIter<SocketAddr>, Error>
SocketAddrs. Read moreยงimpl<'a> ToTemplate for SocketAddr
impl<'a> ToTemplate for SocketAddr
ยงfn to_template(
buf: &mut String,
_class: &mut String,
_style: &mut String,
_inner_html: &mut String,
position: &mut Position,
)
fn to_template( buf: &mut String, _class: &mut String, _style: &mut String, _inner_html: &mut String, position: &mut Position, )
<template> that corresponds
to a view of a particular type.ยงimpl TryFrom<SocketAddrAny> for SocketAddr
impl TryFrom<SocketAddrAny> for SocketAddr
ยงfn try_from(
value: SocketAddrAny,
) -> Result<SocketAddr, <SocketAddr as TryFrom<SocketAddrAny>>::Error>
fn try_from( value: SocketAddrAny, ) -> Result<SocketAddr, <SocketAddr as TryFrom<SocketAddrAny>>::Error>
Convert if the address is an IPv4 or IPv6 address.
Returns Err(Errno::AFNOSUPPORT) if the address family is not IPv4 or
IPv6.
impl Copy for SocketAddr
impl Eq for SocketAddr
impl StructuralPartialEq for SocketAddr
impl ToSocketAddrs for SocketAddr
Auto Trait Implementationsยง
impl Freeze for SocketAddr
impl RefUnwindSafe for SocketAddr
impl Send for SocketAddr
impl Sync for SocketAddr
impl Unpin for SocketAddr
impl UnwindSafe for SocketAddr
Blanket Implementationsยง
Sourceยงimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Sourceยงfn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
Sourceยงimpl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Sourceยงfn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Sourceยงimpl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Sourceยงfn arrays_into(self) -> C
fn arrays_into(self) -> C
ยงimpl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
ยงtype Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
ยงfn bind(
self,
key: Key,
signal: Sig,
) -> <V as BindAttribute<Key, Sig, T>>::Output
fn bind( self, key: Key, signal: Sig, ) -> <V as BindAttribute<Key, Sig, T>>::Output
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Sourceยงtype Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงimpl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Sourceยงimpl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Sourceยงfn components_from(colors: C) -> T
fn components_from(colors: C) -> T
ยงimpl<T, K, V> CustomAttribute<K, V> for Twhere
T: AddAnyAttr,
K: CustomAttributeKey,
V: AttributeValue,
impl<T, K, V> CustomAttribute<K, V> for Twhere
T: AddAnyAttr,
K: CustomAttributeKey,
V: AttributeValue,
ยงimpl<V, T, P, D> DirectiveAttribute<T, P, D> for Vwhere
V: AddAnyAttr,
D: IntoDirective<T, P>,
P: Clone + 'static,
T: 'static,
impl<V, T, P, D> DirectiveAttribute<T, P, D> for Vwhere
V: AddAnyAttr,
D: IntoDirective<T, P>,
P: Clone + 'static,
T: 'static,
ยงtype Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
ยงfn directive(
self,
handler: D,
param: P,
) -> <V as DirectiveAttribute<T, P, D>>::Output
fn directive( self, handler: D, param: P, ) -> <V as DirectiveAttribute<T, P, D>>::Output
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยง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<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
ยง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
Sourceยงimpl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Sourceยงfn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.ยงimpl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
ยงfn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
submit event.ยงfn from_form_data(form_data: &FormData) -> Result<T, Error>
fn from_form_data(form_data: &FormData) -> Result<T, Error>
Sourceยงimpl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Sourceยงfn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Hexable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> Hexable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงimpl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Sourceยงfn into_angle(self) -> U
fn into_angle(self) -> U
T.ยงimpl<T> IntoAny for Twhere
T: Send + RenderHtml,
impl<T> IntoAny for Twhere
T: Send + RenderHtml,
ยงimpl<T> IntoAttributeValue for Twhere
T: AttributeValue,
impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
ยงfn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
Sourceยงimpl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Sourceยงtype Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Sourceยงfn into_color(self) -> U
fn into_color(self) -> U
Sourceยงimpl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Sourceยงfn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
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> IntoMaybeErased for Twhere
T: RenderHtml,
impl<T> IntoMaybeErased for Twhere
T: RenderHtml,
ยงfn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
ยงimpl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for Iwhere
I: Into<T>,
impl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for Iwhere
I: Into<T>,
ยงfn into_reactive_value(self) -> T
fn into_reactive_value(self) -> T
self into a T.ยงimpl<T> IntoRender for Twhere
T: Render,
impl<T> IntoRender for Twhere
T: Render,
ยงfn into_render(self) -> <T as IntoRender>::Output
fn into_render(self) -> <T as IntoRender>::Output
Sourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
ยง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.
Sourceยงimpl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Sourceยงtype Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Sourceยงfn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Sourceยงimpl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Sourceยงfn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more