Struct cfn::ValueList
[−]
[src]
pub struct ValueList<T>(_);
Like Value
, except it is used in place of lists of Value
s in
templates.
For example, if you have a parameter called SubnetIds
of type
List<AWS::EC2::Subnet::Id>
then, you can use ValueList::reference("SubnetIds")
to reference it.
Methods
impl<T> ValueList<T>
[src]
pub fn new<I>(values: I) -> ValueList<T> where
I: IntoIterator<Item = Value<T>>,
[src]
I: IntoIterator<Item = Value<T>>,
Create a new value list.
pub fn reference<S: Into<String>>(id: S) -> ValueList<T>
[src]
Create a new value list backed by a reference.
pub fn as_values(&self) -> Option<&[Value<T>]>
[src]
If the list contains values, return Some
.
Return None
otherwise.
pub fn as_reference(&self) -> Option<&str>
[src]
If the list is a reference, return Some
.
Return None
otherwise.
Trait Implementations
impl<T: Debug> Debug for ValueList<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Default for ValueList<T>
[src]
impl<T> FromIterator<Value<T>> for ValueList<T>
[src]
fn from_iter<I>(iter: I) -> ValueList<T> where
I: IntoIterator<Item = Value<T>>,
[src]
I: IntoIterator<Item = Value<T>>,
Creates a value from an iterator. Read more
impl<T: SerializeValue> Serialize for ValueList<T>
[src]
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>
[src]
Serialize this value into the given Serde serializer. Read more
impl<'de, T: DeserializeValue> Deserialize<'de> for ValueList<T>
[src]
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
[src]
Deserialize this value from the given Serde deserializer. Read more