feat: a bunch of things
This commit is contained in:
parent
2cd0311a20
commit
2e2b01990e
20 changed files with 16216 additions and 137 deletions
16
src/dsresponse.rs
Normal file
16
src/dsresponse.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use std::marker::PhantomData;
|
||||
use rocket::{Request, Response};
|
||||
use rocket::http::{Header, Status};
|
||||
use rocket::response::Responder;
|
||||
use crate::error::Errors;
|
||||
use crate::xml::Xml;
|
||||
|
||||
pub struct Ds<T>(pub T);
|
||||
|
||||
impl<'r, 'o: 'r, T: Responder<'r, 'o>> Responder<'r, 'o> for Ds<T> {
|
||||
fn respond_to(self, request: &'r Request<'_>) -> rocket::response::Result<'o> {
|
||||
Response::build_from(self.0.respond_to(request)?)
|
||||
.header(Header::new("Server", "Nintendo 3DS (http)"))
|
||||
.ok()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue