Struct phetch::menu::LineSpan

source ·
pub struct LineSpan {
    pub typ: Type,
    pub link: usize,
    /* private fields */
}
Expand description

The LineSpan represents a single line’s location in a Gopher menu. It only exists in the context of a Menu struct - its link field is its index in the Menu’s links Vec, and start/end/text_end point to locations in Menu’s raw Gopher response. You won’t really interact with this directly, instead call menu.lines() get an iter over Line or menu.line(idx) to get a single Line.

Fields§

§typ: Type

Gopher Item Type.

§link: usize

Index of this link in the Menu::links vector, if it’s a gopher::Type.is_link()

Implementations§

Get the length of this line’s text field.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.