pub struct LayoutChanged {
pub kind: LayoutChangeKind,
pub window_count: usize,
pub focused_window: Option<u64>,
}Expand description
Layout changed event.
Emitted after any layout operation (split, close, focus, resize, equalize). This is the primary event for notifying clients of layout changes.
The runner subscribes to this event and converts it to an RPC notification for connected clients.
§Example
ⓘ
use reovim_kernel::api::v1::{EventBus, EventResult, events::kernel::LayoutChanged};
let bus = EventBus::new();
let _sub = bus.subscribe::<LayoutChanged, _>(100, |event| {
println!("Layout changed: {:?}", event.kind);
EventResult::Handled
});Fields§
§kind: LayoutChangeKindType of layout change that occurred.
window_count: usizeTotal window count after the change.
focused_window: Option<u64>Currently focused window (if any).
Trait Implementations§
Source§impl Clone for LayoutChanged
impl Clone for LayoutChanged
Source§fn clone(&self) -> LayoutChanged
fn clone(&self) -> LayoutChanged
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutChanged
impl Debug for LayoutChanged
Auto Trait Implementations§
impl Freeze for LayoutChanged
impl RefUnwindSafe for LayoutChanged
impl Send for LayoutChanged
impl Sync for LayoutChanged
impl Unpin for LayoutChanged
impl UnsafeUnpin for LayoutChanged
impl UnwindSafe for LayoutChanged
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