pub struct SupportedVersionRange {
pub name: String,
pub min_version: i16,
pub max_version: i16,
}Expand description
Supported version range from Admin::describe_features (Java SupportedVersionRange).
std::fmt::Display is Java SupportedVersionRange.toString (no feature name;
that is the supportedFeatures map key). Java constructor requires a
non-negative min through max; Self::new checks that.
Fields§
§name: StringFeature name (for example metadata.version).
min_version: i16Lowest version the broker supports.
max_version: i16Highest version the broker supports.
Implementations§
Source§impl SupportedVersionRange
impl SupportedVersionRange
Sourcepub fn new(
name: impl Into<String>,
min_version: i16,
max_version: i16,
) -> Result<Self>
pub fn new( name: impl Into<String>, min_version: i16, max_version: i16, ) -> Result<Self>
Feature name supported from min_version through max_version.
Java SupportedVersionRange(short, short) rejects a negative min
or max, or max below min.
Sourcepub fn min_version(&self) -> i16
pub fn min_version(&self) -> i16
Java SupportedVersionRange.min.
Sourcepub fn max_version(&self) -> i16
pub fn max_version(&self) -> i16
Java SupportedVersionRange.max.
Trait Implementations§
Source§impl Clone for SupportedVersionRange
impl Clone for SupportedVersionRange
Source§fn clone(&self) -> SupportedVersionRange
fn clone(&self) -> SupportedVersionRange
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 SupportedVersionRange
impl Debug for SupportedVersionRange
Source§impl Display for SupportedVersionRange
impl Display for SupportedVersionRange
impl Eq for SupportedVersionRange
Source§impl PartialEq for SupportedVersionRange
impl PartialEq for SupportedVersionRange
impl StructuralPartialEq for SupportedVersionRange
Auto Trait Implementations§
impl Freeze for SupportedVersionRange
impl RefUnwindSafe for SupportedVersionRange
impl Send for SupportedVersionRange
impl Sync for SupportedVersionRange
impl Unpin for SupportedVersionRange
impl UnsafeUnpin for SupportedVersionRange
impl UnwindSafe for SupportedVersionRange
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