Enum gopher_core::types::GopherResponse
[−]
[src]
pub enum GopherResponse { Menu(Vec<DirEntity>), TextFile(EasyBuf), BinaryFile(EasyBuf), }
A server-to-client message.
Variants
Menu(Vec<DirEntity>)
A list of resources.
TextFile(EasyBuf)
A text document.
BinaryFile(EasyBuf)
A binary file download.
Methods
impl GopherResponse
[src]
fn error(text: GopherStr) -> Self
Construct a menu with a single error line.
fn encode<W>(&self, buf: &mut W) -> Result<()> where W: Write
Encode the response into bytes for sending over the wire.
Trait Implementations
impl Clone for GopherResponse
[src]
fn clone(&self) -> GopherResponse
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more