pub struct SnServiceReceipt {
pub version: SnServiceReceiptVersion,
pub grade: SnServiceGrade,
pub rto: u16,
pub duration: Duration,
pub start_time: SystemTime,
pub ping_count: u32,
pub ping_resp_count: u32,
pub called_count: u32,
pub call_peer_count: u32,
pub connect_peer_count: u32,
pub call_delay: u16,
}Fields
version: SnServiceReceiptVersiongrade: SnServiceGraderto: u16duration: Durationstart_time: SystemTimeping_count: u32ping_resp_count: u32called_count: u32call_peer_count: u32connect_peer_count: u32call_delay: u16Implementations
sourceimpl SnServiceReceipt
impl SnServiceReceipt
pub fn sign(
&self,
sn_peerid: &DeviceId,
_private_key: &PrivateKey
) -> Result<Signature, BuckyError>
pub fn verify(
&self,
sn_peerid: &DeviceId,
_sign: &Signature,
_const_info: &DeviceDesc
) -> bool
Trait Implementations
sourceimpl Clone for SnServiceReceipt
impl Clone for SnServiceReceipt
sourcefn clone(&self) -> SnServiceReceipt
fn clone(&self) -> SnServiceReceipt
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Default for SnServiceReceipt
impl Default for SnServiceReceipt
sourceimpl<'de> RawDecode<'de> for SnServiceReceipt
impl<'de> RawDecode<'de> for SnServiceReceipt
fn raw_decode(buf: &'de [u8]) -> Result<(Self, &'de [u8]), BuckyError>
fn raw_decode_with_option(
buf: &'de [u8],
_opt: &RawDecodeOption
) -> Result<(Self, &'de [u8]), BuckyError>
sourceimpl RawEncode for SnServiceReceipt
impl RawEncode for SnServiceReceipt
fn raw_measure(
&self,
purpose: &Option<RawEncodePurpose>
) -> Result<usize, BuckyError>
fn raw_encode<'a>(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>
) -> Result<&'a mut [u8], BuckyError>
fn raw_tail_encode(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>
) -> Result<&'a [u8], BuckyError>
fn raw_encode_to_buffer(&self) -> Result<Vec<u8, Global>, BuckyError>
fn raw_hash_value(&self) -> Result<HashValue, BuckyError>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> Result<Vec<u8, Global>, BuckyError>
impl Copy for SnServiceReceipt
Auto Trait Implementations
impl RefUnwindSafe for SnServiceReceipt
impl Send for SnServiceReceipt
impl Sync for SnServiceReceipt
impl Unpin for SnServiceReceipt
impl UnwindSafe for SnServiceReceipt
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more