Skip to main content
Glama
response.rs751 B
use crate::body::Body; pub mod inner; mod into_response; mod into_response_parts; pub use self::{ into_response::IntoResponse, into_response_parts::{ IntoResponseParts, ResponseParts, }, }; pub type Response<T = Body> = inner::Response<T>; pub type Result<T, E = ErrorResponse> = std::result::Result<T, E>; impl<T> IntoResponse for Result<T> where T: IntoResponse, { fn into_response(self) -> Response { match self { Ok(ok) => ok.into_response(), Err(err) => err.0, } } } #[derive(Debug)] pub struct ErrorResponse(Response); impl<T> From<T> for ErrorResponse where T: IntoResponse, { fn from(value: T) -> Self { Self(value.into_response()) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server