pub struct WebRtcBinding(/* private fields */);Expand description
A digest binding an exact engine description and its DTLS fingerprint.
Implementations§
Source§impl WebRtcBinding
impl WebRtcBinding
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Creates a binding from canonical digest bytes.
Sourcepub fn derive(description: &[u8], dtls_fingerprint: &[u8]) -> Self
pub fn derive(description: &[u8], dtls_fingerprint: &[u8]) -> Self
Hashes exact description bytes together with engine-produced fingerprint bytes.
Examples found in repository?
examples/wire_benchmark.rs (line 68)
66fn main() {
67 let offer = signed_wire(Body::Offer {
68 binding: WebRtcBinding::derive(b"deterministic-offer", b"fingerprint"),
69 description: vec![0xA5; 1024],
70 });
71 let cfr_control = signed_wire(Body::CfrControl {
72 payload: vec![0x5A; 4096],
73 });
74
75 println!("fcp_wire_benchmark\tversion=1\tmode=release_expected");
76 measure("verified_offer", &offer);
77 measure("verified_cfr_control", &cfr_control);
78}Trait Implementations§
Source§impl Clone for WebRtcBinding
impl Clone for WebRtcBinding
impl Copy for WebRtcBinding
Source§impl Debug for WebRtcBinding
impl Debug for WebRtcBinding
impl Eq for WebRtcBinding
Source§impl Hash for WebRtcBinding
impl Hash for WebRtcBinding
Source§impl Ord for WebRtcBinding
impl Ord for WebRtcBinding
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for WebRtcBinding
impl PartialEq for WebRtcBinding
Source§impl PartialOrd for WebRtcBinding
impl PartialOrd for WebRtcBinding
impl StructuralPartialEq for WebRtcBinding
Auto Trait Implementations§
impl Freeze for WebRtcBinding
impl RefUnwindSafe for WebRtcBinding
impl Send for WebRtcBinding
impl Sync for WebRtcBinding
impl Unpin for WebRtcBinding
impl UnsafeUnpin for WebRtcBinding
impl UnwindSafe for WebRtcBinding
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