pub struct ResourceVersion(/* private fields */);Expand description
Version identifier for xDS resources.
ResourceVersion wraps a version string and provides ordering and
comparison operations. An empty version represents the initial state
(no version received yet).
§Example
use xds_core::ResourceVersion;
let v1 = ResourceVersion::new("v1");
let v2 = ResourceVersion::new("v2");
let empty = ResourceVersion::empty();
assert!(!v1.is_empty());
assert!(empty.is_empty());
assert_ne!(v1, v2);Implementations§
Source§impl ResourceVersion
impl ResourceVersion
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume and return the inner string.
Trait Implementations§
Source§impl AsRef<str> for ResourceVersion
impl AsRef<str> for ResourceVersion
Source§impl Clone for ResourceVersion
impl Clone for ResourceVersion
Source§fn clone(&self) -> ResourceVersion
fn clone(&self) -> ResourceVersion
Returns a duplicate of the value. Read more
1.0.0 · 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 ResourceVersion
impl Debug for ResourceVersion
Source§impl Default for ResourceVersion
impl Default for ResourceVersion
Source§fn default() -> ResourceVersion
fn default() -> ResourceVersion
Returns the “default value” for a type. Read more
Source§impl Display for ResourceVersion
impl Display for ResourceVersion
Source§impl From<&str> for ResourceVersion
impl From<&str> for ResourceVersion
Source§impl From<ResourceVersion> for String
impl From<ResourceVersion> for String
Source§fn from(v: ResourceVersion) -> Self
fn from(v: ResourceVersion) -> Self
Converts to this type from the input type.
Source§impl From<String> for ResourceVersion
impl From<String> for ResourceVersion
Source§impl Hash for ResourceVersion
impl Hash for ResourceVersion
Source§impl PartialEq for ResourceVersion
impl PartialEq for ResourceVersion
impl Eq for ResourceVersion
impl StructuralPartialEq for ResourceVersion
Auto Trait Implementations§
impl Freeze for ResourceVersion
impl RefUnwindSafe for ResourceVersion
impl Send for ResourceVersion
impl Sync for ResourceVersion
impl Unpin for ResourceVersion
impl UnsafeUnpin for ResourceVersion
impl UnwindSafe for ResourceVersion
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request