pub struct SocketAddrV4 {
ip: Ipv4Addr,
port: u16,
}
Expand description
An IPv4 socket address.
IPv4 socket addresses consist of an IPv4
address and a 16-bit port number, as
stated in IETF RFC 793.
See SocketAddr
for a type encompassing both IPv4 and IPv6 socket addresses.
ยงPortability
SocketAddrV4
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
SocketAddrV4
provides a FromStr
implementation.
It accepts an IPv4 address in its textual representation, followed by a
single :
, followed by the port encoded as a decimal integer. Other
formats are not accepted.
ยงExamples
use std::net::{Ipv4Addr, SocketAddrV4};
let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
assert_eq!("127.0.0.1:8080".parse(), Ok(socket));
assert_eq!(socket.ip(), &Ipv4Addr::new(127, 0, 0, 1));
assert_eq!(socket.port(), 8080);
Fieldsยง
ยงip: Ipv4Addr
ยงport: u16
Implementationsยง
Sourceยงimpl SocketAddrV4
impl SocketAddrV4
Sourcepub fn parse_ascii(b: &[u8]) -> Result<SocketAddrV4, AddrParseError>
๐ฌThis is a nightly-only experimental API. (addr_parse_ascii
)
pub fn parse_ascii(b: &[u8]) -> Result<SocketAddrV4, AddrParseError>
addr_parse_ascii
)Parse an IPv4 socket address from a slice of bytes.
#![feature(addr_parse_ascii)]
use std::net::{Ipv4Addr, SocketAddrV4};
let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
assert_eq!(SocketAddrV4::parse_ascii(b"127.0.0.1:8080"), Ok(socket));
Sourceยงimpl SocketAddrV4
impl SocketAddrV4
1.0.0 (const: 1.69.0) ยท Sourcepub const fn new(ip: Ipv4Addr, port: u16) -> SocketAddrV4
pub const fn new(ip: Ipv4Addr, port: u16) -> SocketAddrV4
Creates a new socket address from an IPv4
address and a port number.
ยงExamples
use std::net::{SocketAddrV4, Ipv4Addr};
let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
1.0.0 (const: 1.69.0) ยท Sourcepub const fn ip(&self) -> &Ipv4Addr
pub const fn ip(&self) -> &Ipv4Addr
Returns the IP address associated with this socket address.
ยงExamples
use std::net::{SocketAddrV4, Ipv4Addr};
let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
assert_eq!(socket.ip(), &Ipv4Addr::new(127, 0, 0, 1));
1.9.0 (const: 1.87.0) ยท Sourcepub const fn set_ip(&mut self, new_ip: Ipv4Addr)
pub const fn set_ip(&mut self, new_ip: Ipv4Addr)
Changes the IP address associated with this socket address.
ยงExamples
use std::net::{SocketAddrV4, Ipv4Addr};
let mut socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
socket.set_ip(Ipv4Addr::new(192, 168, 0, 1));
assert_eq!(socket.ip(), &Ipv4Addr::new(192, 168, 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::{SocketAddrV4, Ipv4Addr};
let socket = SocketAddrV4::new(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::{SocketAddrV4, Ipv4Addr};
let mut socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
socket.set_port(4242);
assert_eq!(socket.port(), 4242);
Trait Implementationsยง
ยงimpl<'a> AddAnyAttr for SocketAddrV4
impl<'a> AddAnyAttr for SocketAddrV4
ยงtype Output<SomeNewAttr: Attribute> = SocketAddrV4
type Output<SomeNewAttr: Attribute> = SocketAddrV4
ยงfn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <SocketAddrV4 as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
fn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <SocketAddrV4 as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
ยงimpl Archive for SocketAddrV4
impl Archive for SocketAddrV4
ยงtype Resolver = ()
type Resolver = ()
ยงunsafe fn resolve(
&self,
pos: usize,
_: <SocketAddrV4 as Archive>::Resolver,
out: *mut <SocketAddrV4 as Archive>::Archived,
)
unsafe fn resolve( &self, pos: usize, _: <SocketAddrV4 as Archive>::Resolver, out: *mut <SocketAddrV4 as Archive>::Archived, )
ยงimpl AttributeValue for SocketAddrV4
impl AttributeValue for SocketAddrV4
ยงtype AsyncOutput = SocketAddrV4
type AsyncOutput = SocketAddrV4
ยงtype State = (Element, SocketAddrV4)
type State = (Element, SocketAddrV4)
ยงtype Cloneable = SocketAddrV4
type Cloneable = SocketAddrV4
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 = SocketAddrV4
type CloneableOwned = SocketAddrV4
'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,
) -> <SocketAddrV4 as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <SocketAddrV4 as AttributeValue>::State
<template>
.ยงfn build(
self,
el: &Element,
key: &str,
) -> <SocketAddrV4 as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <SocketAddrV4 as AttributeValue>::State
ยงfn rebuild(self, key: &str, state: &mut <SocketAddrV4 as AttributeValue>::State)
fn rebuild(self, key: &str, state: &mut <SocketAddrV4 as AttributeValue>::State)
ยงfn into_cloneable(self) -> <SocketAddrV4 as AttributeValue>::Cloneable
fn into_cloneable(self) -> <SocketAddrV4 as AttributeValue>::Cloneable
ยงfn into_cloneable_owned(
self,
) -> <SocketAddrV4 as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <SocketAddrV4 as AttributeValue>::CloneableOwned
'static
.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <SocketAddrV4 as AttributeValue>::AsyncOutput
async fn resolve(self) -> <SocketAddrV4 as AttributeValue>::AsyncOutput
Sourceยงimpl<'de, __Context> BorrowDecode<'de, __Context> for SocketAddrV4
impl<'de, __Context> BorrowDecode<'de, __Context> for SocketAddrV4
Sourceยงfn borrow_decode<D>(decoder: &mut D) -> Result<SocketAddrV4, DecodeError>where
D: BorrowDecoder<'de, Context = __Context>,
fn borrow_decode<D>(decoder: &mut D) -> Result<SocketAddrV4, DecodeError>where
D: BorrowDecoder<'de, Context = __Context>,
1.0.0 ยท Sourceยงimpl Clone for SocketAddrV4
impl Clone for SocketAddrV4
Sourceยงfn clone(&self) -> SocketAddrV4
fn clone(&self) -> SocketAddrV4
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 SocketAddrV4
impl Debug for SocketAddrV4
Sourceยงimpl<Context> Decode<Context> for SocketAddrV4
impl<Context> Decode<Context> for SocketAddrV4
Sourceยงfn decode<D>(decoder: &mut D) -> Result<SocketAddrV4, DecodeError>where
D: Decoder<Context = Context>,
fn decode<D>(decoder: &mut D) -> Result<SocketAddrV4, DecodeError>where
D: Decoder<Context = Context>,
Sourceยงimpl<'de> Deserialize<'de> for SocketAddrV4
impl<'de> Deserialize<'de> for SocketAddrV4
Sourceยงfn deserialize<D>(
deserializer: D,
) -> Result<SocketAddrV4, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SocketAddrV4, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
1.0.0 ยท Sourceยงimpl Display for SocketAddrV4
impl Display for SocketAddrV4
Sourceยงimpl Encode for SocketAddrV4
impl Encode for SocketAddrV4
ยงimpl From<SocketAddrV4> for SockAddr
impl From<SocketAddrV4> for SockAddr
ยงfn from(addr: SocketAddrV4) -> SockAddr
fn from(addr: SocketAddrV4) -> SockAddr
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
.
ยงimpl From<SocketAddrV4> for SocketAddrAny
impl From<SocketAddrV4> for SocketAddrAny
ยงfn from(from: SocketAddrV4) -> SocketAddrAny
fn from(from: SocketAddrV4) -> SocketAddrAny
1.5.0 ยท Sourceยงimpl FromStr for SocketAddrV4
impl FromStr for SocketAddrV4
Sourceยงtype Err = AddrParseError
type Err = AddrParseError
Sourceยงfn from_str(s: &str) -> Result<SocketAddrV4, AddrParseError>
fn from_str(s: &str) -> Result<SocketAddrV4, AddrParseError>
s
to return a value of this type. Read more1.0.0 ยท Sourceยงimpl Hash for SocketAddrV4
impl Hash for SocketAddrV4
1.0.0 ยท Sourceยงimpl Ord for SocketAddrV4
impl Ord for SocketAddrV4
Sourceยงfn cmp(&self, other: &SocketAddrV4) -> Ordering
fn cmp(&self, other: &SocketAddrV4) -> Ordering
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
ยงimpl PartialEq<ArchivedSocketAddrV4> for SocketAddrV4
impl PartialEq<ArchivedSocketAddrV4> for SocketAddrV4
ยงimpl PartialEq<SocketAddrV4> for ArchivedSocketAddrV4
impl PartialEq<SocketAddrV4> for ArchivedSocketAddrV4
1.0.0 ยท Sourceยงimpl PartialEq for SocketAddrV4
impl PartialEq for SocketAddrV4
ยงimpl PartialOrd<ArchivedSocketAddrV4> for SocketAddrV4
impl PartialOrd<ArchivedSocketAddrV4> for SocketAddrV4
ยงimpl PartialOrd<SocketAddrV4> for ArchivedSocketAddrV4
impl PartialOrd<SocketAddrV4> for ArchivedSocketAddrV4
1.0.0 ยท Sourceยงimpl PartialOrd for SocketAddrV4
impl PartialOrd for SocketAddrV4
ยงimpl PatchField for SocketAddrV4
impl PatchField for SocketAddrV4
ยงfn patch_field(
&mut self,
new: SocketAddrV4,
path: &StorePath,
notify: &mut dyn FnMut(&StorePath),
)
fn patch_field( &mut self, new: SocketAddrV4, path: &StorePath, notify: &mut dyn FnMut(&StorePath), )
ยงimpl Render for SocketAddrV4
impl Render for SocketAddrV4
ยงtype State = SocketAddrV4State
type State = SocketAddrV4State
ยงfn build(self) -> <SocketAddrV4 as Render>::State
fn build(self) -> <SocketAddrV4 as Render>::State
ยงfn rebuild(self, state: &mut <SocketAddrV4 as Render>::State)
fn rebuild(self, state: &mut <SocketAddrV4 as Render>::State)
ยงimpl RenderHtml for SocketAddrV4
impl RenderHtml for SocketAddrV4
ยงconst MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
ยงtype AsyncOutput = SocketAddrV4
type AsyncOutput = SocketAddrV4
ยงtype Owned = SocketAddrV4
type Owned = SocketAddrV4
'static
.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <SocketAddrV4 as RenderHtml>::AsyncOutput
async fn resolve(self) -> <SocketAddrV4 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,
) -> <SocketAddrV4 as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <SocketAddrV4 as Render>::State
ยงfn into_owned(self) -> <SocketAddrV4 as RenderHtml>::Owned
fn into_owned(self) -> <SocketAddrV4 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 SocketAddrV4where
S: Fallible + ?Sized,
impl<S> Serialize<S> for SocketAddrV4where
S: Fallible + ?Sized,
ยงfn serialize(
&self,
_: &mut S,
) -> Result<<SocketAddrV4 as Archive>::Resolver, <S as Fallible>::Error>
fn serialize( &self, _: &mut S, ) -> Result<<SocketAddrV4 as Archive>::Resolver, <S as Fallible>::Error>
Sourceยงimpl Serialize for SocketAddrV4
impl Serialize for SocketAddrV4
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 SocketAddrV4
impl SocketAddrArg for SocketAddrV4
ยง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 SocketAddrV4
impl ToSocketAddrs for SocketAddrV4
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 SocketAddrV4
impl<'a> ToTemplate for SocketAddrV4
ยง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 SocketAddrV4
impl TryFrom<SocketAddrAny> for SocketAddrV4
ยงfn try_from(
value: SocketAddrAny,
) -> Result<SocketAddrV4, <SocketAddrV4 as TryFrom<SocketAddrAny>>::Error>
fn try_from( value: SocketAddrAny, ) -> Result<SocketAddrV4, <SocketAddrV4 as TryFrom<SocketAddrAny>>::Error>
Convert if the address is an IPv4 address.
Returns Err(Errno::AFNOSUPPORT)
if the address family is not IPv4.
impl Copy for SocketAddrV4
impl Eq for SocketAddrV4
impl StructuralPartialEq for SocketAddrV4
impl ToSocketAddrs for SocketAddrV4
Auto Trait Implementationsยง
impl Freeze for SocketAddrV4
impl RefUnwindSafe for SocketAddrV4
impl Send for SocketAddrV4
impl Sync for SocketAddrV4
impl Unpin for SocketAddrV4
impl UnwindSafe for SocketAddrV4
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