Struct git_repository::open::Options
source · [−]pub struct Options { /* private fields */ }
Expand description
The options used in ThreadSafeRepository::open_opts
Implementations
sourceimpl Options
impl Options
Builder methods
sourcepub fn object_store_slots(self, slots: Slots) -> Self
pub fn object_store_slots(self, slots: Slots) -> Self
Set the amount of slots to use for the object database. It’s a value that doesn’t need changes on the client, typically, but should be controlled on the server.
sourcepub fn replacement_objects(self, config: ReplacementObjects) -> Self
pub fn replacement_objects(self, config: ReplacementObjects) -> Self
Configure replacement objects, see the ReplacementObjects
type for details.
sourcepub fn permissions(self, permissions: Permissions) -> Self
pub fn permissions(self, permissions: Permissions) -> Self
Set the given permissions, which are typically derived by a Trust
level.
sourcepub fn with(self, trust: Trust) -> Self
pub fn with(self, trust: Trust) -> Self
Set the trust level of the .git
directory we are about to open.
This can be set manually to force trust even though otherwise it might not be fully trusted, leading to limitations in how configuration files are interpreted.
If not called explicitly, it will be determined by looking at its
ownership via git_sec::Trust::from_path_ownership()
.
sourcepub fn filter_config_section(self, filter: fn(_: &Metadata) -> bool) -> Self
pub fn filter_config_section(self, filter: fn(_: &Metadata) -> bool) -> Self
Set the filter which determines if a configuration section can be used to read values from, hence it returns true if it is eligible.
The default filter selects sections whose trust level is full
or
whose source is not repository-local
.
sourcepub fn lossy_config(self, toggle: bool) -> Self
pub fn lossy_config(self, toggle: bool) -> Self
By default, in release mode configuration will be read without retaining non-essential information like comments or whitespace to optimize lookup performance.
Some application might want to toggle this to false in they want to display or edit configuration losslessly.
Trait Implementations
sourceimpl DefaultForLevel for Options
impl DefaultForLevel for Options
sourcefn default_for_level(level: Trust) -> Self
fn default_for_level(level: Trust) -> Self
Produce a default value for the given trust level
.
Auto Trait Implementations
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more