pub struct MetadataOption {
pub key: u16,
pub value: String,
}
Expand description
Represents a metadata option.
Fields§
§key: u16
§value: String
Implementations§
Source§impl MetadataOption
impl MetadataOption
Sourcepub fn wrap(self) -> SocksOption
pub fn wrap(self) -> SocksOption
Wraps the instance into a SocksOption
.
Sourcepub fn from_socks_bytes(bytes: Vec<u8>) -> Result<SocksOption>
pub fn from_socks_bytes(bytes: Vec<u8>) -> Result<SocksOption>
Deserializes the option from bytes.
Sourcepub fn into_socks_bytes(self) -> Vec<u8>
pub fn into_socks_bytes(self) -> Vec<u8>
Serializes the option into bytes.
Trait Implementations§
Source§impl Clone for MetadataOption
impl Clone for MetadataOption
Source§fn clone(&self) -> MetadataOption
fn clone(&self) -> MetadataOption
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for MetadataOption
impl RefUnwindSafe for MetadataOption
impl Send for MetadataOption
impl Sync for MetadataOption
impl Unpin for MetadataOption
impl UnwindSafe for MetadataOption
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