pub struct XmlFragmentRef(/* private fields */);Expand description
A XML fragment, which works as an untagged collection of XML nodes.
Implementations§
Trait Implementations§
Source§impl AsRef<Branch> for XmlFragmentRef
impl AsRef<Branch> for XmlFragmentRef
Source§impl Clone for XmlFragmentRef
impl Clone for XmlFragmentRef
Source§fn clone(&self) -> XmlFragmentRef
fn clone(&self) -> XmlFragmentRef
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 XmlFragmentRef
impl Debug for XmlFragmentRef
Source§impl DeepObservable for XmlFragmentRef
impl DeepObservable for XmlFragmentRef
Source§fn observe_deep<F>(&self, f: F) -> Subscription
fn observe_deep<F>(&self, f: F) -> Subscription
Source§impl From<BranchPtr> for XmlFragmentRef
impl From<BranchPtr> for XmlFragmentRef
Source§fn from(inner: BranchPtr) -> XmlFragmentRef
fn from(inner: BranchPtr) -> XmlFragmentRef
Converts to this type from the input type.
Source§impl GetString for XmlFragmentRef
impl GetString for XmlFragmentRef
Source§impl IndexedSequence for XmlFragmentRef
impl IndexedSequence for XmlFragmentRef
Source§fn sticky_index(
&self,
txn: &mut TransactionMut<'_>,
index: u32,
assoc: Assoc,
) -> Option<StickyIndex>
fn sticky_index( &self, txn: &mut TransactionMut<'_>, index: u32, assoc: Assoc, ) -> Option<StickyIndex>
Returns a StickyIndex equivalent to a human-readable
index.
Returns None if index is beyond the length of current sequence.Source§impl Into<XmlFragmentRef> for XmlElementRef
impl Into<XmlFragmentRef> for XmlElementRef
Source§fn into(self) -> XmlFragmentRef
fn into(self) -> XmlFragmentRef
Converts this type into the (usually inferred) input type.
Source§impl Observable for XmlFragmentRef
impl Observable for XmlFragmentRef
type Event = XmlEvent
Source§fn observe<F>(&self, f: F) -> Subscription
fn observe<F>(&self, f: F) -> Subscription
Subscribes a given callback to be triggered whenever current y-type is changed.
A callback is triggered whenever a transaction gets committed. This function does not
trigger if changes have been observed by nested shared collections. Read more
Source§impl PartialEq for XmlFragmentRef
impl PartialEq for XmlFragmentRef
Source§impl RootRef for XmlFragmentRef
impl RootRef for XmlFragmentRef
Source§impl TryFrom<ItemPtr> for XmlFragmentRef
impl TryFrom<ItemPtr> for XmlFragmentRef
Source§impl TryFrom<Value> for XmlFragmentRef
impl TryFrom<Value> for XmlFragmentRef
Source§impl TryInto<XmlFragmentRef> for XmlNode
impl TryInto<XmlFragmentRef> for XmlNode
Source§impl XmlFragment for XmlFragmentRef
impl XmlFragment for XmlFragmentRef
fn first_child(&self) -> Option<XmlNode>
Source§fn len<T>(&self, _txn: &T) -> u32where
T: ReadTxn,
fn len<T>(&self, _txn: &T) -> u32where
T: ReadTxn,
Returns a number of elements stored in current array.
Source§fn insert<V>(
&self,
txn: &mut TransactionMut<'_>,
index: u32,
xml_node: V,
) -> <V as Prelim>::Returnwhere
V: XmlPrelim,
fn insert<V>(
&self,
txn: &mut TransactionMut<'_>,
index: u32,
xml_node: V,
) -> <V as Prelim>::Returnwhere
V: XmlPrelim,
Inserts a
value at the given index. Inserting at index 0 is equivalent to prepending
current array with given value, while inserting at array length is equivalent to appending
that value at the end of it. Read moreSource§fn push_back<V>(
&self,
txn: &mut TransactionMut<'_>,
xml_node: V,
) -> <V as Prelim>::Returnwhere
V: XmlPrelim,
fn push_back<V>(
&self,
txn: &mut TransactionMut<'_>,
xml_node: V,
) -> <V as Prelim>::Returnwhere
V: XmlPrelim,
Inserts given
value at the end of the current array.Source§fn push_front<V>(
&self,
txn: &mut TransactionMut<'_>,
xml_node: V,
) -> <V as Prelim>::Returnwhere
V: XmlPrelim,
fn push_front<V>(
&self,
txn: &mut TransactionMut<'_>,
xml_node: V,
) -> <V as Prelim>::Returnwhere
V: XmlPrelim,
Inserts given
value at the beginning of the current array.Source§fn remove(&self, txn: &mut TransactionMut<'_>, index: u32)
fn remove(&self, txn: &mut TransactionMut<'_>, index: u32)
Removes a single element at provided
index.Source§fn remove_range(&self, txn: &mut TransactionMut<'_>, index: u32, len: u32)
fn remove_range(&self, txn: &mut TransactionMut<'_>, index: u32, len: u32)
Removes a range of elements from current array, starting at given
index up until
a particular number described by len has been deleted. This method panics in case when
not all expected elements were removed (due to insufficient number of elements in an array)
or index is outside of the bounds of an array.Source§fn get<T>(&self, _txn: &T, index: u32) -> Option<XmlNode>where
T: ReadTxn,
fn get<T>(&self, _txn: &T, index: u32) -> Option<XmlNode>where
T: ReadTxn,
Retrieves a value stored at a given
index. Returns None when provided index was out
of the range of a current array.Source§fn successors<'a, T>(&'a self, txn: &'a T) -> TreeWalker<'a, &'a T, T> ⓘwhere
T: ReadTxn,
fn successors<'a, T>(&'a self, txn: &'a T) -> TreeWalker<'a, &'a T, T> ⓘwhere
T: ReadTxn,
Returns an iterator that can be used to traverse over the successors of a current
XML element. This includes recursive step over children of its children. The recursive
iteration is depth-first. Read more
impl Eq for XmlFragmentRef
Auto Trait Implementations§
impl Freeze for XmlFragmentRef
impl !RefUnwindSafe for XmlFragmentRef
impl !Send for XmlFragmentRef
impl !Sync for XmlFragmentRef
impl Unpin for XmlFragmentRef
impl !UnwindSafe for XmlFragmentRef
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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