pub enum MetaAddrChange {
NewInitial {
addr: PeerSocketAddr,
},
NewGossiped {
addr: PeerSocketAddr,
untrusted_services: PeerServices,
untrusted_last_seen: DateTime32,
},
NewLocal {
addr: PeerSocketAddr,
},
UpdateAttempt {
addr: PeerSocketAddr,
},
UpdateConnected {
addr: PeerSocketAddr,
services: PeerServices,
is_inbound: bool,
},
UpdatePingSent {
addr: PeerSocketAddr,
ping_sent_at: Instant,
},
UpdateResponded {
addr: PeerSocketAddr,
rtt: Option<Duration>,
},
UpdateFailed {
addr: PeerSocketAddr,
services: Option<PeerServices>,
},
UpdateMisbehavior {
addr: PeerSocketAddr,
score_increment: u32,
},
}Expand description
A change to an existing MetaAddr.
Variants§
NewInitial
Creates a MetaAddr for an initial peer.
Fields
addr: PeerSocketAddrNewGossiped
Creates a new gossiped MetaAddr.
NewLocal
Creates new local listener MetaAddr.
Fields
addr: PeerSocketAddrUpdateAttempt
Updates an existing MetaAddr when an outbound connection attempt
starts.
Fields
addr: PeerSocketAddrUpdateConnected
Updates an existing MetaAddr when we’ve made a successful connection with a peer.
UpdatePingSent
Updates an existing MetaAddr when we send a ping to a peer.
UpdateResponded
Updates an existing MetaAddr when a peer responds with a message.
UpdateFailed
Updates an existing MetaAddr when a peer fails.
UpdateMisbehavior
Updates an existing MetaAddr when a peer misbehaves such as by advertising
semantically invalid blocks or transactions.
Implementations§
Source§impl MetaAddrChange
impl MetaAddrChange
Sourcepub fn addr_strategy(addr: PeerSocketAddr) -> BoxedStrategy<Self>
pub fn addr_strategy(addr: PeerSocketAddr) -> BoxedStrategy<Self>
Returns a strategy which generates changes for addr.
addr is typically generated by the canonical_peer_addr strategy.
Sourcepub fn addr_changes_strategy(
max_addr_change: usize,
) -> BoxedStrategy<(MetaAddr, Vec<MetaAddrChange>)>
pub fn addr_changes_strategy( max_addr_change: usize, ) -> BoxedStrategy<(MetaAddr, Vec<MetaAddrChange>)>
Returns a strategy which generates a MetaAddr, and a vector of up to
max_addr_change changes.
The address and the changes all have matching PeerSocketAddrs.
Sourcepub fn ready_outbound_strategy_ip() -> BoxedStrategy<IpAddr>
pub fn ready_outbound_strategy_ip() -> BoxedStrategy<IpAddr>
Create a strategy that generates IpAddrs for MetaAddrChanges which are ready for
outbound connections.
Sourcepub fn ready_outbound_strategy_port() -> BoxedStrategy<u16>
pub fn ready_outbound_strategy_port() -> BoxedStrategy<u16>
Create a strategy that generates port numbers for MetaAddrs which are ready for
outbound connections.
Currently, all generated MetaAddrs are the NeverAttemptedGossiped variant.
TODO: Generate all MetaAddr variants, and give them ready fields.
Source§impl MetaAddrChange
impl MetaAddrChange
Sourcepub fn addr(&self) -> PeerSocketAddr
pub fn addr(&self) -> PeerSocketAddr
Return the address for this change.
Sourcepub fn set_addr(&mut self, new_addr: PeerSocketAddr)
pub fn set_addr(&mut self, new_addr: PeerSocketAddr)
Set the address for this change to new_addr.
This method should only be used in tests.
Sourcepub fn untrusted_services(&self) -> Option<PeerServices>
pub fn untrusted_services(&self) -> Option<PeerServices>
Return the untrusted services for this change, if available.
Sourcepub fn untrusted_last_seen(&self, now: DateTime32) -> Option<DateTime32>
pub fn untrusted_last_seen(&self, now: DateTime32) -> Option<DateTime32>
Return the untrusted last seen time for this change, if available.
Sourcepub fn last_attempt(&self, now: Instant) -> Option<Instant>
pub fn last_attempt(&self, now: Instant) -> Option<Instant>
Return the last attempt for this change, if available.
Sourcepub fn last_response(&self, now: DateTime32) -> Option<DateTime32>
pub fn last_response(&self, now: DateTime32) -> Option<DateTime32>
Return the last response for this change, if available.
Sourcepub fn ping_sent(&self) -> Option<Instant>
pub fn ping_sent(&self) -> Option<Instant>
Return the timestamp when a ping was last sent, if available.
Sourcepub fn ping_sent_at(&self) -> Option<Instant>
pub fn ping_sent_at(&self) -> Option<Instant>
Returns the timestamp when a ping was last sent, if available.
Sourcepub fn last_failure(&self, now: Instant) -> Option<Instant>
pub fn last_failure(&self, now: Instant) -> Option<Instant>
Return the last failure for this change, if available.
Sourcepub fn peer_addr_state(&self) -> PeerAddrState
pub fn peer_addr_state(&self) -> PeerAddrState
Return the peer connection state for this change.
Sourcepub fn into_new_meta_addr(
self,
instant_now: Instant,
local_now: DateTime32,
) -> MetaAddr
pub fn into_new_meta_addr( self, instant_now: Instant, local_now: DateTime32, ) -> MetaAddr
Returns the corresponding MetaAddr for this change.
Sourcepub fn misbehavior_score(&self) -> u32
pub fn misbehavior_score(&self) -> u32
Returns the misbehavior score increment for the current change.
Sourcepub fn is_inbound(&self) -> bool
pub fn is_inbound(&self) -> bool
Returns whether this change was created for a new inbound connection.
Sourcepub fn local_listener_into_new_meta_addr(
self,
local_now: DateTime32,
) -> MetaAddr
pub fn local_listener_into_new_meta_addr( self, local_now: DateTime32, ) -> MetaAddr
Returns the corresponding MetaAddr for a local listener change.
This method exists so we don’t have to provide an unused Instant to get a local
listener MetaAddr.
§Panics
If this change is not a MetaAddrChange::NewLocal.
Sourcepub fn apply_to_meta_addr(
&self,
previous: impl Into<Option<MetaAddr>>,
instant_now: Instant,
chrono_now: DateTime<Utc>,
) -> Option<MetaAddr>
pub fn apply_to_meta_addr( &self, previous: impl Into<Option<MetaAddr>>, instant_now: Instant, chrono_now: DateTime<Utc>, ) -> Option<MetaAddr>
Apply this change to a previous MetaAddr from the address book,
producing a new or updated MetaAddr.
If the change isn’t valid for the previous address, returns None.
Trait Implementations§
Source§impl Arbitrary for MetaAddrChange
impl Arbitrary for MetaAddrChange
Source§type Parameters = ((<PeerServices as Arbitrary>::Parameters, <DateTime32 as Arbitrary>::Parameters), (<PeerServices as Arbitrary>::Parameters, <bool as Arbitrary>::Parameters), <Instant as Arbitrary>::Parameters, <Option<Duration> as Arbitrary>::Parameters, <Option<PeerServices> as Arbitrary>::Parameters)
type Parameters = ((<PeerServices as Arbitrary>::Parameters, <DateTime32 as Arbitrary>::Parameters), (<PeerServices as Arbitrary>::Parameters, <bool as Arbitrary>::Parameters), <Instant as Arbitrary>::Parameters, <Option<Duration> as Arbitrary>::Parameters, <Option<PeerServices> as Arbitrary>::Parameters)
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = TupleUnion<((u32, Arc<Map<BoxedStrategy<PeerSocketAddr>, fn(PeerSocketAddr) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <PeerServices as Arbitrary>::Strategy, <DateTime32 as Arbitrary>::Strategy), fn((PeerSocketAddr, PeerServices, DateTime32)) -> MetaAddrChange>>), (u32, Arc<Map<BoxedStrategy<PeerSocketAddr>, fn(PeerSocketAddr) -> MetaAddrChange>>), (u32, Arc<Map<BoxedStrategy<PeerSocketAddr>, fn(PeerSocketAddr) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <PeerServices as Arbitrary>::Strategy, <bool as Arbitrary>::Strategy), fn((PeerSocketAddr, PeerServices, bool)) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <Instant as Arbitrary>::Strategy), fn((PeerSocketAddr, Instant)) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <Option<Duration> as Arbitrary>::Strategy), fn((PeerSocketAddr, Option<Duration>)) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <Option<PeerServices> as Arbitrary>::Strategy), fn((PeerSocketAddr, Option<PeerServices>)) -> MetaAddrChange>>))>
type Strategy = TupleUnion<((u32, Arc<Map<BoxedStrategy<PeerSocketAddr>, fn(PeerSocketAddr) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <PeerServices as Arbitrary>::Strategy, <DateTime32 as Arbitrary>::Strategy), fn((PeerSocketAddr, PeerServices, DateTime32)) -> MetaAddrChange>>), (u32, Arc<Map<BoxedStrategy<PeerSocketAddr>, fn(PeerSocketAddr) -> MetaAddrChange>>), (u32, Arc<Map<BoxedStrategy<PeerSocketAddr>, fn(PeerSocketAddr) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <PeerServices as Arbitrary>::Strategy, <bool as Arbitrary>::Strategy), fn((PeerSocketAddr, PeerServices, bool)) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <Instant as Arbitrary>::Strategy), fn((PeerSocketAddr, Instant)) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <Option<Duration> as Arbitrary>::Strategy), fn((PeerSocketAddr, Option<Duration>)) -> MetaAddrChange>>), (u32, Arc<Map<(BoxedStrategy<PeerSocketAddr>, <Option<PeerServices> as Arbitrary>::Strategy), fn((PeerSocketAddr, Option<PeerServices>)) -> MetaAddrChange>>))>
Strategy used to generate values of type Self.Source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
Source§impl Clone for MetaAddrChange
impl Clone for MetaAddrChange
Source§fn clone(&self) -> MetaAddrChange
fn clone(&self) -> MetaAddrChange
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetaAddrChange
impl Debug for MetaAddrChange
Source§impl Extend<MetaAddrChange> for AddressBook
impl Extend<MetaAddrChange> for AddressBook
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = MetaAddrChange>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = MetaAddrChange>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl PartialEq for MetaAddrChange
impl PartialEq for MetaAddrChange
impl Copy for MetaAddrChange
impl Eq for MetaAddrChange
impl StructuralPartialEq for MetaAddrChange
Auto Trait Implementations§
impl Freeze for MetaAddrChange
impl RefUnwindSafe for MetaAddrChange
impl Send for MetaAddrChange
impl Sync for MetaAddrChange
impl Unpin for MetaAddrChange
impl UnsafeUnpin for MetaAddrChange
impl UnwindSafe for MetaAddrChange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<Response, Error> ResponseResult<Response, Error> for Response
impl<Response, Error> ResponseResult<Response, Error> for Response
Source§fn into_result(self) -> Result<Response, Error>
fn into_result(self) -> Result<Response, Error>
Result that can be sent as a response.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
NewInitial: 35 bytesNewGossiped: 47 bytesNewLocal: 35 bytesUpdateAttempt: 35 bytesUpdateConnected: 47 bytesUpdatePingSent: 55 bytesUpdateResponded: 55 bytesUpdateFailed: 55 bytesUpdateMisbehavior: 39 bytes