[−][src]Struct maj::Response
A Gemini response as specified in the spec.
Fields
status: StatusCode
meta: String
body: Vec<u8>
Implementations
impl Response
[src]
pub fn with_body(meta: String, body: Vec<u8>) -> Response
[src]
pub fn gemini(body: Vec<u8>) -> Response
[src]
pub fn render(body: Vec<Node>) -> Response
[src]
pub fn perm_redirect(to: String) -> Response
[src]
pub fn no_proxy() -> Response
[src]
pub fn not_found() -> Response
[src]
pub fn input<T: Into<String>>(msg: T) -> Response
[src]
pub fn need_cert<T: Into<String>>(msg: T) -> Response
[src]
impl Response
[src]
pub fn parse(inp: &mut impl Read) -> Result<Response, Error>
[src]
pub fn write(self, out: &mut impl Write) -> Result<()>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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>,