pub struct Response {
pub status: StatusCode,
pub meta: String,
pub body: Vec<u8>,
}Expand description
A Gemini response as specified in the spec.
Fields§
§status: StatusCode§meta: String§body: Vec<u8>Implementations§
Source§impl Response
impl Response
pub fn with_body(meta: String, body: Vec<u8>) -> Response
pub fn gemini(body: Vec<u8>) -> Response
pub fn render(body: Vec<Node>) -> Response
pub fn perm_redirect(to: String) -> Response
pub fn no_proxy() -> Response
pub fn not_found() -> Response
pub fn input<T: Into<String>>(msg: T) -> Response
pub fn need_cert<T: Into<String>>(msg: T) -> Response
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more