pub struct Branch {
pub block_len: u32,
pub content_len: u32,
/* private fields */
}
Expand description
Branch describes a content of a complex Yrs data structures, such as arrays or maps.
Fields§
§block_len: u32
A length of an indexed sequence component of a current branch node. Map component elements are computed on demand.
content_len: u32
Implementations§
source§impl Branch
impl Branch
pub fn new(type_ref: TypeRef) -> Arc<Self>
pub fn is_deleted(&self) -> bool
pub fn id(&self) -> BranchID
pub fn as_subdoc(&self) -> Option<Doc>
sourcepub fn type_ref(&self) -> &TypeRef
pub fn type_ref(&self) -> &TypeRef
Returns an identifier of an underlying complex data type (eg. is it an Array or a Map).
sourcepub fn len(&self) -> u32
pub fn len(&self) -> u32
Returns a length of an indexed sequence component of a current branch node. Map component elements are computed on demand.
pub fn content_len(&self) -> u32
pub fn observe<F>(&mut self, f: F) -> Subscription
pub fn observe_deep<F>(&self, f: F) -> Subscription
Trait Implementations§
source§impl AsRef<Branch> for XmlElementRef
impl AsRef<Branch> for XmlElementRef
source§impl AsRef<Branch> for XmlFragmentRef
impl AsRef<Branch> for XmlFragmentRef
source§impl AsRef<Branch> for XmlHookRef
impl AsRef<Branch> for XmlHookRef
source§impl AsRef<Branch> for XmlTextRef
impl AsRef<Branch> for XmlTextRef
source§impl PartialEq for Branch
impl PartialEq for Branch
impl Eq for Branch
Auto Trait Implementations§
impl !Freeze for Branch
impl !RefUnwindSafe for Branch
impl !Send for Branch
impl !Sync for Branch
impl Unpin for Branch
impl !UnwindSafe for Branch
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