pub struct MagitViews { /* private fields */ }Expand description
Per-buffer MagitView registry — the shared-action peer of
BufferStates.
Implementations§
Source§impl MagitViews
impl MagitViews
pub fn publish(&self, buffer: BufferId, view: Arc<dyn MagitView>)
pub fn get(&self, buffer: BufferId) -> Option<Arc<dyn MagitView>>
pub fn remove(&self, buffer: BufferId)
Sourcepub fn all(&self) -> Vec<Arc<dyn MagitView>>
pub fn all(&self) -> Vec<Arc<dyn MagitView>>
Every live magit view, in no particular order.
MG.21g: for repo-wide operations that invalidate every magit
buffer rather than one. A bisect mark checks out a different
commit, so the status buffer, any open log, and any open diff
are all stale at once — refreshing only the buffer the chord
fired in would leave the others confidently showing the previous
HEAD. The peer of BufferStates::all, and reachable the same
way: through the service, so a handler with no buffer of its own
(a transient row, a prompt submit) can still use it.
Trait Implementations§
Source§impl Default for MagitViews
impl Default for MagitViews
Source§fn default() -> MagitViews
fn default() -> MagitViews
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MagitViews
impl RefUnwindSafe for MagitViews
impl Send for MagitViews
impl Sync for MagitViews
impl Unpin for MagitViews
impl UnsafeUnpin for MagitViews
impl UnwindSafe for MagitViews
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more