pub struct Lock {
pub id: String,
pub path: String,
pub owner: Option<Owner>,
pub locked_at: String,
}Expand description
A lock record returned by the locking API.
locked_at is an uppercase RFC 3339-formatted timestamp with second
precision per the spec. Carried as a string; parsing into a typed
timestamp is left to callers (avoids pulling in a date/time crate here).
Field order matters for --json output: the upstream test fixtures
grep -E against literal {"id":...,"path":...,"owner":...,"locked_at":...},
and serde’s derived Serialize follows declaration order.
Fields§
§id: StringServer-assigned lock identifier.
path: StringRepo-relative path that’s locked.
owner: Option<Owner>User who holds the lock. Servers may omit when the requester lacks permission to see the owner.
locked_at: StringRFC 3339 timestamp when the lock was created.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lock
impl<'de> Deserialize<'de> for Lock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Lock
impl StructuralPartialEq for Lock
Auto Trait Implementations§
impl Freeze for Lock
impl RefUnwindSafe for Lock
impl Send for Lock
impl Sync for Lock
impl Unpin for Lock
impl UnsafeUnpin for Lock
impl UnwindSafe for Lock
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.