pub trait RootRef: SharedRef {
// Required method
fn type_ref() -> TypeRef;
// Provided method
fn root<N: Into<Arc<str>>>(name: N) -> Root<Self> { ... }
}
Expand description
A subset of SharedRef used to mark collaborative collections that can be used as a root level collections. This includes common types like ArrayRef, MapRef, TextRef and XmlFragmentRef.
Some types like XmlTextRef and XmlElementRef are not bound to be used as root-level types since they have limited capabilities (i.e. cannot propagate XML node name).
Other types like [WeakRef] are not supposed to be used at root-level since they refer to elements created prior to them, while root-level types are virtually immortal and technically exist for the whole lifespan of their document.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.