Skip to main content

TreePushOptions

Struct TreePushOptions 

Source
pub struct TreePushOptions {
Show 13 fields pub onto: Ref, pub tags: Vec<Ref>, pub bind_refs: Vec<String>, pub orphan: bool, pub collection: Option<String>, pub subject: Option<String>, pub body: Option<String>, pub metadata: Vec<(String, Value)>, pub timestamp: Option<u64>, pub compression: Compression, pub entry_filter: Option<EntryFilter>, pub hash_jobs: Option<usize>, pub progress: Option<PushProgress>,
}
Expand description

The options of a tree push.

push_tree, push_tree_prepared, and push_tree_over_stream take them. The struct carries no #[non_exhaustive]. A caller builds it with ..Default::default(). The default branch is the local ref with an empty name, which the push refuses, so a caller sets onto.

Fields§

§onto: Ref

The branch of the server that the server moves to the new commit: a local ref NAME, or a ref @ID:NAME of the collection ID.

The parent of the commit is the commit of the branch on the server when the server writes the commit. If the branch is absent, the commit has no parent.

§tags: Vec<Ref>

The tags that the server creates at the new commit, in order.

A tag is a local ref NAME or a ref @ID:NAME. The branch and each tag are in one namespace of the server. A tag that exists on the server refuses the push.

§bind_refs: Vec<String>

The names that the commit binds and that get no ref, in order.

Each name is a plain ref name. The ostree.ref-binding of the commit holds the name part of the branch and of each tag, and each of these names.

§orphan: bool

The switch that makes a commit with no parent.

On a branch that exists, the server allows it only for a client that can also delete the branch.

§collection: Option<String>

The collection id that a plain branch and each plain tag take.

With Some(ID), a plain branch or tag NAME is the ref @ID:NAME. A branch or tag @ID:NAME stays, and a branch or tag @Y:NAME, with Y other than ID, refuses the push before the scan. The collection does not change bind_refs. The server writes the refs of its own collection id as its local refs.

§subject: Option<String>

The subject of the commit, empty if not set.

§body: Option<String>

The body of the commit, empty if not set.

§metadata: Vec<(String, Value)>

The entries of the a{sv} metadata dict of the commit, in order.

Each value is a variant. The server writes the bindings after the entries.

§timestamp: Option<u64>

The timestamp of the commit, in seconds since the Unix epoch, UTC.

If this field is not set, the server takes its clock. The push reads no environment variable.

§compression: Compression

The encoding of the content objects.

§entry_filter: Option<EntryFilter>

The filter that sees each entry of the walk.

§hash_jobs: Option<usize>

The maximum number of regular files that the hash pass reads at one time.

ScanOptions::hash_jobs gives the default and the limits.

§progress: Option<PushProgress>

The progress handle of the scan and of the session.

The scan sets its phases in the handle, and the session counts its progress into it.

Trait Implementations§

Source§

impl Default for TreePushOptions

Source§

fn default() -> TreePushOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more