pub struct SocketAddrV6 {
ip: Ipv6Addr,
port: u16,
flowinfo: u32,
scope_id: u32,
}
Expand description
An IPv6 socket address.
IPv6 socket addresses consist of an IPv6
address, a 16-bit port number, as well
as fields containing the traffic class, the flow label, and a scope identifier
(see IETF RFC 2553, Section 3.3 for more details).
See SocketAddr
for a type encompassing both IPv4 and IPv6 socket addresses.
ยงPortability
SocketAddrV6
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.
ยงTextual representation
SocketAddrV6
provides a FromStr
implementation,
based on the bracketed format recommended by IETF RFC 5952,
with scope identifiers based on those specified in IETF RFC 4007.
It accepts addresses consisting of the following elements, in order:
- A left square bracket (
[
) - The textual representation of an IPv6 address
- Optionally, a percent sign (
%
) followed by the scope identifier encoded as a decimal integer - A right square bracket (
]
) - A colon (
:
) - The port, encoded as a decimal integer.
For example, the string [2001:db8::413]:443
represents a SocketAddrV6
with the address 2001:db8::413
and port 443
. The string
[2001:db8::413%612]:443
represents the same address and port, with a
scope identifier of 612
.
Other formats are not accepted.
ยงExamples
use std::net::{Ipv6Addr, SocketAddrV6};
let socket = SocketAddrV6::new(Ipv6Addr::new(0x2001, 0xdb8, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
assert_eq!("[2001:db8::1]:8080".parse(), Ok(socket));
assert_eq!(socket.ip(), &Ipv6Addr::new(0x2001, 0xdb8, 0, 0, 0, 0, 0, 1));
assert_eq!(socket.port(), 8080);
let mut with_scope = socket.clone();
with_scope.set_scope_id(3);
assert_eq!("[2001:db8::1%3]:8080".parse(), Ok(with_scope));
Fieldsยง
ยงip: Ipv6Addr
ยงport: u16
ยงflowinfo: u32
ยงscope_id: u32
Implementationsยง
Sourceยงimpl SocketAddrV6
impl SocketAddrV6
Sourcepub fn parse_ascii(b: &[u8]) -> Result<SocketAddrV6, AddrParseError>
๐ฌThis is a nightly-only experimental API. (addr_parse_ascii
)
pub fn parse_ascii(b: &[u8]) -> Result<SocketAddrV6, AddrParseError>
addr_parse_ascii
)Parse an IPv6 socket address from a slice of bytes.
#![feature(addr_parse_ascii)]
use std::net::{Ipv6Addr, SocketAddrV6};
let socket = SocketAddrV6::new(Ipv6Addr::new(0x2001, 0xdb8, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
assert_eq!(SocketAddrV6::parse_ascii(b"[2001:db8::1]:8080"), Ok(socket));
Sourceยงimpl SocketAddrV6
impl SocketAddrV6
1.0.0 (const: 1.69.0) ยท Sourcepub const fn new(
ip: Ipv6Addr,
port: u16,
flowinfo: u32,
scope_id: u32,
) -> SocketAddrV6
pub const fn new( ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32, ) -> SocketAddrV6
Creates a new socket address from an IPv6
address, a 16-bit port number,
and the flowinfo
and scope_id
fields.
For more information on the meaning and layout of the flowinfo
and scope_id
parameters, see IETF RFC 2553, Section 3.3.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
1.0.0 (const: 1.69.0) ยท Sourcepub const fn ip(&self) -> &Ipv6Addr
pub const fn ip(&self) -> &Ipv6Addr
Returns the IP address associated with this socket address.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
assert_eq!(socket.ip(), &Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
1.9.0 (const: 1.87.0) ยท Sourcepub const fn set_ip(&mut self, new_ip: Ipv6Addr)
pub const fn set_ip(&mut self, new_ip: Ipv6Addr)
Changes the IP address associated with this socket address.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let mut socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
socket.set_ip(Ipv6Addr::new(76, 45, 0, 0, 0, 0, 0, 0));
assert_eq!(socket.ip(), &Ipv6Addr::new(76, 45, 0, 0, 0, 0, 0, 0));
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::{SocketAddrV6, Ipv6Addr};
let socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
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::{SocketAddrV6, Ipv6Addr};
let mut socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 0);
socket.set_port(4242);
assert_eq!(socket.port(), 4242);
1.0.0 (const: 1.69.0) ยท Sourcepub const fn flowinfo(&self) -> u32
pub const fn flowinfo(&self) -> u32
Returns the flow information associated with this address.
This information corresponds to the sin6_flowinfo
field in Cโs netinet/in.h
,
as specified in IETF RFC 2553, Section 3.3.
It combines information about the flow label and the traffic class as specified
in IETF RFC 2460, respectively Section 6 and Section 7.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 10, 0);
assert_eq!(socket.flowinfo(), 10);
1.9.0 (const: 1.87.0) ยท Sourcepub const fn set_flowinfo(&mut self, new_flowinfo: u32)
pub const fn set_flowinfo(&mut self, new_flowinfo: u32)
Changes the flow information associated with this socket address.
See SocketAddrV6::flowinfo
โs documentation for more details.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let mut socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 10, 0);
socket.set_flowinfo(56);
assert_eq!(socket.flowinfo(), 56);
1.0.0 (const: 1.69.0) ยท Sourcepub const fn scope_id(&self) -> u32
pub const fn scope_id(&self) -> u32
Returns the scope ID associated with this address.
This information corresponds to the sin6_scope_id
field in Cโs netinet/in.h
,
as specified in IETF RFC 2553, Section 3.3.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 78);
assert_eq!(socket.scope_id(), 78);
1.9.0 (const: 1.87.0) ยท Sourcepub const fn set_scope_id(&mut self, new_scope_id: u32)
pub const fn set_scope_id(&mut self, new_scope_id: u32)
Changes the scope ID associated with this socket address.
See SocketAddrV6::scope_id
โs documentation for more details.
ยงExamples
use std::net::{SocketAddrV6, Ipv6Addr};
let mut socket = SocketAddrV6::new(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8080, 0, 78);
socket.set_scope_id(42);
assert_eq!(socket.scope_id(), 42);
Trait Implementationsยง
ยงimpl<'a> AddAnyAttr for SocketAddrV6
impl<'a> AddAnyAttr for SocketAddrV6
ยงtype Output<SomeNewAttr: Attribute> = SocketAddrV6
type Output<SomeNewAttr: Attribute> = SocketAddrV6
ยงfn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <SocketAddrV6 as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
fn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <SocketAddrV6 as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
ยงimpl Archive for SocketAddrV6
impl Archive for SocketAddrV6
ยงtype Resolver = ()
type Resolver = ()
ยงunsafe fn resolve(
&self,
pos: usize,
_: <SocketAddrV6 as Archive>::Resolver,
out: *mut <SocketAddrV6 as Archive>::Archived,
)
unsafe fn resolve( &self, pos: usize, _: <SocketAddrV6 as Archive>::Resolver, out: *mut <SocketAddrV6 as Archive>::Archived, )
ยงimpl AttributeValue for SocketAddrV6
impl AttributeValue for SocketAddrV6
ยงtype AsyncOutput = SocketAddrV6
type AsyncOutput = SocketAddrV6
ยงtype State = (Element, SocketAddrV6)
type State = (Element, SocketAddrV6)
ยงtype Cloneable = SocketAddrV6
type Cloneable = SocketAddrV6
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 = SocketAddrV6
type CloneableOwned = SocketAddrV6
'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,
) -> <SocketAddrV6 as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <SocketAddrV6 as AttributeValue>::State
<template>
.ยงfn build(
self,
el: &Element,
key: &str,
) -> <SocketAddrV6 as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <SocketAddrV6 as AttributeValue>::State
ยงfn rebuild(self, key: &str, state: &mut <SocketAddrV6 as AttributeValue>::State)
fn rebuild(self, key: &str, state: &mut <SocketAddrV6 as AttributeValue>::State)
ยงfn into_cloneable(self) -> <SocketAddrV6 as AttributeValue>::Cloneable
fn into_cloneable(self) -> <SocketAddrV6 as AttributeValue>::Cloneable
ยงfn into_cloneable_owned(
self,
) -> <SocketAddrV6 as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <SocketAddrV6 as AttributeValue>::CloneableOwned
'static
.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <SocketAddrV6 as AttributeValue>::AsyncOutput
async fn resolve(self) -> <SocketAddrV6 as AttributeValue>::AsyncOutput
Sourceยงimpl<'de, __Context> BorrowDecode<'de, __Context> for SocketAddrV6
impl<'de, __Context> BorrowDecode<'de, __Context> for SocketAddrV6
Sourceยงfn borrow_decode<D>(decoder: &mut D) -> Result<SocketAddrV6, DecodeError>where
D: BorrowDecoder<'de, Context = __Context>,
fn borrow_decode<D>(decoder: &mut D) -> Result<SocketAddrV6, DecodeError>where
D: BorrowDecoder<'de, Context = __Context>,
1.0.0 ยท Sourceยงimpl Clone for SocketAddrV6
impl Clone for SocketAddrV6
Sourceยงfn clone(&self) -> SocketAddrV6
fn clone(&self) -> SocketAddrV6
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more1.0.0 ยท Sourceยงimpl Debug for SocketAddrV6
impl Debug for SocketAddrV6
Sourceยงimpl<Context> Decode<Context> for SocketAddrV6
impl<Context> Decode<Context> for SocketAddrV6
Sourceยงfn decode<D>(decoder: &mut D) -> Result<SocketAddrV6, DecodeError>where
D: Decoder<Context = Context>,
fn decode<D>(decoder: &mut D) -> Result<SocketAddrV6, DecodeError>where
D: Decoder<Context = Context>,
Sourceยงimpl<'de> Deserialize<'de> for SocketAddrV6
impl<'de> Deserialize<'de> for SocketAddrV6
Sourceยงfn deserialize<D>(
deserializer: D,
) -> Result<SocketAddrV6, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SocketAddrV6, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
1.0.0 ยท Sourceยงimpl Display for SocketAddrV6
impl Display for SocketAddrV6
Sourceยงimpl Encode for SocketAddrV6
impl Encode for SocketAddrV6
ยงimpl From<SocketAddrV6> for SockAddr
impl From<SocketAddrV6> for SockAddr
ยงfn from(addr: SocketAddrV6) -> SockAddr
fn from(addr: SocketAddrV6) -> SockAddr
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
.
ยงimpl From<SocketAddrV6> for SocketAddrAny
impl From<SocketAddrV6> for SocketAddrAny
ยงfn from(from: SocketAddrV6) -> SocketAddrAny
fn from(from: SocketAddrV6) -> SocketAddrAny
1.5.0 ยท Sourceยงimpl FromStr for SocketAddrV6
impl FromStr for SocketAddrV6
Sourceยงtype Err = AddrParseError
type Err = AddrParseError
Sourceยงfn from_str(s: &str) -> Result<SocketAddrV6, AddrParseError>
fn from_str(s: &str) -> Result<SocketAddrV6, AddrParseError>
s
to return a value of this type. Read more1.0.0 ยท Sourceยงimpl Hash for SocketAddrV6
impl Hash for SocketAddrV6
1.0.0 ยท Sourceยงimpl Ord for SocketAddrV6
impl Ord for SocketAddrV6
Sourceยงfn cmp(&self, other: &SocketAddrV6) -> Ordering
fn cmp(&self, other: &SocketAddrV6) -> Ordering
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
ยงimpl PartialEq<ArchivedSocketAddrV6> for SocketAddrV6
impl PartialEq<ArchivedSocketAddrV6> for SocketAddrV6
ยงimpl PartialEq<SocketAddrV6> for ArchivedSocketAddrV6
impl PartialEq<SocketAddrV6> for ArchivedSocketAddrV6
1.0.0 ยท Sourceยงimpl PartialEq for SocketAddrV6
impl PartialEq for SocketAddrV6
ยงimpl PartialOrd<ArchivedSocketAddrV6> for SocketAddrV6
impl PartialOrd<ArchivedSocketAddrV6> for SocketAddrV6
ยงimpl PartialOrd<SocketAddrV6> for ArchivedSocketAddrV6
impl PartialOrd<SocketAddrV6> for ArchivedSocketAddrV6
1.0.0 ยท Sourceยงimpl PartialOrd for SocketAddrV6
impl PartialOrd for SocketAddrV6
ยงimpl PatchField for SocketAddrV6
impl PatchField for SocketAddrV6
ยงfn patch_field(
&mut self,
new: SocketAddrV6,
path: &StorePath,
notify: &mut dyn FnMut(&StorePath),
)
fn patch_field( &mut self, new: SocketAddrV6, path: &StorePath, notify: &mut dyn FnMut(&StorePath), )
ยงimpl Render for SocketAddrV6
impl Render for SocketAddrV6
ยงtype State = SocketAddrV6State
type State = SocketAddrV6State
ยงfn build(self) -> <SocketAddrV6 as Render>::State
fn build(self) -> <SocketAddrV6 as Render>::State
ยงfn rebuild(self, state: &mut <SocketAddrV6 as Render>::State)
fn rebuild(self, state: &mut <SocketAddrV6 as Render>::State)
ยงimpl RenderHtml for SocketAddrV6
impl RenderHtml for SocketAddrV6
ยงconst MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
ยงtype AsyncOutput = SocketAddrV6
type AsyncOutput = SocketAddrV6
ยงtype Owned = SocketAddrV6
type Owned = SocketAddrV6
'static
.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <SocketAddrV6 as RenderHtml>::AsyncOutput
async fn resolve(self) -> <SocketAddrV6 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,
) -> <SocketAddrV6 as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <SocketAddrV6 as Render>::State
ยงfn into_owned(self) -> <SocketAddrV6 as RenderHtml>::Owned
fn into_owned(self) -> <SocketAddrV6 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.ยงimpl<S> Serialize<S> for SocketAddrV6where
S: Fallible + ?Sized,
impl<S> Serialize<S> for SocketAddrV6where
S: Fallible + ?Sized,
ยงfn serialize(
&self,
_: &mut S,
) -> Result<<SocketAddrV6 as Archive>::Resolver, <S as Fallible>::Error>
fn serialize( &self, _: &mut S, ) -> Result<<SocketAddrV6 as Archive>::Resolver, <S as Fallible>::Error>
Sourceยงimpl Serialize for SocketAddrV6
impl Serialize for SocketAddrV6
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 SocketAddrV6
impl SocketAddrArg for SocketAddrV6
ยง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 SocketAddrV6
impl ToSocketAddrs for SocketAddrV6
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>
SocketAddr
s. Read moreยงimpl<'a> ToTemplate for SocketAddrV6
impl<'a> ToTemplate for SocketAddrV6
ยง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 SocketAddrV6
impl TryFrom<SocketAddrAny> for SocketAddrV6
ยงfn try_from(
value: SocketAddrAny,
) -> Result<SocketAddrV6, <SocketAddrV6 as TryFrom<SocketAddrAny>>::Error>
fn try_from( value: SocketAddrAny, ) -> Result<SocketAddrV6, <SocketAddrV6 as TryFrom<SocketAddrAny>>::Error>
Convert if the address is an IPv6 address.
Returns Err(Errno::AFNOSUPPORT)
if the address family is not IPv6.
impl Copy for SocketAddrV6
impl Eq for SocketAddrV6
impl StructuralPartialEq for SocketAddrV6
impl ToSocketAddrs for SocketAddrV6
Auto Trait Implementationsยง
impl Freeze for SocketAddrV6
impl RefUnwindSafe for SocketAddrV6
impl Send for SocketAddrV6
impl Sync for SocketAddrV6
impl Unpin for SocketAddrV6
impl UnwindSafe for SocketAddrV6
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
ยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
ยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
ยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
ยงimpl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
ยงtype Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be unsized. Read moreยงtype MetadataResolver = ()
type MetadataResolver = ()
ยงunsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
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
ยงimpl<T> CallHasher for T
impl<T> CallHasher for 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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
ยงfn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
ยง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
ยง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.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.Sourceยง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> IntoParam for T
impl<T> IntoParam for 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> Pointee for T
impl<T> Pointee 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, S> SerializeUnsized<S> for Twhere
T: Serialize<S>,
S: Serializer + ?Sized,
impl<T, S> SerializeUnsized<S> for Twhere
T: Serialize<S>,
S: Serializer + ?Sized,
ยงfn serialize_unsized(
&self,
serializer: &mut S,
) -> Result<usize, <S as Fallible>::Error>
fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error>
ยงfn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>
fn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>
ยง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