oblivion 2.2.1

A fast, lightweight, and secure end-to-end encryption protocol based on ECDHE
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! # Oblivion Default Handler
use crate::types::ServerResponse;

use super::{render::BaseResponse, session::Session};
use oblivion_codegen::internal_handler;

/// Not Found Handler
///
/// Handling a non-existent route request.
#[internal_handler]
pub fn not_found(session: Session) -> ServerResponse {
    let entrance = session.request.get_ip();

    Ok(BaseResponse::TextResponse(format!(
        "Path {} is not found, error with code 404.",
        entrance
    )))
}