pub struct InputBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> InputBuilder<S>
impl<S: State> InputBuilder<S>
Sourcepub fn build(self) -> Inputwhere
S: IsComplete,
pub fn build(self) -> Inputwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn discoverable(self, value: bool) -> InputBuilder<SetDiscoverable<S>>where
S::Discoverable: IsUnset,
pub fn discoverable(self, value: bool) -> InputBuilder<SetDiscoverable<S>>where
S::Discoverable: IsUnset,
Required.
Sourcepub fn input_type(self, value: InputType) -> InputBuilder<SetInputType<S>>where
S::InputType: IsUnset,
pub fn input_type(self, value: InputType) -> InputBuilder<SetInputType<S>>where
S::InputType: IsUnset,
Required.
Sourcepub fn method(self, value: Method) -> InputBuilder<SetMethod<S>>where
S::Method: IsUnset,
pub fn method(self, value: Method) -> InputBuilder<SetMethod<S>>where
S::Method: IsUnset,
Required.
Sourcepub fn body_type(self, value: InputBodyType) -> InputBuilder<SetBodyType<S>>where
S::BodyType: IsUnset,
pub fn body_type(self, value: InputBodyType) -> InputBuilder<SetBodyType<S>>where
S::BodyType: IsUnset,
Sourcepub fn maybe_body_type(
self,
value: Option<InputBodyType>,
) -> InputBuilder<SetBodyType<S>>where
S::BodyType: IsUnset,
pub fn maybe_body_type(
self,
value: Option<InputBodyType>,
) -> InputBuilder<SetBodyType<S>>where
S::BodyType: IsUnset,
Sourcepub fn query_params(
self,
iter: impl IntoIterator<Item = (&'static str, FieldDefinition)>,
) -> InputBuilder<SetQueryParams<S>>where
S::QueryParams: IsUnset,
pub fn query_params(
self,
iter: impl IntoIterator<Item = (&'static str, FieldDefinition)>,
) -> InputBuilder<SetQueryParams<S>>where
S::QueryParams: IsUnset,
Sourcepub fn maybe_query_params(
self,
value: Option<impl IntoIterator<Item = (&'static str, FieldDefinition)>>,
) -> InputBuilder<SetQueryParams<S>>where
S::QueryParams: IsUnset,
pub fn maybe_query_params(
self,
value: Option<impl IntoIterator<Item = (&'static str, FieldDefinition)>>,
) -> InputBuilder<SetQueryParams<S>>where
S::QueryParams: IsUnset,
Sourcepub fn body_fields(
self,
iter: impl IntoIterator<Item = (&'static str, FieldDefinition)>,
) -> InputBuilder<SetBodyFields<S>>where
S::BodyFields: IsUnset,
pub fn body_fields(
self,
iter: impl IntoIterator<Item = (&'static str, FieldDefinition)>,
) -> InputBuilder<SetBodyFields<S>>where
S::BodyFields: IsUnset,
Sourcepub fn maybe_body_fields(
self,
value: Option<impl IntoIterator<Item = (&'static str, FieldDefinition)>>,
) -> InputBuilder<SetBodyFields<S>>where
S::BodyFields: IsUnset,
pub fn maybe_body_fields(
self,
value: Option<impl IntoIterator<Item = (&'static str, FieldDefinition)>>,
) -> InputBuilder<SetBodyFields<S>>where
S::BodyFields: IsUnset,
Sourcepub fn header_fields(
self,
iter: impl IntoIterator<Item = (&'static str, FieldDefinition)>,
) -> InputBuilder<SetHeaderFields<S>>where
S::HeaderFields: IsUnset,
pub fn header_fields(
self,
iter: impl IntoIterator<Item = (&'static str, FieldDefinition)>,
) -> InputBuilder<SetHeaderFields<S>>where
S::HeaderFields: IsUnset,
Sourcepub fn maybe_header_fields(
self,
value: Option<impl IntoIterator<Item = (&'static str, FieldDefinition)>>,
) -> InputBuilder<SetHeaderFields<S>>where
S::HeaderFields: IsUnset,
pub fn maybe_header_fields(
self,
value: Option<impl IntoIterator<Item = (&'static str, FieldDefinition)>>,
) -> InputBuilder<SetHeaderFields<S>>where
S::HeaderFields: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for InputBuilder<S>
impl<S> RefUnwindSafe for InputBuilder<S>
impl<S> Send for InputBuilder<S>
impl<S> Sync for InputBuilder<S>
impl<S> Unpin for InputBuilder<S>
impl<S> UnwindSafe for InputBuilder<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more