mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-05-09 08:00:41 +00:00
Reexports
This commit is contained in:
parent
441a42c75e
commit
af28e0d916
16 changed files with 50 additions and 34 deletions
|
@ -130,7 +130,7 @@ impl EndpointType {
|
|||
Self::ReadAll | Self::Search | Self::Create | Self::UpdateAll | Self::DeleteAll => {
|
||||
quote!(::gotham_restful::gotham::extractor::NoopPathExtractor)
|
||||
},
|
||||
Self::Read | Self::Update | Self::Delete => quote!(::gotham_restful::export::IdPlaceholder::<#arg_ty>),
|
||||
Self::Read | Self::Update | Self::Delete => quote!(::gotham_restful::private::IdPlaceholder::<#arg_ty>),
|
||||
Self::Custom { .. } => {
|
||||
if self.has_placeholders().value {
|
||||
arg_ty.to_token_stream()
|
||||
|
@ -490,7 +490,7 @@ fn expand_endpoint_type(mut ty: EndpointType, attrs: AttributeArgs, fun: &ItemFn
|
|||
let conn_ty = arg.ty.quote_ty();
|
||||
state_block = quote! {
|
||||
#state_block
|
||||
let repo = <::gotham_restful::export::Repo<#conn_ty>>::borrow_from(state).clone();
|
||||
let repo = <::gotham_restful::private::Repo<#conn_ty>>::borrow_from(state).clone();
|
||||
};
|
||||
handle_content = quote! {
|
||||
repo.run::<_, _, ()>(move |conn| {
|
||||
|
@ -500,7 +500,7 @@ fn expand_endpoint_type(mut ty: EndpointType, attrs: AttributeArgs, fun: &ItemFn
|
|||
}
|
||||
|
||||
Ok(quote! {
|
||||
use ::gotham_restful::export::FutureExt as _;
|
||||
use ::gotham_restful::private::FutureExt as _;
|
||||
use ::gotham_restful::gotham::state::FromState as _;
|
||||
#state_block
|
||||
async move {
|
||||
|
@ -559,7 +559,7 @@ fn expand_endpoint_type(mut ty: EndpointType, attrs: AttributeArgs, fun: &ItemFn
|
|||
placeholders: Self::Placeholders,
|
||||
params: Self::Params,
|
||||
body: ::std::option::Option<Self::Body>
|
||||
) -> ::gotham_restful::export::BoxFuture<'a, Self::Output> {
|
||||
) -> ::gotham_restful::private::BoxFuture<'a, Self::Output> {
|
||||
#handle_content
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ fn expand_enum(ident: Ident, generics: Generics, attrs: Vec<Attribute>, input: D
|
|||
{
|
||||
fn schema() -> #krate::OpenapiSchema
|
||||
{
|
||||
use #krate::{export::openapi::*, OpenapiSchema};
|
||||
use #krate::{private::openapi::*, OpenapiSchema};
|
||||
|
||||
let mut enumeration : Vec<String> = Vec::new();
|
||||
|
||||
|
@ -261,7 +261,7 @@ fn expand_struct(ident: Ident, generics: Generics, attrs: Vec<Attribute>, input:
|
|||
{
|
||||
fn schema() -> #krate::OpenapiSchema
|
||||
{
|
||||
use #krate::{export::{openapi::*, IndexMap}, OpenapiSchema};
|
||||
use #krate::{private::{openapi::*, IndexMap}, OpenapiSchema};
|
||||
|
||||
let mut properties : IndexMap<String, ReferenceOr<Box<Schema>>> = IndexMap::new();
|
||||
let mut required : Vec<String> = Vec::new();
|
||||
|
|
|
@ -32,7 +32,7 @@ fn impl_openapi_type(ident: &Ident, generics: &Generics) -> TokenStream {
|
|||
{
|
||||
fn schema() -> #krate::OpenapiSchema
|
||||
{
|
||||
use #krate::{export::openapi::*, OpenapiSchema};
|
||||
use #krate::{private::openapi::*, OpenapiSchema};
|
||||
|
||||
OpenapiSchema::new(SchemaKind::Type(Type::String(StringType {
|
||||
format: VariantOrUnknownOrEmpty::Item(StringFormat::Binary),
|
||||
|
|
|
@ -316,7 +316,7 @@ pub fn expand_resource_error(input: DeriveInput) -> Result<TokenStream> {
|
|||
impl #generics #krate::IntoResponseError for #ident #generics
|
||||
where #( #were ),*
|
||||
{
|
||||
type Err = #krate::export::serde_json::Error;
|
||||
type Err = #krate::private::serde_json::Error;
|
||||
|
||||
fn into_response_error(self) -> Result<#krate::Response, Self::Err>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue