Skip to main content

Version

Struct Version 

Source
pub(crate) struct Version {
    verbose: bool,
    version: &'static str,
    tag: &'static str,
    commit: &'static str,
    build_date: &'static str,
    target: &'static str,
    rust_version: &'static str,
    cargo_version: &'static str,
    cargo_tree: &'static str,
    features: &'static [&'static str],
}
Expand description

The version structure.

Fields§

§verbose: bool

Specifies if the output should contain verbose debug information.

§version: &'static str

The current crate version.

§tag: &'static str

The tag of the build, empty if not available.

§commit: &'static str

The git commit SHA of the build.

§build_date: &'static str

The build date string.

§target: &'static str

The target triple string.

§rust_version: &'static str

The used Rust version.

§cargo_version: &'static str

The used Cargo version.

§cargo_tree: &'static str

The cargo dependency tree, only available in verbose output.

§features: &'static [&'static str]

The optional features this build supports, which the version alone does not tell.

Implementations§

Source§

impl Version

Source

const FEATURE_PORT_FORWARD: &'static str = "portforward"

Forwarding ports by servePortForwardContainer.

Source

const FEATURE_IDLE_TIMEOUT: &'static str = "idletimeout"

The idleTimeoutSec of the exec and attach serve requests, which older servers ignore. Port forwarding always applies its own.

Source

const FEATURE_STREAMING_PROTOCOLS: &'static str = "streamingprotocols"

Exec and attach sessions over SPDY and the WebSocket protocols before v5.channel.k8s.io.

Source

const FEATURE_RESTORE: &'static str = "restore"

The restorePath of createContainer, which restores the container from a checkpoint with the restore command of the runtime. Older servers ignore the field and create a new container instead.

Source

const FEATURES: &'static [&'static str]

The features of this build. Earlier servers also reported sdnotify and journaldfields, whose fields got retired, see the schema.

Source

pub(crate) fn new(verbose: bool) -> Self

Create a new Version instance.

Source

pub(crate) fn features(&self) -> &'static [&'static str]

The optional features this build supports.

Source

pub(crate) fn version(&self) -> &'static str

The current crate version.

Source

pub(crate) fn tag(&self) -> &'static str

The tag of the build.

Source

pub(crate) fn commit(&self) -> &'static str

The git commit SHA.

Source

pub(crate) fn build_date(&self) -> &'static str

The build date string.

Source

pub(crate) fn target(&self) -> &'static str

The target triple.

Source

pub(crate) fn rust_version(&self) -> &'static str

The Rust version used.

Source

pub(crate) fn cargo_version(&self) -> &'static str

The Cargo version used.

Source

pub(crate) fn cargo_tree(&self) -> &'static str

The cargo dependency tree.

Source

fn text(&self) -> String

The version information as text, one field per line. The format is an interface: CRI-O takes a binary whose --version output starts with version: for conmonrs, to reject it as the monitor of a runtime handler of the oci type.

Source

pub(crate) fn print(&self) -> Result<()>

Print the version information to stdout.

Source

pub(crate) fn print_json(&self) -> Result<()>

Print the version information as JSON to stdout.

Trait Implementations§

Source§

impl Debug for Version

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Version

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Version

Source§

impl PartialEq for Version

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Version

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Version

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more