pub struct BodyField {
pub name: String,
pub field_type: UnifiedType,
pub repeated: bool,
pub oneof_variants: Option<Vec<OneofVariant>>,
pub documentation: Option<String>,
}Expand description
A body field that should be extracted from the request body
Fields§
§name: StringField name
field_type: UnifiedTypeParsed type of the body parameter
repeated: boolWhether this field is a repeated (Vec) type
oneof_variants: Option<Vec<OneofVariant>>For oneof fields, the variants with their names and types
documentation: Option<String>Documentation from protobuf field comments
Implementations§
Source§impl BodyField
impl BodyField
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Denotes whether this field should be treated as optional in builder APIs.
A field is optional when its UnifiedType.is_optional flag is set, when it is
repeated, or when its base type is Map, Message, or OneOf (complex types
always have a valid default and are therefore optional constructor parameters).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BodyField
impl RefUnwindSafe for BodyField
impl Send for BodyField
impl Sync for BodyField
impl Unpin for BodyField
impl UnsafeUnpin for BodyField
impl UnwindSafe for BodyField
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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