[][src]Struct libtelnet_rs::compatibility::CompatibilityTable

pub struct CompatibilityTable { /* fields omitted */ }

A table of options that are supported locally or remotely, and their current state.

Implementations

impl CompatibilityTable[src]

pub const ENABLED_LOCAL: u8[src]

Option is locally supported.

pub const ENABLED_REMOTE: u8[src]

Option is remotely supported.

pub const LOCAL_STATE: u8[src]

Option is currently enabled locally.

pub const REMOTE_STATE: u8[src]

Option is currently enabled remotely.

pub fn new() -> Self[src]

pub fn from_options(values: &[(u8, u8)]) -> Self[src]

Create a table with some option values set.

Arguments

values - A slice of (u8, u8) tuples. The first value is the option code, and the second is the bitmask value for that option.

Notes

An option bitmask can be generated using the CompatibilityEntry struct, using entry.into_u8().

pub fn support_local(&mut self, option: u8)[src]

Enable local support for an option.

pub fn support_remote(&mut self, option: u8)[src]

Enable remote support for an option.

pub fn support(&mut self, option: u8)[src]

Enable both remote and local support for an option.

pub fn get_option(&self, option: u8) -> CompatibilityEntry[src]

Retrieve a CompatbilityEntry generated from the current state of the option value.

pub fn set_option(&mut self, option: u8, entry: CompatibilityEntry)[src]

Set an option value by getting the bitmask from a CompatibilityEntry.

pub fn reset_states(&mut self)[src]

Reset all negotiated states

Trait Implementations

impl Clone for CompatibilityTable[src]

impl Default for CompatibilityTable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.