#[non_exhaustive]pub enum LoadEvent {
Ready {
id: BufferId,
name: String,
},
Failed {
id: BufferId,
name: String,
error: String,
},
}Expand description
Event emitted by SyntaxLayer::poll_pending_loads for each handle that
resolved during the tick.
§Examples
use hjkl_syntax::LoadEvent;
let e = LoadEvent::Ready { id: 0, name: "rust".into() };
match e {
LoadEvent::Ready { id, name } => assert_eq!(name, "rust"),
LoadEvent::Failed { .. } => panic!("unexpected"),
// LoadEvent is #[non_exhaustive] — handle future variants.
_ => {}
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ready
Grammar installed; trigger a redraw + re-submit for id.
Fields
Failed
Load failed (clone/compile error); buffer stays plain text.
Auto Trait Implementations§
impl Freeze for LoadEvent
impl RefUnwindSafe for LoadEvent
impl Send for LoadEvent
impl Sync for LoadEvent
impl Unpin for LoadEvent
impl UnsafeUnpin for LoadEvent
impl UnwindSafe for LoadEvent
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