pub struct Parameters(pub Vec<Parameter>);
Expand description
Collection for OpenAPI Parameter Objects.
Tuple Fields§
§0: Vec<Parameter>
Implementations§
Source§impl Parameters
impl Parameters
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new empty Parameters
. This is effectively same as calling Parameters::default
.
Sourcepub fn parameter<P: Into<Parameter>>(self, parameter: P) -> Self
pub fn parameter<P: Into<Parameter>>(self, parameter: P) -> Self
Add a new parameter and returns self
.
Sourcepub fn contains(&self, name: &str, parameter_in: ParameterIn) -> bool
pub fn contains(&self, name: &str, parameter_in: ParameterIn) -> bool
Returns true
if instance contains a parameter with the given name and location.
Sourcepub fn insert<P: Into<Parameter>>(&mut self, parameter: P)
pub fn insert<P: Into<Parameter>>(&mut self, parameter: P)
Inserts a parameter into the instance.
Sourcepub fn append(&mut self, other: &mut Self)
pub fn append(&mut self, other: &mut Self)
Moves all elements from other
into self
, leaving other
empty.
If a key from other
is already present in self
, the respective
value from self
will be overwritten with the respective value from other
.
Sourcepub fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Parameter>,
pub fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Parameter>,
Extends a collection with the contents of an iterator.
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Parameters
impl Debug for Parameters
Source§impl Default for Parameters
impl Default for Parameters
Source§fn default() -> Parameters
fn default() -> Parameters
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Parameters
impl<'de> Deserialize<'de> for Parameters
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoIterator for Parameters
impl IntoIterator for Parameters
Source§impl PartialEq for Parameters
impl PartialEq for Parameters
Source§impl Serialize for Parameters
impl Serialize for Parameters
impl StructuralPartialEq for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnwindSafe for Parameters
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