pub struct BorrowedElement<'val> { /* private fields */ }
Expand description
A borrowed implementation of Element
Implementations
sourceimpl<'val> BorrowedElement<'val>
impl<'val> BorrowedElement<'val>
pub fn new(
annotations: Vec<BorrowedSymbolToken<'val>>,
value: BorrowedValue<'val>
) -> Self
Trait Implementations
sourceimpl<'val> Builder for BorrowedElement<'val>
impl<'val> Builder for BorrowedElement<'val>
A borrowed implementation of Builder
.
type Element = BorrowedElement<'val>
type SymbolToken = BorrowedSymbolToken<'val>
type Sequence = BorrowedSequence<'val>
type Struct = BorrowedStruct<'val>
type ImportSource = BorrowedImportSource<'val>
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<'val> Clone for BorrowedElement<'val>
impl<'val> Clone for BorrowedElement<'val>
sourcefn clone(&self) -> BorrowedElement<'val>
fn clone(&self) -> BorrowedElement<'val>
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<'val> Debug for BorrowedElement<'val>
impl<'val> Debug for BorrowedElement<'val>
sourceimpl<'val> Element for BorrowedElement<'val>
impl<'val> Element for BorrowedElement<'val>
type SymbolToken = BorrowedSymbolToken<'val>
type Sequence = BorrowedSequence<'val>
type Struct = BorrowedStruct<'val>
type Builder = BorrowedElement<'val>
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<'val> From<&'val str> for BorrowedElement<'val>
impl<'val> From<&'val str> for BorrowedElement<'val>
sourceimpl<'val> From<BigInt> for BorrowedElement<'val>
impl<'val> From<BigInt> for BorrowedElement<'val>
sourceimpl<'val> From<BorrowedStruct<'val>> for BorrowedElement<'val>
impl<'val> From<BorrowedStruct<'val>> for BorrowedElement<'val>
sourcefn from(struct_val: BorrowedStruct<'val>) -> Self
fn from(struct_val: BorrowedStruct<'val>) -> Self
Converts to this type from the input type.
sourceimpl<'val> From<BorrowedSymbolToken<'val>> for BorrowedElement<'val>
impl<'val> From<BorrowedSymbolToken<'val>> for BorrowedElement<'val>
sourcefn from(sym_val: BorrowedSymbolToken<'val>) -> Self
fn from(sym_val: BorrowedSymbolToken<'val>) -> Self
Converts to this type from the input type.
sourceimpl<'val> From<BorrowedValue<'val>> for BorrowedElement<'val>
impl<'val> From<BorrowedValue<'val>> for BorrowedElement<'val>
sourcefn from(val: BorrowedValue<'val>) -> Self
fn from(val: BorrowedValue<'val>) -> Self
Constructs a BorrowedElement
without annotations from this value.
sourceimpl<'val> From<Decimal> for BorrowedElement<'val>
impl<'val> From<Decimal> for BorrowedElement<'val>
sourceimpl<'val> From<IonType> for BorrowedElement<'val>
impl<'val> From<IonType> for BorrowedElement<'val>
sourceimpl<'val> From<Timestamp> for BorrowedElement<'val>
impl<'val> From<Timestamp> for BorrowedElement<'val>
sourceimpl<'val> From<bool> for BorrowedElement<'val>
impl<'val> From<bool> for BorrowedElement<'val>
sourceimpl<'val> From<f64> for BorrowedElement<'val>
impl<'val> From<f64> for BorrowedElement<'val>
sourceimpl<'val> From<i64> for BorrowedElement<'val>
impl<'val> From<i64> for BorrowedElement<'val>
sourceimpl<'val> FromIterator<BorrowedElement<'val>> for BorrowedSequence<'val>
impl<'val> FromIterator<BorrowedElement<'val>> for BorrowedSequence<'val>
sourcefn from_iter<I: IntoIterator<Item = BorrowedElement<'val>>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = BorrowedElement<'val>>>(iter: I) -> Self
Returns an borrowed sequence from the given iterator of elements.
sourceimpl<'val> PartialEq<BorrowedElement<'val>> for BorrowedElement<'val>
impl<'val> PartialEq<BorrowedElement<'val>> for BorrowedElement<'val>
impl<'val> Eq for BorrowedElement<'val>
Auto Trait Implementations
impl<'val> RefUnwindSafe for BorrowedElement<'val>
impl<'val> Send for BorrowedElement<'val>
impl<'val> Sync for BorrowedElement<'val>
impl<'val> Unpin for BorrowedElement<'val>
impl<'val> UnwindSafe for BorrowedElement<'val>
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