#[non_exhaustive]pub struct JjCapabilities {
pub version: JjVersion,
}Expand description
What the installed jj binary supports, probed via
JjApi::capabilities. A value type — the client holds no state, so probe
once and keep the result (callers cache it).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: JjVersionThe binary’s parsed version.
Implementations§
Source§impl JjCapabilities
impl JjCapabilities
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Whether the binary meets the validated floor (jj ≥ 0.38).
Sourcepub fn ensure_supported(&self) -> Result<()>
pub fn ensure_supported(&self) -> Result<()>
Error unless is_supported — a clear “needs jj
≥ 0.38, found 0.35.0” instead of a cryptic argv/template failure later.
Trait Implementations§
Source§impl Clone for JjCapabilities
impl Clone for JjCapabilities
Source§fn clone(&self) -> JjCapabilities
fn clone(&self) -> JjCapabilities
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 moreimpl Copy for JjCapabilities
Source§impl Debug for JjCapabilities
impl Debug for JjCapabilities
impl Eq for JjCapabilities
Source§impl PartialEq for JjCapabilities
impl PartialEq for JjCapabilities
Source§fn eq(&self, other: &JjCapabilities) -> bool
fn eq(&self, other: &JjCapabilities) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JjCapabilities
Auto Trait Implementations§
impl Freeze for JjCapabilities
impl RefUnwindSafe for JjCapabilities
impl Send for JjCapabilities
impl Sync for JjCapabilities
impl Unpin for JjCapabilities
impl UnsafeUnpin for JjCapabilities
impl UnwindSafe for JjCapabilities
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