Struct stun_codec::TransactionId [−][src]
Transaction ID.
STUN is a client-server protocol. It supports two types of transactions. One is a request/response transaction in which a client sends a request to a server, and the server returns a response. The second is an indication transaction in which either agent -- client or server -- sends an indication that generates no response. Both types of transactions include a transaction ID, which is a randomly selected 96-bit number. For request/response transactions, this transaction ID allows the client to associate the response with the request that generated it; for indications, the transaction ID serves as a debugging aid.
Implementations
impl TransactionId
[src]
pub fn new(id: [u8; 12]) -> Self
[src]
Makes a new TransactionId
instance.
pub fn as_bytes(&self) -> &[u8; 12]
[src]
Returns a reference to the bytes that represents the identifier.
Trait Implementations
impl AsRef<[u8]> for TransactionId
[src]
impl Clone for TransactionId
[src]
fn clone(&self) -> TransactionId
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TransactionId
[src]
impl Debug for TransactionId
[src]
impl Eq for TransactionId
[src]
impl Hash for TransactionId
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for TransactionId
[src]
fn cmp(&self, other: &TransactionId) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<TransactionId> for TransactionId
[src]
fn eq(&self, other: &TransactionId) -> bool
[src]
fn ne(&self, other: &TransactionId) -> bool
[src]
impl PartialOrd<TransactionId> for TransactionId
[src]
fn partial_cmp(&self, other: &TransactionId) -> Option<Ordering>
[src]
fn lt(&self, other: &TransactionId) -> bool
[src]
fn le(&self, other: &TransactionId) -> bool
[src]
fn gt(&self, other: &TransactionId) -> bool
[src]
fn ge(&self, other: &TransactionId) -> bool
[src]
impl StructuralEq for TransactionId
[src]
impl StructuralPartialEq for TransactionId
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransactionId
[src]
impl Send for TransactionId
[src]
impl Sync for TransactionId
[src]
impl Unpin for TransactionId
[src]
impl UnwindSafe for TransactionId
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,