pub struct EncodedPostFeedbackV1 {
pub post_id: Id,
pub feedback_type: u8,
pub salt: Salt,
pub pow: Pow,
}Fields§
§post_id: Id§feedback_type: u8§salt: Salt§pow: PowImplementations§
Source§impl EncodedPostFeedbackV1
impl EncodedPostFeedbackV1
pub fn new(post_id: Id, feedback_type: u8, salt: Salt, pow: Pow) -> Self
pub async fn pow_generate( post_id: &Id, feedback_type: u8, pow_generator: &dyn ParallelPowGenerator, ) -> Result<(Salt, Pow, Hash)>
pub fn pow_verify(&self) -> Result<()>
pub async fn encode_to_bytes(&mut self) -> Result<Vec<u8>>
pub fn append_encode_direct_to_bytes<B: BufMut>( bytes: &mut B, post_id: &[u8], feedback_type: u8, salt: &[u8], pow: Pow, ) -> Result<()>
pub fn append_encode_to_bytes<B: BufMut>(&self, bytes: &mut B) -> Result<()>
pub fn decode_from_bytes(bytes: impl Buf) -> Result<Self>
Trait Implementations§
Source§impl Clone for EncodedPostFeedbackV1
impl Clone for EncodedPostFeedbackV1
Source§fn clone(&self) -> EncodedPostFeedbackV1
fn clone(&self) -> EncodedPostFeedbackV1
Returns a duplicate 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 Debug for EncodedPostFeedbackV1
impl Debug for EncodedPostFeedbackV1
Source§impl PartialEq for EncodedPostFeedbackV1
impl PartialEq for EncodedPostFeedbackV1
impl StructuralPartialEq for EncodedPostFeedbackV1
Auto Trait Implementations§
impl Freeze for EncodedPostFeedbackV1
impl RefUnwindSafe for EncodedPostFeedbackV1
impl Send for EncodedPostFeedbackV1
impl Sync for EncodedPostFeedbackV1
impl Unpin for EncodedPostFeedbackV1
impl UnsafeUnpin for EncodedPostFeedbackV1
impl UnwindSafe for EncodedPostFeedbackV1
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,
§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> 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