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: u32A length of an indexed sequence component of a current branch node. Map component elements are computed on demand.
content_len: u32Implementations§
Source§impl Branch
impl Branch
pub fn new(type_ref: TypeRef) -> Box<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_with<F>(&mut self, key: Origin, f: F)
pub fn unobserve(&mut self, key: &Origin) -> bool
pub fn observe_deep<F>(&mut self, f: F) -> Subscription
pub fn observe_deep_with<F>(&mut self, key: Origin, f: F)
Trait Implementations§
Source§impl AsRef<Branch> for XmlElementRef
impl AsRef<Branch> for XmlElementRef
Source§impl AsRef<Branch> for XmlTextRef
impl AsRef<Branch> for XmlTextRef
Source§impl AsRef<Branch> for XmlFragmentRef
impl AsRef<Branch> for XmlFragmentRef
Source§impl AsRef<Branch> for XmlHookRef
impl AsRef<Branch> for XmlHookRef
impl Eq for Branch
Auto Trait Implementations§
impl !RefUnwindSafe for Branch
impl !Send for Branch
impl !Sync for Branch
impl !UnwindSafe for Branch
impl Freeze for Branch
impl Unpin for Branch
impl UnsafeUnpin 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