Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

RootRef

Trait RootRef 

pub trait RootRef: SharedRef {
    // Required method
    fn type_ref() -> TypeRef;

    // Provided method
    fn root<N>(name: N) -> Root<Self>
       where N: Into<Arc<str>> { ... }
}
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§

fn root<N>(name: N) -> Root<Self>
where N: Into<Arc<str>>,

Create a logical collaborative collection reference to a root-level type with a given name

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.

Implementors§