pub struct KnownPeer {
pub last_success: u64,
pub failures: u32,
pub banned_until: u64,
}Expand description
住所録の1件。DB にしまう
Fields§
§last_success: u64最後につながった時刻(UNIX 秒)。つながったことがなければ 0
failures: u32続けて失敗した回数
banned_until: u64この時刻(UNIX 秒)まで、つながない。ban していなければ 0
Implementations§
Trait Implementations§
impl Copy for KnownPeer
impl Eq for KnownPeer
impl StructuralPartialEq for KnownPeer
Auto Trait Implementations§
impl Freeze for KnownPeer
impl RefUnwindSafe for KnownPeer
impl Send for KnownPeer
impl Sync for KnownPeer
impl Unpin for KnownPeer
impl UnsafeUnpin for KnownPeer
impl UnwindSafe for KnownPeer
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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