pub struct DocumentViewFields(/* private fields */);Expand description
A key value map of field keys to DocumentViewValues.
Implementations§
Source§impl DocumentViewFields
impl DocumentViewFields
Sourcepub fn new_from_operation_fields(
id: &OperationId,
fields: &OperationFields,
) -> Self
pub fn new_from_operation_fields( id: &OperationId, fields: &OperationFields, ) -> Self
Creates a new populated fields instance from existing OperationFields and OperationId.
Sourcepub fn insert(
&mut self,
name: &str,
value: DocumentViewValue,
) -> Option<DocumentViewValue>
pub fn insert( &mut self, name: &str, value: DocumentViewValue, ) -> Option<DocumentViewValue>
Insert a new field to this instance.
Sourcepub fn get(&self, name: &str) -> Option<&DocumentViewValue>
pub fn get(&self, name: &str) -> Option<&DocumentViewValue>
Returns a field value.
Sourcepub fn iter(&self) -> Iter<'_, String, DocumentViewValue>
pub fn iter(&self) -> Iter<'_, String, DocumentViewValue>
Returns an iterator of existing document view fields.
Trait Implementations§
Source§impl Clone for DocumentViewFields
impl Clone for DocumentViewFields
Source§fn clone(&self) -> DocumentViewFields
fn clone(&self) -> DocumentViewFields
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentViewFields
impl Debug for DocumentViewFields
Source§impl Default for DocumentViewFields
impl Default for DocumentViewFields
Source§impl<T: AsOperation + WithId<OperationId>> From<T> for DocumentViewFields
impl<T: AsOperation + WithId<OperationId>> From<T> for DocumentViewFields
Source§impl PartialEq for DocumentViewFields
impl PartialEq for DocumentViewFields
impl StructuralPartialEq for DocumentViewFields
Auto Trait Implementations§
impl Freeze for DocumentViewFields
impl RefUnwindSafe for DocumentViewFields
impl Send for DocumentViewFields
impl Sync for DocumentViewFields
impl Unpin for DocumentViewFields
impl UnwindSafe for DocumentViewFields
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more