Skip to content

Is there some resean the index and ty must be static in SearchRequestInner? #313

@wfxr

Description

@wfxr

Is there some reasons the index and ty must be static in SearchRequestInner?

I find it is hard to give SearchRequestBuilder a static index name since it only can be computed runtime in some scenario.

pub fn index<I>(mut self, index: I) -> Self
       where I: Into<Index<'static>>

pub type SearchRequestBuilder<TSender, TDocument, TBody> = RequestBuilder<TSender, SearchRequestInner<TDocument, TBody>>;
#[doc(hidden)]
pub struct SearchRequestInner<TDocument, TBody> {
index: Option<Index<'static>>,
ty: Option<Type<'static>>,
body: TBody,
_marker: PhantomData<TDocument>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions