pub struct SceneDocument { /* private fields */ }Expand description
An admitted Excalidraw scene document.
Implementations§
Source§impl SceneDocument
impl SceneDocument
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, SceneParseError>
pub fn parse(bytes: &[u8]) -> Result<Self, SceneParseError>
Parses and admits a scene document from UTF-8 JSON bytes.
§Errors
Returns a SceneParseError when the bytes are not UTF-8
(scene.invalid-utf8) or JSON (scene.invalid-json), when the
document is not a version-2 Excalidraw scene envelope
(scene.invalid-envelope), when an object repeats a key
(scene.duplicate-object-key), or when it crosses one of the fixed
parser ceilings: 64 MiB of input (scene.input-too-large), nesting
depth, entry count, string, key or number-token size, or parser
memory (the other scene.* codes). These ceilings are independent of
ResourceLimits.
Trait Implementations§
Source§impl Clone for SceneDocument
impl Clone for SceneDocument
Auto Trait Implementations§
impl Freeze for SceneDocument
impl RefUnwindSafe for SceneDocument
impl Send for SceneDocument
impl Sync for SceneDocument
impl Unpin for SceneDocument
impl UnsafeUnpin for SceneDocument
impl UnwindSafe for SceneDocument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.