[−][src]Struct tox_packet::relay::connection_id::ConnectionId
Connection ID is either a number between [16, 255] or 0. Zero can be included in a response and means that the previous request was invalid. If a connection id is a number between [16, 255] it can be uniquely mapped to a connection index between [0, 239].
Implementations
impl ConnectionId
[src]
pub fn zero() -> Self
[src]
Zero connection id meaning invalid request.
pub fn from_index(index: u8) -> Self
[src]
Get connection id corresponding to the index.
pub fn index(self) -> Option<u8>
[src]
Get index corresponding to the connection id. None if the connection id is zero.
Trait Implementations
impl Clone for ConnectionId
[src]
pub fn clone(&self) -> ConnectionId
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ConnectionId
[src]
impl Debug for ConnectionId
[src]
impl Eq for ConnectionId
[src]
impl FromBytes for ConnectionId
[src]
impl PartialEq<ConnectionId> for ConnectionId
[src]
pub fn eq(&self, other: &ConnectionId) -> bool
[src]
pub fn ne(&self, other: &ConnectionId) -> bool
[src]
impl StructuralEq for ConnectionId
[src]
impl StructuralPartialEq for ConnectionId
[src]
impl ToBytes for ConnectionId
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectionId
[src]
impl Send for ConnectionId
[src]
impl Sync for ConnectionId
[src]
impl Unpin for ConnectionId
[src]
impl UnwindSafe for ConnectionId
[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>,