pub struct List<T: Display>(/* private fields */);Expand description
A list of values that serializes to a comma-separated string.
Accepts a single value, an array, or a Vec via Into conversions,
making it ergonomic to pass one or many values at call sites:
List::from(42) // single value
List::from([1, 2, 3]) // array
List::from(vec![1, 2, 3]) // vecThis type exists to satisfy ResourceSpace API parameters that expect
comma-separated values (e.g. "1,2,3"), while keeping call sites
type-safe and free of manual string joining.
Trait Implementations§
impl<T: Display> StructuralPartialEq for List<T>
Auto Trait Implementations§
impl<T> Freeze for List<T>
impl<T> RefUnwindSafe for List<T>where
T: RefUnwindSafe,
impl<T> Send for List<T>where
T: Send,
impl<T> Sync for List<T>where
T: Sync,
impl<T> Unpin for List<T>where
T: Unpin,
impl<T> UnsafeUnpin for List<T>
impl<T> UnwindSafe for List<T>where
T: UnwindSafe,
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