pub enum ProviderViewOutcome {
Opened {
view: BufferId,
message: Option<String>,
},
Declined {
message: String,
},
}Expand description
What an opener did, in terms the host can apply generically.
The host arm knows only these two outcomes — it never learns what the provider computed. Both carry their own message so the provider words its own success and refusal (the host has no vocabulary for “no changed files in the working tree”).
Variants§
Opened
The view exists. The host activates view and echoes message
at info level if one is supplied.
Fields
§
view: BufferIdThe view buffer to make active.
Declined
Nothing was opened, for a reason the user should see (not a git repository, empty result set, a service missing because the build dropped a feature). Echoed at warn level.
Declining is a first-class outcome, not an error path: opening an empty view and leaving the user to guess why is the worse UX.
Trait Implementations§
Source§impl Clone for ProviderViewOutcome
impl Clone for ProviderViewOutcome
Source§fn clone(&self) -> ProviderViewOutcome
fn clone(&self) -> ProviderViewOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProviderViewOutcome
impl Debug for ProviderViewOutcome
impl Eq for ProviderViewOutcome
Source§impl PartialEq for ProviderViewOutcome
impl PartialEq for ProviderViewOutcome
impl StructuralPartialEq for ProviderViewOutcome
Auto Trait Implementations§
impl Freeze for ProviderViewOutcome
impl RefUnwindSafe for ProviderViewOutcome
impl Send for ProviderViewOutcome
impl Sync for ProviderViewOutcome
impl Unpin for ProviderViewOutcome
impl UnsafeUnpin for ProviderViewOutcome
impl UnwindSafe for ProviderViewOutcome
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.