Struct stun_codec::TransactionId [−][src]
pub struct TransactionId(_);
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.
Methods
impl TransactionId[src]
impl TransactionIdpub fn new(id: [u8; 12]) -> Self[src]
pub fn new(id: [u8; 12]) -> SelfMakes a new TransactionId instance.
pub fn as_bytes(&self) -> &[u8; 12][src]
pub fn as_bytes(&self) -> &[u8; 12]Returns a reference to the bytes that represents the identifier.
Trait Implementations
impl Clone for TransactionId[src]
impl Clone for TransactionIdfn clone(&self) -> TransactionId[src]
fn clone(&self) -> TransactionIdReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Copy for TransactionId[src]
impl Copy for TransactionIdimpl PartialEq for TransactionId[src]
impl PartialEq for TransactionIdfn eq(&self, other: &TransactionId) -> bool[src]
fn eq(&self, other: &TransactionId) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &TransactionId) -> bool[src]
fn ne(&self, other: &TransactionId) -> boolThis method tests for !=.
impl Eq for TransactionId[src]
impl Eq for TransactionIdimpl Hash for TransactionId[src]
impl Hash for TransactionIdfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl PartialOrd for TransactionId[src]
impl PartialOrd for TransactionIdfn partial_cmp(&self, other: &TransactionId) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &TransactionId) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &TransactionId) -> bool[src]
fn lt(&self, other: &TransactionId) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &TransactionId) -> bool[src]
fn le(&self, other: &TransactionId) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &TransactionId) -> bool[src]
fn gt(&self, other: &TransactionId) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &TransactionId) -> bool[src]
fn ge(&self, other: &TransactionId) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for TransactionId[src]
impl Ord for TransactionIdfn cmp(&self, other: &TransactionId) -> Ordering[src]
fn cmp(&self, other: &TransactionId) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Debug for TransactionId[src]
impl Debug for TransactionIdfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl AsRef<[u8]> for TransactionId[src]
impl AsRef<[u8]> for TransactionIdAuto Trait Implementations
impl Send for TransactionId
impl Send for TransactionIdimpl Sync for TransactionId
impl Sync for TransactionId