[−][src]Struct phetch::menu::Line
The Line represents a single line in a Gopher menu.
It must exist 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.
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()
Methods
impl Line
[src]
pub fn text<'a>(&self, raw: &'a str) -> &'a str
[src]
Returns the text field of this line, given a raw Gopher response. The same Line must always be used with the same Gopher response.
pub fn text_len(&self) -> usize
[src]
Get the length of this line's text field.
pub fn url(&self, raw: &str) -> String
[src]
Get the URL for this line, if it's a link.
Auto Trait Implementations
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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>,