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: boolSpecifies if the output should contain verbose debug information.
version: &'static strThe current crate version.
tag: &'static strThe tag of the build, empty if not available.
commit: &'static strThe git commit SHA of the build.
build_date: &'static strThe build date string.
target: &'static strThe target triple string.
rust_version: &'static strThe used Rust version.
cargo_version: &'static strThe used Cargo version.
cargo_tree: &'static strThe 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
impl Version
Sourceconst FEATURE_PORT_FORWARD: &'static str = "portforward"
const FEATURE_PORT_FORWARD: &'static str = "portforward"
Forwarding ports by servePortForwardContainer.
Sourceconst FEATURE_IDLE_TIMEOUT: &'static str = "idletimeout"
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.
Sourceconst FEATURE_STREAMING_PROTOCOLS: &'static str = "streamingprotocols"
const FEATURE_STREAMING_PROTOCOLS: &'static str = "streamingprotocols"
Exec and attach sessions over SPDY and the WebSocket protocols before
v5.channel.k8s.io.
Sourceconst FEATURE_RESTORE: &'static str = "restore"
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.
Sourceconst FEATURES: &'static [&'static str]
const FEATURES: &'static [&'static str]
The features of this build. Earlier servers also reported sdnotify
and journaldfields, whose fields got retired, see the schema.
Sourcepub(crate) fn features(&self) -> &'static [&'static str]
pub(crate) fn features(&self) -> &'static [&'static str]
The optional features this build supports.
Sourcepub(crate) fn build_date(&self) -> &'static str
pub(crate) fn build_date(&self) -> &'static str
The build date string.
Sourcepub(crate) fn rust_version(&self) -> &'static str
pub(crate) fn rust_version(&self) -> &'static str
The Rust version used.
Sourcepub(crate) fn cargo_version(&self) -> &'static str
pub(crate) fn cargo_version(&self) -> &'static str
The Cargo version used.
Sourcepub(crate) fn cargo_tree(&self) -> &'static str
pub(crate) fn cargo_tree(&self) -> &'static str
The cargo dependency tree.
Sourcefn text(&self) -> String
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.
Sourcepub(crate) fn print_json(&self) -> Result<()>
pub(crate) fn print_json(&self) -> Result<()>
Print the version information as JSON to stdout.
Trait Implementations§
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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
§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
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].