#[repr(transparent)]pub struct Repo { /* private fields */ }Implementations
sourceimpl Repo
impl Repo
pub fn new(path: &impl IsA<File>) -> Repo
pub fn new_default() -> Repo
pub fn for_sysroot_path(
repo_path: &impl IsA<File>,
sysroot_path: &impl IsA<File>
) -> Repo
pub fn abort_transaction(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn add_gpg_signature_summary(
&self,
key_id: &[&str],
homedir: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn append_gpg_signature(
&self,
commit_checksum: &str,
signature_bytes: &Bytes,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn checkout_at(
&self,
options: Option<&RepoCheckoutAtOptions>,
destination_dfd: i32,
destination_path: impl AsRef<Path>,
commit: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2016_8 only.pub fn checkout_gc(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn checkout_tree(
&self,
mode: RepoCheckoutMode,
overwrite_mode: RepoCheckoutOverwriteMode,
destination: &impl IsA<File>,
source: &RepoFile,
source_info: &FileInfo,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn commit_transaction(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<RepoTransactionStats, Error>
pub fn copy_config(&self) -> Option<KeyFile>
pub fn create(
&self,
mode: RepoMode,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn delete_object(
&self,
objtype: ObjectType,
sha256: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn equal(&self, b: &Repo) -> bool
v2017_12 only.pub fn fsck_object(
&self,
objtype: ObjectType,
sha256: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2017_15 only.pub fn bootloader(&self) -> Option<GString>
v2019_2 only.pub fn collection_id(&self) -> Option<GString>
v2018_6 only.pub fn config(&self) -> Option<KeyFile>
pub fn default_repo_finders(&self) -> Vec<GString>
v2018_9 only.pub fn dfd(&self) -> i32
v2016_4 only.pub fn is_disable_fsync(&self) -> bool
pub fn min_free_space_bytes(&self) -> Result<u64, Error>
v2018_9 only.pub fn mode(&self) -> RepoMode
pub fn parent(&self) -> Option<Repo>
pub fn path(&self) -> Option<File>
pub fn remote_boolean_option(
&self,
remote_name: &str,
option_name: &str,
default_value: bool
) -> Result<bool, Error>
v2016_5 only.pub fn remote_list_option(
&self,
remote_name: &str,
option_name: &str
) -> Result<Vec<GString>, Error>
v2016_5 only.pub fn remote_option(
&self,
remote_name: &str,
option_name: &str,
default_value: Option<&str>
) -> Result<GString, Error>
v2016_5 only.pub fn gpg_sign_data(
&self,
data: &Bytes,
old_signatures: &Bytes,
key_id: &[&str],
homedir: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Bytes, Error>
v2020_8 only.pub fn gpg_verify_data(
&self,
remote_name: Option<&str>,
data: &Bytes,
signatures: &Bytes,
keyringdir: Option<&impl IsA<File>>,
extra_keyring: Option<&impl IsA<File>>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GpgVerifyResult, Error>
v2016_6 only.pub fn has_object(
&self,
objtype: ObjectType,
checksum: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<bool, Error>
pub fn hash(&self) -> u32
v2017_12 only.pub fn import_object_from(
&self,
source: &Repo,
objtype: ObjectType,
checksum: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn import_object_from_with_trust(
&self,
source: &Repo,
objtype: ObjectType,
checksum: &str,
trusted: bool,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2016_5 only.pub fn is_system(&self) -> bool
pub fn is_writable(&self) -> Result<(), Error>
pub fn list_static_delta_indexes(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<GString>, Error>
v2020_8 only.pub fn list_static_delta_names(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<GString>, Error>
pub fn load_commit(
&self,
checksum: &str
) -> Result<(Variant, RepoCommitState), Error>
v2015_7 only.pub fn load_object_stream(
&self,
objtype: ObjectType,
checksum: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(InputStream, u64), Error>
pub fn load_variant(
&self,
objtype: ObjectType,
sha256: &str
) -> Result<Variant, Error>
pub fn load_variant_if_exists(
&self,
objtype: ObjectType,
sha256: &str
) -> Result<Option<Variant>, Error>
pub fn mark_commit_partial(
&self,
checksum: &str,
is_partial: bool
) -> Result<(), Error>
v2017_15 only.pub fn mark_commit_partial_reason(
&self,
checksum: &str,
is_partial: bool,
in_state: RepoCommitState
) -> Result<(), Error>
v2019_4 only.pub fn open(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn prepare_transaction(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<bool, Error>
pub fn prune(
&self,
flags: RepoPruneFlags,
depth: i32,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(i32, i32, u64), Error>
pub fn prune_static_deltas(
&self,
commit: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn pull(
&self,
remote_name: &str,
refs_to_fetch: &[&str],
flags: RepoPullFlags,
progress: Option<&AsyncProgress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn pull_one_dir(
&self,
remote_name: &str,
dir_to_pull: &str,
refs_to_fetch: &[&str],
flags: RepoPullFlags,
progress: Option<&AsyncProgress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn pull_with_options(
&self,
remote_name_or_baseurl: &str,
options: &Variant,
progress: Option<&AsyncProgress>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn query_object_storage_size(
&self,
objtype: ObjectType,
sha256: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<u64, Error>
pub fn read_commit(
&self,
ref_: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(File, GString), Error>
pub fn read_commit_detached_metadata(
&self,
checksum: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Option<Variant>, Error>
pub fn regenerate_summary(
&self,
additional_metadata: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn reload_config(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2017_2 only.pub fn remote_add(
&self,
name: &str,
url: Option<&str>,
options: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn remote_change(
&self,
sysroot: Option<&impl IsA<File>>,
changeop: RepoRemoteChange,
name: &str,
url: Option<&str>,
options: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn remote_delete(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn remote_fetch_summary(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(Bytes, Bytes), Error>
pub fn remote_fetch_summary_with_options(
&self,
name: &str,
options: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(Bytes, Bytes), Error>
v2016_6 only.pub fn remote_get_gpg_keys(
&self,
name: Option<&str>,
key_ids: &[&str],
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Vec<Variant>, Error>
v2021_4 only.pub fn remote_get_gpg_verify(&self, name: &str) -> Result<bool, Error>
pub fn remote_get_gpg_verify_summary(&self, name: &str) -> Result<bool, Error>
pub fn remote_get_url(&self, name: &str) -> Result<GString, Error>
pub fn remote_gpg_import(
&self,
name: &str,
source_stream: Option<&impl IsA<InputStream>>,
key_ids: &[&str],
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<u32, Error>
pub fn remote_list(&self) -> Vec<GString>
pub fn resolve_collection_ref(
&self,
ref_: &CollectionRef,
allow_noent: bool,
flags: RepoResolveRevExtFlags,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Option<GString>, Error>
v2018_6 only.pub fn resolve_keyring_for_collection(
&self,
collection_id: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Remote, Error>
v2018_6 only.pub fn resolve_rev(
&self,
refspec: &str,
allow_noent: bool
) -> Result<Option<GString>, Error>
pub fn resolve_rev_ext(
&self,
refspec: &str,
allow_noent: bool,
flags: RepoResolveRevExtFlags
) -> Result<Option<GString>, Error>
v2016_7 only.pub fn scan_hardlinks(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn set_alias_ref_immediate(
&self,
remote: Option<&str>,
ref_: &str,
target: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2017_10 only.pub fn set_cache_dir(
&self,
dfd: i32,
path: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2016_5 only.pub fn set_collection_id(&self, collection_id: Option<&str>) -> Result<(), Error>
v2018_6 only.pub fn set_collection_ref_immediate(
&self,
ref_: &CollectionRef,
checksum: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2018_6 only.pub fn set_disable_fsync(&self, disable_fsync: bool)
pub fn set_ref_immediate(
&self,
remote: Option<&str>,
ref_: &str,
checksum: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn sign_commit(
&self,
commit_checksum: &str,
key_id: &str,
homedir: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn sign_delta(
&self,
from_commit: &str,
to_commit: &str,
key_id: &str,
homedir: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn signature_verify_commit_data(
&self,
remote_name: &str,
commit_data: &Bytes,
commit_metadata: &Bytes,
flags: RepoVerifyFlags
) -> Result<Option<GString>, Error>
v2021_4 only.pub fn static_delta_execute_offline(
&self,
dir_or_file: &impl IsA<File>,
skip_validation: bool,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn static_delta_execute_offline_with_signature(
&self,
dir_or_file: &impl IsA<File>,
sign: &impl IsA<Sign>,
skip_validation: bool,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
v2020_7 only.pub fn static_delta_generate(
&self,
opt: StaticDeltaGenerateOpt,
from: Option<&str>,
to: &str,
metadata: Option<&Variant>,
params: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn static_delta_verify_signature(
&self,
delta_id: &str,
sign: &impl IsA<Sign>
) -> Result<Option<GString>, Error>
v2020_7 only.pub fn transaction_set_collection_ref(
&self,
ref_: &CollectionRef,
checksum: Option<&str>
)
v2018_6 only.pub fn transaction_set_ref(
&self,
remote: Option<&str>,
ref_: &str,
checksum: Option<&str>
)
pub fn transaction_set_refspec(&self, refspec: &str, checksum: Option<&str>)
pub fn verify_commit(
&self,
commit_checksum: &str,
keyringdir: Option<&impl IsA<File>>,
extra_keyring: Option<&impl IsA<File>>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn verify_commit_ext(
&self,
commit_checksum: &str,
keyringdir: Option<&impl IsA<File>>,
extra_keyring: Option<&impl IsA<File>>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GpgVerifyResult, Error>
pub fn verify_commit_for_remote(
&self,
commit_checksum: &str,
remote_name: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GpgVerifyResult, Error>
v2016_14 only.pub fn verify_summary(
&self,
remote_name: &str,
summary: &Bytes,
signatures: &Bytes,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GpgVerifyResult, Error>
pub fn write_archive_to_mtree(
&self,
archive: &impl IsA<File>,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
autocreate_parents: bool,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_archive_to_mtree_from_fd(
&self,
fd: i32,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
autocreate_parents: bool,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_commit(
&self,
parent: Option<&str>,
subject: Option<&str>,
body: Option<&str>,
metadata: Option<&Variant>,
root: &RepoFile,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GString, Error>
pub fn write_commit_detached_metadata(
&self,
checksum: &str,
metadata: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_commit_with_time(
&self,
parent: Option<&str>,
subject: Option<&str>,
body: Option<&str>,
metadata: Option<&Variant>,
root: &RepoFile,
time: u64,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GString, Error>
pub fn write_config(&self, new_config: &KeyFile) -> Result<(), Error>
pub fn write_content_trusted(
&self,
checksum: &str,
object_input: &impl IsA<InputStream>,
length: u64,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_dfd_to_mtree(
&self,
dfd: i32,
path: &str,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_directory_to_mtree(
&self,
dir: &impl IsA<File>,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_metadata_stream_trusted(
&self,
objtype: ObjectType,
checksum: &str,
object_input: &impl IsA<InputStream>,
length: u64,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_metadata_trusted(
&self,
objtype: ObjectType,
checksum: &str,
variant: &Variant,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
pub fn write_mtree(
&self,
mtree: &MutableTree,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<File, Error>
pub fn write_regfile(
&self,
expected_checksum: Option<&str>,
uid: u32,
gid: u32,
mode: u32,
content_len: u64,
xattrs: Option<&Variant>
) -> Result<ContentWriter, Error>
v2021_2 only.pub fn write_regfile_inline(
&self,
expected_checksum: Option<&str>,
uid: u32,
gid: u32,
mode: u32,
xattrs: Option<&Variant>,
buf: &[u8],
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GString, Error>
v2021_2 only.pub fn write_symlink(
&self,
expected_checksum: Option<&str>,
uid: u32,
gid: u32,
xattrs: Option<&Variant>,
symlink_target: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<GString, Error>
v2021_2 only.pub fn remotes_config_dir(&self) -> Option<GString>
pub fn sysroot_path(&self) -> Option<File>
pub fn create_at(
dfd: i32,
path: &str,
mode: RepoMode,
options: Option<&Variant>,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Repo, Error>
v2017_10 only.pub fn mode_from_string(mode: &str) -> Result<RepoMode, Error>
pub fn open_at(
dfd: i32,
path: &str,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Repo, Error>
v2017_10 only.pub fn connect_gpg_verify_result<F: Fn(&Self, &str, &GpgVerifyResult) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
sourceimpl Repo
impl Repo
sourcepub fn new_for_path<P: AsRef<Path>>(path: P) -> Repo
pub fn new_for_path<P: AsRef<Path>>(path: P) -> Repo
Create a new Repo object for working with an OSTree repo at the given path.
sourcepub fn auto_transaction<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<TransactionGuard<'_>, Error>
pub fn auto_transaction<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<TransactionGuard<'_>, Error>
A wrapper for [prepare_transaction] which ensures the transaction will be aborted when the guard goes out of scope.
sourcepub fn dfd_as_file(&self) -> Result<File>
Available on crate feature v2016_4 only.
pub fn dfd_as_file(&self) -> Result<File>
v2016_4 only.Return a copy of the directory file descriptor for this repository.
sourcepub fn traverse_commit<P: IsA<Cancellable>>(
&self,
commit_checksum: &str,
maxdepth: i32,
cancellable: Option<&P>
) -> Result<HashSet<ObjectName>, Error>
pub fn traverse_commit<P: IsA<Cancellable>>(
&self,
commit_checksum: &str,
maxdepth: i32,
cancellable: Option<&P>
) -> Result<HashSet<ObjectName>, Error>
Find all objects reachable from a commit.
sourcepub fn list_refs<P: IsA<Cancellable>>(
&self,
refspec_prefix: Option<&str>,
cancellable: Option<&P>
) -> Result<HashMap<String, String>, Error>
pub fn list_refs<P: IsA<Cancellable>>(
&self,
refspec_prefix: Option<&str>,
cancellable: Option<&P>
) -> Result<HashMap<String, String>, Error>
List all branch names (refs).
sourcepub fn list_objects<P: IsA<Cancellable>>(
&self,
flags: OstreeRepoListObjectsFlags,
cancellable: Option<&P>
) -> Result<HashMap<ObjectName, ObjectDetails>, Error>
pub fn list_objects<P: IsA<Cancellable>>(
&self,
flags: OstreeRepoListObjectsFlags,
cancellable: Option<&P>
) -> Result<HashMap<ObjectName, ObjectDetails>, Error>
List all repo objects
sourcepub fn list_refs_ext<P: IsA<Cancellable>>(
&self,
refspec_prefix: Option<&str>,
flags: RepoListRefsExtFlags,
cancellable: Option<&P>
) -> Result<HashMap<String, String>, Error>
pub fn list_refs_ext<P: IsA<Cancellable>>(
&self,
refspec_prefix: Option<&str>,
flags: RepoListRefsExtFlags,
cancellable: Option<&P>
) -> Result<HashMap<String, String>, Error>
List refs with extended options.
sourcepub fn require_rev(&self, refspec: &str) -> Result<GString, Error>
pub fn require_rev(&self, refspec: &str) -> Result<GString, Error>
Resolve a refspec to a commit SHA256. Returns an error if the refspec does not exist.
sourcepub fn load_file<P: IsA<Cancellable>>(
&self,
checksum: &str,
cancellable: Option<&P>
) -> Result<(Option<InputStream>, FileInfo, Variant), Error>
pub fn load_file<P: IsA<Cancellable>>(
&self,
checksum: &str,
cancellable: Option<&P>
) -> Result<(Option<InputStream>, FileInfo, Variant), Error>
Load the contents (for regular files) and metadata for a content object.
sourcepub fn query_file<P: IsA<Cancellable>>(
&self,
checksum: &str,
cancellable: Option<&P>
) -> Result<(FileInfo, Variant), Error>
pub fn query_file<P: IsA<Cancellable>>(
&self,
checksum: &str,
cancellable: Option<&P>
) -> Result<(FileInfo, Variant), Error>
Query metadata for a content object.
This is similar to [load_file], but is more efficient if reading the file content is not needed.
sourcepub fn write_content<P: IsA<InputStream>, Q: IsA<Cancellable>>(
&self,
expected_checksum: Option<&str>,
object_input: &P,
length: u64,
cancellable: Option<&Q>
) -> Result<Checksum, Error>
pub fn write_content<P: IsA<InputStream>, Q: IsA<Cancellable>>(
&self,
expected_checksum: Option<&str>,
object_input: &P,
length: u64,
cancellable: Option<&Q>
) -> Result<Checksum, Error>
Write a content object from provided input.
sourcepub fn write_metadata<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
expected_checksum: Option<&str>,
object: &Variant,
cancellable: Option<&P>
) -> Result<Checksum, Error>
pub fn write_metadata<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
expected_checksum: Option<&str>,
object: &Variant,
cancellable: Option<&P>
) -> Result<Checksum, Error>
Write a metadata object.
sourcepub fn write_content_async<P: IsA<InputStream>, Q: IsA<Cancellable>, R: FnOnce(Result<Checksum, Error>) + Send + 'static>(
&self,
expected_checksum: Option<&str>,
object: &P,
length: u64,
cancellable: Option<&Q>,
callback: R
)
pub fn write_content_async<P: IsA<InputStream>, Q: IsA<Cancellable>, R: FnOnce(Result<Checksum, Error>) + Send + 'static>(
&self,
expected_checksum: Option<&str>,
object: &P,
length: u64,
cancellable: Option<&Q>,
callback: R
)
Asynchronously write a content object.
sourcepub fn write_content_async_future<P: IsA<InputStream> + Clone + 'static>(
&self,
expected_checksum: Option<&str>,
object: &P,
length: u64
) -> Pin<Box<dyn Future<Output = Result<Checksum, Error>> + 'static>>
pub fn write_content_async_future<P: IsA<InputStream> + Clone + 'static>(
&self,
expected_checksum: Option<&str>,
object: &P,
length: u64
) -> Pin<Box<dyn Future<Output = Result<Checksum, Error>> + 'static>>
Asynchronously write a content object.
sourcepub fn write_metadata_async<P: IsA<Cancellable>, Q: FnOnce(Result<Checksum, Error>) + Send + 'static>(
&self,
objtype: ObjectType,
expected_checksum: Option<&str>,
object: &Variant,
cancellable: Option<&P>,
callback: Q
)
pub fn write_metadata_async<P: IsA<Cancellable>, Q: FnOnce(Result<Checksum, Error>) + Send + 'static>(
&self,
objtype: ObjectType,
expected_checksum: Option<&str>,
object: &Variant,
cancellable: Option<&P>,
callback: Q
)
Asynchronously write a metadata object.
sourcepub fn write_metadata_async_future(
&self,
objtype: ObjectType,
expected_checksum: Option<&str>,
object: &Variant
) -> Pin<Box<dyn Future<Output = Result<Checksum, Error>> + 'static>>
pub fn write_metadata_async_future(
&self,
objtype: ObjectType,
expected_checksum: Option<&str>,
object: &Variant
) -> Pin<Box<dyn Future<Output = Result<Checksum, Error>> + 'static>>
Asynchronously write a metadata object.
sourcepub fn read_dirmeta(&self, checksum: &str) -> Result<DirMetaParsed, Error>
pub fn read_dirmeta(&self, checksum: &str) -> Result<DirMetaParsed, Error>
Load and parse directory metadata. In particular, uid/gid/mode are stored in big-endian format; this function converts them to host native endianness.
Trait Implementations
sourceimpl Ord for Repo
impl Ord for Repo
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl ParentClassIs for Repo
impl ParentClassIs for Repo
sourceimpl<OT: ObjectType> PartialOrd<OT> for Repo
impl<OT: ObjectType> PartialOrd<OT> for Repo
sourcefn partial_cmp(&self, other: &OT) -> Option<Ordering>
fn partial_cmp(&self, other: &OT) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresourceimpl StaticType for Repo
impl StaticType for Repo
sourcefn static_type() -> Type
fn static_type() -> Type
Self.impl Eq for Repo
impl Send for Repo
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
sourcefn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moresourcefn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T. Read moresourcefn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
T. Read moresourcefn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
T. Read moresourcefn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moresourcefn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast and upcast will do many checks at compile-time already. Read moresourceunsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T unconditionally. Read moresourceunsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T unconditionally. Read moresourceimpl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)where
T: ObjectSubclass,
<U as ParentClassIs>::Parent: IsSubclassable<T>,
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)where
T: ObjectSubclass,
<U as ParentClassIs>::Parent: IsSubclassable<T>,
sourceimpl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
sourcefn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true if the object is an instance of (can be cast to) T.sourcefn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass of the object. Read moresourcefn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T. Read moresourcefn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T of the object. Read moresourcefn set_property<V>(&self, property_name: &str, value: V)where
V: ToValue,
fn set_property<V>(&self, property_name: &str, value: V)where
V: ToValue,
sourcefn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
sourcefn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
sourcefn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
sourcefn property<V>(&self, property_name: &str) -> Vwhere
V: 'static + for<'b> FromValue<'b>,
fn property<V>(&self, property_name: &str) -> Vwhere
V: 'static + for<'b> FromValue<'b>,
property_name of the object and cast it to the type V. Read moresourcefn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name of the object. Read moresourcefn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name of this object. Read moresourcefn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec of the property property_name of this object.sourcefn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec of the properties of this object.sourcefn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
sourceunsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key. Read moresourceunsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moresourceunsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key. Read moresourceunsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key. Read moresourceunsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key. Read moresourceunsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key. Read moresourcefn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
sourcefn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
sourcefn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
sourcefn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
sourcefn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
signal_name on this object. Read moresourcefn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
signal_id on this object. Read moresourcefn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value>,
fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value>,
signal_name on this object. Read moresourcefn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value>,
fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: 'static + Fn(&[Value]) -> Option<Value>,
signal_id on this object. Read moresourceunsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
signal_name on this object. Read moresourceunsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
signal_id on this object. Read moresourcefn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure
) -> SignalHandlerId
fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure
) -> SignalHandlerId
signal_name on this object. Read moresourcefn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure
) -> SignalHandlerId
fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure
) -> SignalHandlerId
signal_id on this object. Read moresourcefn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values, or
invoke when using Rust closures. Read moresourcefn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
sourcefn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit but takes Value for the arguments.sourcefn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
sourcefn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value]
) -> Option<Value>
fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value]
) -> Option<Value>
sourcefn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
sourcefn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value]
) -> Option<Value>
fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value]
) -> Option<Value>
sourcefn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
sourcefn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value]
) -> Option<Value>
fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value]
) -> Option<Value>
sourcefn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
sourcefn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
notify signal of the object. Read moresourcefn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: 'static + Fn(&T, &ParamSpec),
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: 'static + Fn(&T, &ParamSpec),
notify signal of the object. Read moresourceunsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec),
notify signal of the object. Read moresourcefn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
sourcefn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
sourcefn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where
F: 'static + FnOnce() + Send,
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where
F: 'static + FnOnce() + Send,
sourcefn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: 'static + FnOnce(),
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: 'static + FnOnce(),
sourcefn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
sourceunsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
sourceimpl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
sourceimpl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue clone of self.