pub struct List(pub Sequence);Expand description
An in-memory representation of an Ion list.
use ion_rs::{ion_list, Element};
let list = ion_list![1, 2, 3];
assert_eq!(list.len(), 3);
assert_eq!(list.get(1), Some(&Element::int(2)));To build a List incrementally, see SequenceBuilder.
The inner Sequence is public to match Value::List(Sequence), allowing
direct construction and destructuring.
Tuple Fields§
§0: SequenceImplementations§
Trait Implementations§
Source§impl FromIterator<Element> for List
impl FromIterator<Element> for List
Source§impl<'a> IntoIterator for &'a List
impl<'a> IntoIterator for &'a List
impl StructuralPartialEq for List
Auto Trait Implementations§
impl Freeze for List
impl RefUnwindSafe for List
impl Send for List
impl Sync for List
impl Unpin for List
impl UnsafeUnpin for List
impl UnwindSafe for List
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<V> IntoAnnotatedElement for V
impl<V> IntoAnnotatedElement for V
Source§fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
Converts the value into an Element with the specified annotations.
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more