pub struct RevisionId(/* private fields */);Expand description
Represents a unique identifier for a revision in a version control system.
RevisionId is typically a string in UTF-8 encoding, but is stored as bytes to efficiently handle all possible revision formats across different VCS systems.
Implementations§
Source§impl RevisionId
impl RevisionId
Sourcepub fn is_null(&self) -> bool
pub fn is_null(&self) -> bool
Check if this revision ID is the null revision.
§Returns
true if this is the null revision, false otherwise
Sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
Check if this revision ID is a reserved revision.
Reserved revision IDs start with a colon character.
§Returns
true if this is a reserved revision, false otherwise
Sourcepub fn null() -> RevisionId
pub fn null() -> RevisionId
Trait Implementations§
Source§impl Clone for RevisionId
impl Clone for RevisionId
Source§fn clone(&self) -> RevisionId
fn clone(&self) -> RevisionId
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 RevisionId
impl Debug for RevisionId
Source§impl<'de> Deserialize<'de> for RevisionId
impl<'de> Deserialize<'de> for RevisionId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RevisionId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RevisionId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RevisionId
impl Display for RevisionId
Source§impl From<&[u8]> for RevisionId
impl From<&[u8]> for RevisionId
Source§fn from(value: &[u8]) -> RevisionId
fn from(value: &[u8]) -> RevisionId
Converts to this type from the input type.
Source§impl<'a, 'py> FromPyObject<'a, 'py> for RevisionId
impl<'a, 'py> FromPyObject<'a, 'py> for RevisionId
Source§impl GraphNode for RevisionId
Implement GraphNode for RevisionId
impl GraphNode for RevisionId
Implement GraphNode for RevisionId
Source§impl Hash for RevisionId
impl Hash for RevisionId
Source§impl<'py> IntoPyObject<'py> for RevisionId
impl<'py> IntoPyObject<'py> for RevisionId
Source§type Output = Bound<'py, <RevisionId as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <RevisionId as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a conversion error.
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<RevisionId as IntoPyObject<'py>>::Output, <RevisionId as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<RevisionId as IntoPyObject<'py>>::Output, <RevisionId as IntoPyObject<'py>>::Error>
Performs the conversion.
Source§impl Ord for RevisionId
impl Ord for RevisionId
Source§fn cmp(&self, other: &RevisionId) -> Ordering
fn cmp(&self, other: &RevisionId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RevisionId
impl PartialEq for RevisionId
Source§impl PartialOrd for RevisionId
impl PartialOrd for RevisionId
Source§impl Serialize for RevisionId
impl Serialize for RevisionId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for RevisionId
impl StructuralPartialEq for RevisionId
Auto Trait Implementations§
impl Freeze for RevisionId
impl RefUnwindSafe for RevisionId
impl Send for RevisionId
impl Sync for RevisionId
impl Unpin for RevisionId
impl UnsafeUnpin for RevisionId
impl UnwindSafe for RevisionId
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§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<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
Converts
self into an owned Python object, dropping type information.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.