pub struct SExp(pub Sequence);Expand description
An in-memory representation of an Ion s-expression
use ion_rs::{Element, ion_sexp};
let sexp = ion_sexp!(1 2 3);
assert_eq!(sexp.len(), 3);
assert_eq!(sexp.get(1), Some(&Element::int(2)));To build a SExp incrementally, see SequenceBuilder.
The inner Sequence is public to match Value::SExp(Sequence), allowing
direct construction and destructuring.
Tuple Fields§
§0: SequenceImplementations§
Trait Implementations§
Source§impl FromIterator<Element> for SExp
impl FromIterator<Element> for SExp
Source§impl<'a> IntoIterator for &'a SExp
impl<'a> IntoIterator for &'a SExp
impl StructuralPartialEq for SExp
Auto Trait Implementations§
impl Freeze for SExp
impl RefUnwindSafe for SExp
impl Send for SExp
impl Sync for SExp
impl Unpin for SExp
impl UnsafeUnpin for SExp
impl UnwindSafe for SExp
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