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