pub struct ServerCommit {
pub branch: String,
pub tags: Vec<String>,
pub bind_refs: Vec<String>,
pub root_dirtree: Checksum,
pub root_dirmeta: Checksum,
pub subject: String,
pub body: String,
pub metadata: Vec<(String, Vec<u8>)>,
pub timestamp: Option<u64>,
pub orphan: bool,
}Expand description
A commit that the server makes from a tree and the fields that the client
sends, the value of the server-commit key of a Commit.
The value has the type (sasas(ayay)ssa{sv}a{sv}). Its members hold the
fields in the order of this struct. The root dirtree and the root dirmeta
make one (ayay) member. timestamp and
orphan are keys of the last member, a dict of options.
The server reads the tip of the branch under its update lock, and writes
the commit with that tip as its parent. It moves the branch and creates
each tag at the new commit. The CommitReply of a server commit holds
one entry for the branch, then one entry for each tag. The new commit of
each entry is the commit that the server wrote.
Fields§
§branch: StringThe branch that the server moves to the new commit.
The tags that the server creates at the new commit, in order.
bind_refs: Vec<String>The names that the commit binds and that get no ref, in order.
The ostree.ref-binding of the commit holds the branch, each tag, and
each of these names.
root_dirtree: ChecksumThe checksum of the root dirtree of the commit.
root_dirmeta: ChecksumThe checksum of the root dirmeta of the commit.
subject: StringThe subject of the commit.
body: StringThe body of the commit.
metadata: Vec<(String, Vec<u8>)>The metadata entries of the client, in order.
Each entry is a key and the bytes of a v in normal form: the bytes
of the value, a zero byte, and the type signature of the value.
to_bytes with Type::Variant gives
these bytes. The dict is data, and the rules of a protocol dict do not
apply to it: the decoder keeps each entry in order, also a key that
occurs two times. The decoder and the encoder check the bytes of each
entry and build no value tree.
timestamp: Option<u64>The commit time in seconds since the Unix epoch, UTC, under the key
timestamp.
None gives the clock of the server. The encoder writes the key only
if the value is Some.
orphan: boolThe flag that makes a commit with no parent, under the key orphan.
The encoder writes the key only if the value is true, and the
decoder reads an absent key as false.
Trait Implementations§
Source§impl Clone for ServerCommit
impl Clone for ServerCommit
Source§impl Debug for ServerCommit
impl Debug for ServerCommit
impl Eq for ServerCommit
Source§impl PartialEq for ServerCommit
impl PartialEq for ServerCommit
impl StructuralPartialEq for ServerCommit
Auto Trait Implementations§
impl Freeze for ServerCommit
impl RefUnwindSafe for ServerCommit
impl Send for ServerCommit
impl Sync for ServerCommit
impl Unpin for ServerCommit
impl UnsafeUnpin for ServerCommit
impl UnwindSafe for ServerCommit
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
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
key and return true if they are equal.