pub enum PoolMessageCS<N: Network> {
Connect(u8, u8, u8, u8, u8, String, String),
Submit(u32, u64, Data<ProverSolution<N>>),
DisConnect(u32),
Ping,
Unused,
}Variants§
Connect(u8, u8, u8, u8, u8, String, String)
Connect := (type, address_type, version(major, minor, patch), name, address)
Submit(u32, u64, Data<ProverSolution<N>>)
submit := (work_id, job_id, address, prover_solution)
DisConnect(u32)
DisConnect := (id)
Ping
Ping
Unused
Implementations§
Source§impl<N: Network> PoolMessageCS<N>
impl<N: Network> PoolMessageCS<N>
Sourcepub fn serialize_data_into<W: Write>(&self, writer: &mut W) -> Result<()>
pub fn serialize_data_into<W: Write>(&self, writer: &mut W) -> Result<()>
Returns the message data as bytes.
Sourcepub fn serialize_into<W: Write>(&self, writer: &mut W) -> Result<()>
pub fn serialize_into<W: Write>(&self, writer: &mut W) -> Result<()>
Serializes the given message into bytes.
Sourcepub fn deserialize(buffer: &[u8]) -> Result<Self>
pub fn deserialize(buffer: &[u8]) -> Result<Self>
Deserializes the given buffer into a message.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for PoolMessageCS<N>
impl<N: Clone + Network> Clone for PoolMessageCS<N>
Source§fn clone(&self) -> PoolMessageCS<N>
fn clone(&self) -> PoolMessageCS<N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N: Network> Decoder for PoolMessageCS<N>
impl<N: Network> Decoder for PoolMessageCS<N>
Source§type Item = PoolMessageCS<N>
type Item = PoolMessageCS<N>
The type of decoded frames.
Source§fn decode(
&mut self,
source: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, source: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl<N: Network> Default for PoolMessageCS<N>
impl<N: Network> Default for PoolMessageCS<N>
Auto Trait Implementations§
impl<N> !Freeze for PoolMessageCS<N>
impl<N> RefUnwindSafe for PoolMessageCS<N>where
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
impl<N> Send for PoolMessageCS<N>
impl<N> Sync for PoolMessageCS<N>
impl<N> Unpin for PoolMessageCS<N>where
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin,
<N as Environment>::Field: Unpin,
<N as Environment>::Projective: Unpin,
impl<N> UnsafeUnpin for PoolMessageCS<N>where
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnsafeUnpin,
<N as Environment>::Field: UnsafeUnpin,
<N as Environment>::Projective: UnsafeUnpin,
impl<N> UnwindSafe for PoolMessageCS<N>where
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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