pub struct EncodedPostFeedbackViewV1<'a>(/* private fields */);Expand description
A zero-copy view into one serialised EncodedPostFeedbackV1 entry.
Construction validates the slice length and version byte; all accessors
are then infallible and return references into the original buffer.
Implementations§
Source§impl<'a> EncodedPostFeedbackViewV1<'a>
impl<'a> EncodedPostFeedbackViewV1<'a>
pub fn from_slice(bytes: &'a [u8]) -> Result<Self>
pub fn post_id_bytes(&self) -> &'a [u8] ⓘ
pub fn feedback_type(&self) -> u8
pub fn salt_bytes(&self) -> &'a [u8] ⓘ
pub fn pow(&self) -> Pow
Auto Trait Implementations§
impl<'a> Freeze for EncodedPostFeedbackViewV1<'a>
impl<'a> RefUnwindSafe for EncodedPostFeedbackViewV1<'a>
impl<'a> Send for EncodedPostFeedbackViewV1<'a>
impl<'a> Sync for EncodedPostFeedbackViewV1<'a>
impl<'a> Unpin for EncodedPostFeedbackViewV1<'a>
impl<'a> UnsafeUnpin for EncodedPostFeedbackViewV1<'a>
impl<'a> UnwindSafe for EncodedPostFeedbackViewV1<'a>
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<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