Struct qldb::Document [−][src]
pub struct Document { /* fields omitted */ }
It contains the IonValue representing the QLDB Document.
It contains methods that will extract and try to transfor the IonValue to your type.
use qldb::{QLDBExtractResult, Document}; fn test(document: Document) -> QLDBExtractResult<u64> { let points: u64 = document.get_value("points")?; Ok(points) }
Implementations
impl Document
[src]
impl Document
[src]pub fn get_value<T>(&self, name: &str) -> QLDBExtractResult<T> where
T: TryFrom<IonValue> + Send + Sync + Clone,
<T as TryFrom<IonValue>>::Error: Error + Send + Sync + 'static,
[src]
pub fn get_value<T>(&self, name: &str) -> QLDBExtractResult<T> where
T: TryFrom<IonValue> + Send + Sync + Clone,
<T as TryFrom<IonValue>>::Error: Error + Send + Sync + 'static,
[src]Extract a value from the document and tries to transform to the value of the return type. Fails if the property is not there.
Trait Implementations
impl Extend<Document> for DocumentCollection
[src]
impl Extend<Document> for DocumentCollection
[src]fn extend<T: IntoIterator<Item = Document>>(&mut self, iter: T)
[src]
fn extend<T: IntoIterator<Item = Document>>(&mut self, iter: T)
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl StructuralPartialEq for Document
[src]
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more