sreflist

Macro sreflist 

Source
macro_rules! sreflist {
    [] => { ... };
    [$($value:expr),*] => { ... };
    ($value:expr) => { ... };
}
Expand description

Creates a Some(Value::EntityList) for use in write requests.

This macro wraps a list of entity references in Some(Value::EntityList), making it ready for use with swrite! macro or any function expecting an Option<Value>. It can be used in three ways:

  1. With no arguments: creates an empty list
  2. With multiple arguments: creates a list from those arguments
  3. With a single Vec: wraps the existing Vec

Each input item will be converted to a String using to_string().

§Arguments

  • $value - Either nothing, a Vec, or a comma-separated list of values

§Returns

  • Some(Value::EntityList) - The wrapped entity list