pub struct Synchronize {
pub fork: u64,
pub length: u64,
pub remote_length: u64,
pub downloading: bool,
pub uploading: bool,
pub can_upgrade: bool,
}
Expand description
Synchronize message. Type 0.
Fields§
§fork: u64
Fork id, set to 0 for an un-forked hypercore.
length: u64
Length of hypercore
remote_length: u64
Known length of the remote party, 0 for unknown.
downloading: bool
Downloading allowed
uploading: bool
Uploading allowed
can_upgrade: bool
Upgrade possible
Trait Implementations§
Source§impl Clone for Synchronize
impl Clone for Synchronize
Source§fn clone(&self) -> Synchronize
fn clone(&self) -> Synchronize
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CompactEncoding<Synchronize> for State
impl CompactEncoding<Synchronize> for State
Source§fn preencode(&mut self, value: &Synchronize) -> Result<usize, EncodingError>
fn preencode(&mut self, value: &Synchronize) -> Result<usize, EncodingError>
Preencode
Source§fn encode(
&mut self,
value: &Synchronize,
buffer: &mut [u8],
) -> Result<usize, EncodingError>
fn encode( &mut self, value: &Synchronize, buffer: &mut [u8], ) -> Result<usize, EncodingError>
Encode
Source§fn decode(&mut self, buffer: &[u8]) -> Result<Synchronize, EncodingError>
fn decode(&mut self, buffer: &[u8]) -> Result<Synchronize, EncodingError>
Decode
Source§impl Debug for Synchronize
impl Debug for Synchronize
Source§impl PartialEq for Synchronize
impl PartialEq for Synchronize
impl StructuralPartialEq for Synchronize
Auto Trait Implementations§
impl Freeze for Synchronize
impl RefUnwindSafe for Synchronize
impl Send for Synchronize
impl Sync for Synchronize
impl Unpin for Synchronize
impl UnwindSafe for Synchronize
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