pub struct OwnedElement { /* private fields */ }
Expand description
An owned implementation of Element
Implementations
sourceimpl OwnedElement
impl OwnedElement
pub fn new(annotations: Vec<OwnedSymbolToken>, value: OwnedValue) -> Self
Trait Implementations
sourceimpl Builder for OwnedElement
impl Builder for OwnedElement
An owned implementation of Builder
.
type Element = OwnedElement
type SymbolToken = OwnedSymbolToken
type Sequence = OwnedSequence
type Struct = OwnedStruct
type ImportSource = OwnedImportSource
sourcefn new_string(str: &'static str) -> Self::Element
fn new_string(str: &'static str) -> Self::Element
Builds a string
using Builder.
sourcefn new_symbol(sym: Self::SymbolToken) -> Self::Element
fn new_symbol(sym: Self::SymbolToken) -> Self::Element
Builds a symbol
from SymbolToken using Builder.
sourcefn new_big_int(big_int: BigInt) -> Self::Element
fn new_big_int(big_int: BigInt) -> Self::Element
Builds a big int
using Builder.
sourcefn new_decimal(decimal: Decimal) -> Self::Element
fn new_decimal(decimal: Decimal) -> Self::Element
Builds a decimal
using Builder.
sourcefn new_timestamp(timestamp: Timestamp) -> Self::Element
fn new_timestamp(timestamp: Timestamp) -> Self::Element
Builds a timestamp
using Builder.
sourcefn new_list<I: IntoIterator<Item = Self::Element>>(seq: I) -> Self::Element
fn new_list<I: IntoIterator<Item = Self::Element>>(seq: I) -> Self::Element
Builds a list
from Sequence using Builder.
sourcefn new_sexp<I: IntoIterator<Item = Self::Element>>(seq: I) -> Self::Element
fn new_sexp<I: IntoIterator<Item = Self::Element>>(seq: I) -> Self::Element
Builds a sexp
from Sequence using Builder.
sourcefn new_struct<K: Into<Self::SymbolToken>, V: Into<Self::Element>, I: IntoIterator<Item = (K, V)>>(
structure: I
) -> Self::Element
fn new_struct<K: Into<Self::SymbolToken>, V: Into<Self::Element>, I: IntoIterator<Item = (K, V)>>(
structure: I
) -> Self::Element
Builds a struct
from Struct using Builder.
sourceimpl Clone for OwnedElement
impl Clone for OwnedElement
sourcefn clone(&self) -> OwnedElement
fn clone(&self) -> OwnedElement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OwnedElement
impl Debug for OwnedElement
sourceimpl Display for OwnedElement
impl Display for OwnedElement
sourceimpl Element for OwnedElement
impl Element for OwnedElement
type SymbolToken = OwnedSymbolToken
type Sequence = OwnedSequence
type Struct = OwnedStruct
type Builder = OwnedElement
sourcefn annotations<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Self::SymbolToken> + 'a>
fn annotations<'a>(
&'a self
) -> Box<dyn Iterator<Item = &'a Self::SymbolToken> + 'a>
The annotations for this element. Read more
sourcefn with_annotations<I: IntoIterator<Item = Self::SymbolToken>>(
self,
annotations: I
) -> Self
fn with_annotations<I: IntoIterator<Item = Self::SymbolToken>>(
self,
annotations: I
) -> Self
Return an Element
with given annotations
sourcefn has_annotation(&self, annotation: &str) -> bool
fn has_annotation(&self, annotation: &str) -> bool
Return true if an Element
contains given annotation otherwise return false
sourcefn as_integer(&self) -> Option<&Integer>
fn as_integer(&self) -> Option<&Integer>
sourcefn as_f64(&self) -> Option<f64>
fn as_f64(&self) -> Option<f64>
Returns a reference to the underlying float value for this element. Read more
sourcefn as_decimal(&self) -> Option<&Decimal>
fn as_decimal(&self) -> Option<&Decimal>
sourcefn as_timestamp(&self) -> Option<&Timestamp>
fn as_timestamp(&self) -> Option<&Timestamp>
sourcefn as_str(&self) -> Option<&str>
fn as_str(&self) -> Option<&str>
Returns a slice to the textual value of this element. Read more
sourcefn as_sym(&self) -> Option<&Self::SymbolToken>
fn as_sym(&self) -> Option<&Self::SymbolToken>
Returns a reference to the SymbolToken
of this element. Read more
sourcefn as_bool(&self) -> Option<bool>
fn as_bool(&self) -> Option<bool>
Returns a reference to the boolean value of this element. Read more
sourcefn as_bytes(&self) -> Option<&[u8]>
fn as_bytes(&self) -> Option<&[u8]>
Returns a reference to the underlying bytes of this element. Read more
sourcefn as_sequence(&self) -> Option<&Self::Sequence>
fn as_sequence(&self) -> Option<&Self::Sequence>
sourceimpl From<BigInt> for OwnedElement
impl From<BigInt> for OwnedElement
sourceimpl From<Decimal> for OwnedElement
impl From<Decimal> for OwnedElement
sourceimpl From<IonType> for OwnedElement
impl From<IonType> for OwnedElement
sourceimpl From<OwnedStruct> for OwnedElement
impl From<OwnedStruct> for OwnedElement
sourcefn from(struct_val: OwnedStruct) -> Self
fn from(struct_val: OwnedStruct) -> Self
Converts to this type from the input type.
sourceimpl From<OwnedSymbolToken> for OwnedElement
impl From<OwnedSymbolToken> for OwnedElement
sourcefn from(sym_val: OwnedSymbolToken) -> Self
fn from(sym_val: OwnedSymbolToken) -> Self
Converts to this type from the input type.
sourceimpl From<OwnedValue> for OwnedElement
impl From<OwnedValue> for OwnedElement
sourcefn from(val: OwnedValue) -> Self
fn from(val: OwnedValue) -> Self
Converts to this type from the input type.
sourceimpl From<String> for OwnedElement
impl From<String> for OwnedElement
sourceimpl From<Timestamp> for OwnedElement
impl From<Timestamp> for OwnedElement
sourceimpl From<bool> for OwnedElement
impl From<bool> for OwnedElement
sourceimpl From<f64> for OwnedElement
impl From<f64> for OwnedElement
sourceimpl From<i64> for OwnedElement
impl From<i64> for OwnedElement
sourceimpl FromIterator<OwnedElement> for OwnedSequence
impl FromIterator<OwnedElement> for OwnedSequence
sourcefn from_iter<I: IntoIterator<Item = OwnedElement>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = OwnedElement>>(iter: I) -> Self
Returns an owned sequence from the given iterator of elements.
sourceimpl PartialEq<OwnedElement> for OwnedElement
impl PartialEq<OwnedElement> for OwnedElement
impl Eq for OwnedElement
Auto Trait Implementations
impl RefUnwindSafe for OwnedElement
impl !Send for OwnedElement
impl !Sync for OwnedElement
impl Unpin for OwnedElement
impl UnwindSafe for OwnedElement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntAccess for T where
T: Element,
impl<T> IntAccess for T where
T: Element,
sourcefn as_i64(&self) -> Option<i64>
fn as_i64(&self) -> Option<i64>
Returns the value as an i64
if it can be represented as such. Read more
sourcefn as_big_int(&self) -> Option<&BigInt>
fn as_big_int(&self) -> Option<&BigInt>
Returns a reference as a BigInt
if it is represented as such. Note that this
method may return None
if the underlying representation is not stored in a BigInt
such as if it is represented as an i64
so it is somewhat asymmetric with respect
to IntAccess::as_i64
. Read more