From 617bd25c0ed50be314e7d956690198ed0c489b47 Mon Sep 17 00:00:00 2001 From: chris west Date: Wed, 15 Jan 2020 00:20:26 -0800 Subject: [PATCH] Type::is_text() --- src/gopher/type.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gopher/type.rs b/src/gopher/type.rs index 0cbc20f..a9badbc 100644 --- a/src/gopher/type.rs +++ b/src/gopher/type.rs @@ -31,6 +31,11 @@ impl Type { self == Type::Info } + /// Text document? + pub fn is_text(self) -> bool { + self == Type::Text + } + /// HTML link? pub fn is_html(self) -> bool { self == Type::HTML