Skip to main content

Entry

Struct Entry 

Source
pub struct Entry {
Show 32 fields pub name: String, pub host: String, pub port: u16, pub protocol: Protocol, pub encoding: Encoding, pub username: String, pub password: String, pub auto_login: bool, pub term_type: String, pub cols: u16, pub rows: u16, pub font: u8, pub font_file: String, pub ice: Option<bool>, pub baud: u32, pub crt: Option<CrtMode>, pub bell: Option<BellMode>, pub capture: bool, pub capture_file: String, pub key_file: String, pub download_dir: String, pub upload_dir: String, pub hide_status: bool, pub group: String, pub script: String, pub macros: Vec<String>, pub comment: String, pub keychain: bool, pub pinned: bool, pub added: Option<u64>, pub last_connected: Option<u64>, pub calls: u32,
}

Fields§

§name: String§host: String§port: u16§protocol: Protocol§encoding: Encoding§username: String§password: String

Stored in plain text, as in other BBS dialers.

§auto_login: bool

Answer the BBS’s login prompts with username and password.

§term_type: String§cols: u16

Screen size: one of SCREEN_MODES.

§rows: u16§font: u8

The font, as a CTerm font ID: 0 for CP437, or an Amiga font for Amiga BBSes.

§font_file: String

A font file (see crate::fontfile) in place of font: a name in the fonts folder, or a path.

§ice: Option<bool>

iCE colors (the blink bit as a bright background) from the start: None leaves it to the BBS (CSI ?33h), as before.

§baud: u32

Baud rate emulation: show what the BBS sends at this speed, as over a modem (0: as fast as it arrives).

§crt: Option<CrtMode>

Phosphor mode for this system; None follows the global setting.

§bell: Option<BellMode>

What the bell (Ctrl-G) does on this system; None follows the global setting.

§capture: bool

Start capturing the session to a file as soon as it connects.

§capture_file: String

The capture file’s name, with {name}, {date} and {time} filled in; relative names are in the captures folder, and a .txt name keeps only the text (see crate::session::CaptureKind). Empty for the usual name-date-time.ans.

§key_file: String

SSH private key to try first; otherwise the SSH agent and the usual ~/.ssh/id_* files are tried.

§download_dir: String

Where this BBS’s downloads go, and where uploads to it start looking; empty for the folders in the settings.

§upload_dir: String§hide_status: bool

No status bar under this BBS’s screen.

§group: String

The group it is listed in (the directory can show one at a time).

§script: String

A script (see crate::script) run once the call is connected.

§macros: Vec<String>

Its own keyboard macros; an empty one leaves the settings’ one.

§comment: String§keychain: bool

The password is kept in the OS keychain rather than in password.

§pinned: bool

Pinned entries sort ahead of the rest.

§added: Option<u64>

Unix timestamps.

§last_connected: Option<u64>§calls: u32

Implementations§

Source§

impl Entry

Source

pub fn screen_mode(&self) -> (u16, u16)

The screen size, (columns, rows): the entry’s, if it is one BadTerm has, or 80x25.

Source

pub fn from_address(addr: &str) -> Option<Entry>

Parse telnet://host:port, ssh://user@host, host:port or host into an entry.

Source

pub fn address(&self) -> String

Source

pub fn system_id(&self) -> String

Identifies the system (protocol, host and port), e.g. for remembering which default entries were already offered.

Trait Implementations§

Source§

impl Clone for Entry

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Entry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Entry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Entry
where Entry: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Entry

Source§

impl PartialEq for Entry

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Entry

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnsafeUnpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, Ctx> BundleDefault<Ctx> for T
where T: Default,

Source§

fn default_with_context(_: Ctx) -> T

Creates a default value with the given context.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more