pub struct Branch {
pub name: Option<Rc<str>>,
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
name: Option<Rc<str>>
A tag name identifier, used only by XmlElement.
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
sourceimpl Branch
impl Branch
pub fn new(type_ref: TypeRefs, name: Option<Rc<str>>) -> Box<Self>
sourcepub fn type_ref(&self) -> TypeRefs
pub fn type_ref(&self) -> TypeRefs
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, _: &Transaction) -> u32
pub fn observe_deep<F>(&mut self, f: F) -> Subscription<Events> where
F: Fn(&Transaction, &Events) + 'static,
pub fn unobserve_deep(&mut self, subscription_id: SubscriptionId)
Trait Implementations
sourceimpl AsMut<Branch> for XmlElement
impl AsMut<Branch> for XmlElement
sourceimpl AsMut<Branch> for XmlFragment
impl AsMut<Branch> for XmlFragment
sourceimpl AsRef<Branch> for XmlElement
impl AsRef<Branch> for XmlElement
sourceimpl AsRef<Branch> for XmlFragment
impl AsRef<Branch> for XmlFragment
impl Eq for Branch
Auto Trait Implementations
impl !RefUnwindSafe for Branch
impl !Send for Branch
impl !Sync for Branch
impl Unpin for Branch
impl !UnwindSafe for Branch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more