pub struct Doc { /* private fields */ }Expand description
A view with ids assigned: the tree of each region, as last sent.
Implementations§
Source§impl Doc
impl Doc
Sourcepub fn from_view<M>(view: View<M>) -> Result<Self, Error>
pub fn from_view<M>(view: View<M>) -> Result<Self, Error>
Reconciles a view’s tree (handlers are dropped).
§Errors
Error::DuplicateId when two siblings share an id.
Sourcepub fn from_json(value: &Value) -> Result<Self, Error>
pub fn from_json(value: &Value) -> Result<Self, Error>
Builds a view from its wire form {main?, dock?, layer?} of nodes
{k, p?, c?} (null is the empty view). Region roots must be nodes,
not lists; use View builders for implicit col wrapping.
Missing or null p and c mean no props or children. An empty
object c also means no children (an empty Luau table). Other p
values must be objects and other c values must be lists. Errors
include the node path; duplicate-key errors also name the key.
§Errors
Error::InvalidView for a malformed view, Error::DuplicateId
when two siblings share an id.
Trait Implementations§
impl StructuralPartialEq for Doc
Auto Trait Implementations§
impl Freeze for Doc
impl RefUnwindSafe for Doc
impl Send for Doc
impl Sync for Doc
impl Unpin for Doc
impl UnsafeUnpin for Doc
impl UnwindSafe for Doc
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