[−][src]Struct libtelnet_rs::compatibility::CompatibilityTable
A table of options that are supported locally or remotely, and their current state.
Methods
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
.
Trait Implementations
impl Default for CompatibilityTable
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompatibilityTable
impl Send for CompatibilityTable
impl Sync for CompatibilityTable
impl Unpin for CompatibilityTable
impl UnwindSafe for CompatibilityTable
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,
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, 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.
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>,