pub enum StreamPurpose {
DirFetch,
DirUpload,
DnsRequest,
DirportTest,
User,
}Expand description
Purpose of a stream.
Describes what the stream is being used for. Only provided with new streams.
§Example
use stem_rs::StreamPurpose;
let purpose = StreamPurpose::User;
println!("Stream purpose: {}", purpose); // Prints "USER"Variants§
DirFetch
Fetching directory information (descriptors, consensus, etc).
DirUpload
Uploading our descriptor to an authority.
DnsRequest
User initiated DNS request.
DirportTest
Checking that our directory port is reachable externally.
User
Either relaying user traffic or not one of the above categories.
Trait Implementations§
Source§impl Clone for StreamPurpose
impl Clone for StreamPurpose
Source§fn clone(&self) -> StreamPurpose
fn clone(&self) -> StreamPurpose
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamPurpose
impl Debug for StreamPurpose
Source§impl Display for StreamPurpose
impl Display for StreamPurpose
Source§impl Hash for StreamPurpose
impl Hash for StreamPurpose
Source§impl PartialEq for StreamPurpose
impl PartialEq for StreamPurpose
impl Copy for StreamPurpose
impl Eq for StreamPurpose
impl StructuralPartialEq for StreamPurpose
Auto Trait Implementations§
impl Freeze for StreamPurpose
impl RefUnwindSafe for StreamPurpose
impl Send for StreamPurpose
impl Sync for StreamPurpose
impl Unpin for StreamPurpose
impl UnwindSafe for StreamPurpose
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