pub struct SocialVerificationOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a SocialVerification message.
Wraps ::buffa::OwnedView<SocialVerificationView<'static>>: the decoded view and the ::buffa::bytes::Bytes buffer it borrows from travel together, so the handle is 'static and Send + Sync — suitable for async handlers, spawned tasks, and anywhere a 'static bound is required.
Field accessors return borrows tied to &self. Use Self::view to get the full SocialVerificationView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl SocialVerificationOwnedView
impl SocialVerificationOwnedView
Sourcepub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
pub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
Decode an owned view from a ::buffa::bytes::Bytes buffer.
The view borrows directly from the buffer’s data; the buffer is retained inside the returned handle.
§Errors
Returns ::buffa::DecodeError if the buffer contains invalid
protobuf data.
Sourcepub fn decode_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self, DecodeError>
Decode with custom ::buffa::DecodeOptions (recursion limit,
max message size).
§Errors
Returns ::buffa::DecodeError if the buffer is invalid or
exceeds the configured limits.
Sourcepub fn from_owned(msg: &SocialVerification) -> Result<Self, DecodeError>
pub fn from_owned(msg: &SocialVerification) -> Result<Self, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &SocialVerificationView<'_>
pub fn view(&self) -> &SocialVerificationView<'_>
Borrow the full SocialVerificationView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Result<SocialVerification, DecodeError>
pub fn to_owned_message(&self) -> Result<SocialVerification, DecodeError>
Convert to the owned message type.
§Errors
Returns an error if re-materializing preserved unknown fields fails (e.g. the unknown-field limit is exceeded).
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn provider(&self) -> EnumValue<SocialProvider>
pub fn provider(&self) -> EnumValue<SocialProvider>
Provider account being verified.
Field 1: provider
Sourcepub fn method(&self) -> EnumValue<SocialVerificationMethod>
pub fn method(&self) -> EnumValue<SocialVerificationMethod>
Method used for this verification. If unspecified at start time, profile verification is used.
Field 11: method
Sourcepub fn handle(&self) -> &str
pub fn handle(&self) -> &str
Provider handle being verified. Handles are returned lowercase and without a leading “@”.
Field 2: handle
Sourcepub fn provider_user_id(&self) -> &str
pub fn provider_user_id(&self) -> &str
Stable provider-side user identifier. Empty until verification succeeds.
Field 3: provider_user_id
Sourcepub fn challenge_code(&self) -> &str
pub fn challenge_code(&self) -> &str
Challenge code the user must place according to the verification method. Codes start with “poly_” and expire after 15 minutes.
Field 13: challenge_code
Sourcepub fn status(&self) -> EnumValue<SocialVerificationStatus>
pub fn status(&self) -> EnumValue<SocialVerificationStatus>
Current verification status.
Field 4: status
Sourcepub fn requested_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn requested_at(&self) -> &MessageFieldView<TimestampView<'_>>
Time in UTC when the current challenge code was issued.
Field 5: requested_at
Sourcepub fn expires_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn expires_at(&self) -> &MessageFieldView<TimestampView<'_>>
Time in UTC when the current challenge code expires.
Field 6: expires_at
Sourcepub fn verified_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn verified_at(&self) -> &MessageFieldView<TimestampView<'_>>
Time in UTC when verification succeeded. Empty until status is STATUS_VERIFIED.
Field 7: verified_at
Sourcepub fn attempts(&self) -> i32
pub fn attempts(&self) -> i32
Number of recorded provider-check attempts for this challenge.
Field 9: attempts
Sourcepub fn last_error(&self) -> &str
pub fn last_error(&self) -> &str
Last verification error, if the most recent check failed. Empty when there is no recorded error.
Field 10: last_error
Sourcepub fn updated_at(&self) -> &MessageFieldView<TimestampView<'_>>
pub fn updated_at(&self) -> &MessageFieldView<TimestampView<'_>>
Time in UTC when this verification state last changed.
Field 15: updated_at
Trait Implementations§
Source§impl AsRef<OwnedView<SocialVerificationView<'static>>> for SocialVerificationOwnedView
impl AsRef<OwnedView<SocialVerificationView<'static>>> for SocialVerificationOwnedView
Source§fn as_ref(&self) -> &OwnedView<SocialVerificationView<'static>>
fn as_ref(&self) -> &OwnedView<SocialVerificationView<'static>>
Source§impl Clone for SocialVerificationOwnedView
impl Clone for SocialVerificationOwnedView
Source§fn clone(&self) -> SocialVerificationOwnedView
fn clone(&self) -> SocialVerificationOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more