pub struct Repo(_);
Implementations
sourceimpl Repo
impl Repo
pub fn new<P: IsA<File>>(path: &P) -> Repo
pub fn new_default() -> Repo
pub fn for_sysroot_path<P: IsA<File>, Q: IsA<File>>(
repo_path: &P,
sysroot_path: &Q
) -> Repo
pub fn abort_transaction<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn add_gpg_signature_summary<P: IsA<Cancellable>>(
&self,
key_id: &[&str],
homedir: Option<&str>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn append_gpg_signature<P: IsA<Cancellable>>(
&self,
commit_checksum: &str,
signature_bytes: &Bytes,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn checkout_at<P: AsRef<Path>, Q: IsA<Cancellable>>(
&self,
options: Option<&RepoCheckoutAtOptions>,
destination_dfd: i32,
destination_path: P,
commit: &str,
cancellable: Option<&Q>
) -> Result<(), Error>
v2016_8
only.pub fn checkout_gc<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn checkout_tree<P: IsA<File>, Q: IsA<Cancellable>>(
&self,
mode: RepoCheckoutMode,
overwrite_mode: RepoCheckoutOverwriteMode,
destination: &P,
source: &RepoFile,
source_info: &FileInfo,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn commit_transaction<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<RepoTransactionStats, Error>
pub fn copy_config(&self) -> Option<KeyFile>
pub fn create<P: IsA<Cancellable>>(
&self,
mode: RepoMode,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn delete_object<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
sha256: &str,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn equal(&self, b: &Repo) -> bool
v2017_12
only.pub fn fsck_object<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
sha256: &str,
cancellable: Option<&P>
) -> 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<P: IsA<Cancellable>>(
&self,
data: &Bytes,
old_signatures: &Bytes,
key_id: &[&str],
homedir: Option<&str>,
cancellable: Option<&P>
) -> Result<Bytes, Error>
v2020_8
only.pub fn gpg_verify_data<P: IsA<File>, Q: IsA<File>, R: IsA<Cancellable>>(
&self,
remote_name: Option<&str>,
data: &Bytes,
signatures: &Bytes,
keyringdir: Option<&P>,
extra_keyring: Option<&Q>,
cancellable: Option<&R>
) -> Result<GpgVerifyResult, Error>
v2016_6
only.pub fn has_object<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
checksum: &str,
cancellable: Option<&P>
) -> Result<bool, Error>
pub fn hash(&self) -> u32
v2017_12
only.pub fn import_object_from<P: IsA<Cancellable>>(
&self,
source: &Repo,
objtype: ObjectType,
checksum: &str,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn import_object_from_with_trust<P: IsA<Cancellable>>(
&self,
source: &Repo,
objtype: ObjectType,
checksum: &str,
trusted: bool,
cancellable: Option<&P>
) -> Result<(), Error>
v2016_5
only.pub fn is_system(&self) -> bool
pub fn is_writable(&self) -> Result<(), Error>
pub fn list_static_delta_indexes<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<Vec<GString>, Error>
v2020_8
only.pub fn list_static_delta_names<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<Vec<GString>, Error>
pub fn load_commit(
&self,
checksum: &str
) -> Result<(Variant, RepoCommitState), Error>
v2015_7
only.pub fn load_file<P: IsA<Cancellable>>(
&self,
checksum: &str,
cancellable: Option<&P>
) -> Result<(Option<InputStream>, Option<FileInfo>, Option<Variant>), Error>
pub fn load_object_stream<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
checksum: &str,
cancellable: Option<&P>
) -> 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<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn prepare_transaction<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<bool, Error>
pub fn prune<P: IsA<Cancellable>>(
&self,
flags: RepoPruneFlags,
depth: i32,
cancellable: Option<&P>
) -> Result<(i32, i32, u64), Error>
pub fn prune_static_deltas<P: IsA<Cancellable>>(
&self,
commit: Option<&str>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn pull<P: IsA<Cancellable>>(
&self,
remote_name: &str,
refs_to_fetch: &[&str],
flags: RepoPullFlags,
progress: Option<&AsyncProgress>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn pull_one_dir<P: IsA<Cancellable>>(
&self,
remote_name: &str,
dir_to_pull: &str,
refs_to_fetch: &[&str],
flags: RepoPullFlags,
progress: Option<&AsyncProgress>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn pull_with_options<P: IsA<Cancellable>>(
&self,
remote_name_or_baseurl: &str,
options: &Variant,
progress: Option<&AsyncProgress>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn query_object_storage_size<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
sha256: &str,
cancellable: Option<&P>
) -> Result<u64, Error>
pub fn read_commit<P: IsA<Cancellable>>(
&self,
ref_: &str,
cancellable: Option<&P>
) -> Result<(File, GString), Error>
pub fn read_commit_detached_metadata<P: IsA<Cancellable>>(
&self,
checksum: &str,
cancellable: Option<&P>
) -> Result<Option<Variant>, Error>
pub fn regenerate_summary<P: IsA<Cancellable>>(
&self,
additional_metadata: Option<&Variant>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn reload_config<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
v2017_2
only.pub fn remote_add<P: IsA<Cancellable>>(
&self,
name: &str,
url: Option<&str>,
options: Option<&Variant>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn remote_change<P: IsA<File>, Q: IsA<Cancellable>>(
&self,
sysroot: Option<&P>,
changeop: RepoRemoteChange,
name: &str,
url: Option<&str>,
options: Option<&Variant>,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn remote_delete<P: IsA<Cancellable>>(
&self,
name: &str,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn remote_fetch_summary<P: IsA<Cancellable>>(
&self,
name: &str,
cancellable: Option<&P>
) -> Result<(Bytes, Bytes), Error>
pub fn remote_fetch_summary_with_options<P: IsA<Cancellable>>(
&self,
name: &str,
options: Option<&Variant>,
cancellable: Option<&P>
) -> Result<(Bytes, Bytes), Error>
v2016_6
only.pub fn remote_get_gpg_keys<P: IsA<Cancellable>>(
&self,
name: Option<&str>,
key_ids: &[&str],
cancellable: Option<&P>
) -> 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<P: IsA<InputStream>, Q: IsA<Cancellable>>(
&self,
name: &str,
source_stream: Option<&P>,
key_ids: &[&str],
cancellable: Option<&Q>
) -> Result<u32, Error>
pub fn remote_list(&self) -> Vec<GString>
pub fn resolve_collection_ref<P: IsA<Cancellable>>(
&self,
ref_: &CollectionRef,
allow_noent: bool,
flags: RepoResolveRevExtFlags,
cancellable: Option<&P>
) -> Result<Option<GString>, Error>
v2018_6
only.pub fn resolve_keyring_for_collection<P: IsA<Cancellable>>(
&self,
collection_id: &str,
cancellable: Option<&P>
) -> 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<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn set_alias_ref_immediate<P: IsA<Cancellable>>(
&self,
remote: Option<&str>,
ref_: &str,
target: Option<&str>,
cancellable: Option<&P>
) -> Result<(), Error>
v2017_10
only.pub fn set_cache_dir<P: IsA<Cancellable>>(
&self,
dfd: i32,
path: &str,
cancellable: Option<&P>
) -> 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<P: IsA<Cancellable>>(
&self,
ref_: &CollectionRef,
checksum: Option<&str>,
cancellable: Option<&P>
) -> Result<(), Error>
v2018_6
only.pub fn set_disable_fsync(&self, disable_fsync: bool)
pub fn set_ref_immediate<P: IsA<Cancellable>>(
&self,
remote: Option<&str>,
ref_: &str,
checksum: Option<&str>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn sign_commit<P: IsA<Cancellable>>(
&self,
commit_checksum: &str,
key_id: &str,
homedir: Option<&str>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn sign_delta<P: IsA<Cancellable>>(
&self,
from_commit: &str,
to_commit: &str,
key_id: &str,
homedir: &str,
cancellable: Option<&P>
) -> 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<P: IsA<File>, Q: IsA<Cancellable>>(
&self,
dir_or_file: &P,
skip_validation: bool,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn static_delta_execute_offline_with_signature<P: IsA<File>, Q: IsA<Sign>, R: IsA<Cancellable>>(
&self,
dir_or_file: &P,
sign: &Q,
skip_validation: bool,
cancellable: Option<&R>
) -> Result<(), Error>
v2020_7
only.pub fn static_delta_generate<P: IsA<Cancellable>>(
&self,
opt: StaticDeltaGenerateOpt,
from: Option<&str>,
to: &str,
metadata: Option<&Variant>,
params: Option<&Variant>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn static_delta_verify_signature<P: IsA<Sign>>(
&self,
delta_id: &str,
sign: &P
) -> 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<P: IsA<File>, Q: IsA<File>, R: IsA<Cancellable>>(
&self,
commit_checksum: &str,
keyringdir: Option<&P>,
extra_keyring: Option<&Q>,
cancellable: Option<&R>
) -> Result<(), Error>
pub fn verify_commit_ext<P: IsA<File>, Q: IsA<File>, R: IsA<Cancellable>>(
&self,
commit_checksum: &str,
keyringdir: Option<&P>,
extra_keyring: Option<&Q>,
cancellable: Option<&R>
) -> Result<GpgVerifyResult, Error>
pub fn verify_commit_for_remote<P: IsA<Cancellable>>(
&self,
commit_checksum: &str,
remote_name: &str,
cancellable: Option<&P>
) -> Result<GpgVerifyResult, Error>
v2016_14
only.pub fn verify_summary<P: IsA<Cancellable>>(
&self,
remote_name: &str,
summary: &Bytes,
signatures: &Bytes,
cancellable: Option<&P>
) -> Result<GpgVerifyResult, Error>
pub fn write_archive_to_mtree<P: IsA<File>, Q: IsA<Cancellable>>(
&self,
archive: &P,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
autocreate_parents: bool,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn write_archive_to_mtree_from_fd<P: IsA<Cancellable>>(
&self,
fd: i32,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
autocreate_parents: bool,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn write_commit<P: IsA<Cancellable>>(
&self,
parent: Option<&str>,
subject: Option<&str>,
body: Option<&str>,
metadata: Option<&Variant>,
root: &RepoFile,
cancellable: Option<&P>
) -> Result<GString, Error>
pub fn write_commit_detached_metadata<P: IsA<Cancellable>>(
&self,
checksum: &str,
metadata: Option<&Variant>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn write_commit_with_time<P: IsA<Cancellable>>(
&self,
parent: Option<&str>,
subject: Option<&str>,
body: Option<&str>,
metadata: Option<&Variant>,
root: &RepoFile,
time: u64,
cancellable: Option<&P>
) -> Result<GString, Error>
pub fn write_config(&self, new_config: &KeyFile) -> Result<(), Error>
pub fn write_content_trusted<P: IsA<InputStream>, Q: IsA<Cancellable>>(
&self,
checksum: &str,
object_input: &P,
length: u64,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn write_dfd_to_mtree<P: IsA<Cancellable>>(
&self,
dfd: i32,
path: &str,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn write_directory_to_mtree<P: IsA<File>, Q: IsA<Cancellable>>(
&self,
dir: &P,
mtree: &MutableTree,
modifier: Option<&RepoCommitModifier>,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn write_metadata_stream_trusted<P: IsA<InputStream>, Q: IsA<Cancellable>>(
&self,
objtype: ObjectType,
checksum: &str,
object_input: &P,
length: u64,
cancellable: Option<&Q>
) -> Result<(), Error>
pub fn write_metadata_trusted<P: IsA<Cancellable>>(
&self,
objtype: ObjectType,
checksum: &str,
variant: &Variant,
cancellable: Option<&P>
) -> Result<(), Error>
pub fn write_mtree<P: IsA<Cancellable>>(
&self,
mtree: &MutableTree,
cancellable: Option<&P>
) -> 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<P: IsA<Cancellable>>(
&self,
expected_checksum: Option<&str>,
uid: u32,
gid: u32,
mode: u32,
xattrs: Option<&Variant>,
buf: &[u8],
cancellable: Option<&P>
) -> Result<GString, Error>
v2021_2
only.pub fn write_symlink<P: IsA<Cancellable>>(
&self,
expected_checksum: Option<&str>,
uid: u32,
gid: u32,
xattrs: Option<&Variant>,
symlink_target: &str,
cancellable: Option<&P>
) -> 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<P: IsA<Cancellable>>(
dfd: i32,
path: &str,
mode: RepoMode,
options: Option<&Variant>,
cancellable: Option<&P>
) -> Result<Repo, Error>
v2017_10
only.pub fn mode_from_string(mode: &str) -> Result<RepoMode, Error>
pub fn open_at<P: IsA<Cancellable>>(
dfd: i32,
path: &str,
cancellable: Option<&P>
) -> 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>
This is supported 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 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
sourceimpl ParentClassIs for Repo
impl ParentClassIs for Repo
sourceimpl<T: ObjectType> PartialEq<T> for Repo
impl<T: ObjectType> PartialEq<T> for Repo
sourceimpl<T: ObjectType> PartialOrd<T> for Repo
impl<T: ObjectType> PartialOrd<T> for Repo
sourcefn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl StaticType for Repo
impl StaticType for Repo
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Eq for Repo
impl Send for Repo
impl StructuralEq for Repo
Auto Trait Implementations
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
sourceimpl<T> Cast for T where
T: ObjectType,
impl<T> Cast for T where
T: ObjectType,
sourcefn upcast<T>(self) -> T where
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> T where
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a superclass or interface T
. Read more
sourcefn upcast_ref<T>(&self) -> &T where
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &T where
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a reference of its superclass or interface T
. Read more
sourcefn 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>,
Tries to downcast to a subclass or interface implementor T
. Read more
sourcefn 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>,
Tries to downcast to a reference of its subclass or interface implementor T
. Read more
sourcefn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
Tries to cast to an object of type 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 more
sourcefn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
Tries to cast to reference to an object of type 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 more
sourceunsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
Casts to T
unconditionally. Read more
sourceunsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
Casts to &T
unconditionally. Read more
sourceimpl<T> ObjectExt for T where
T: ObjectType,
impl<T> ObjectExt for T where
T: ObjectType,
sourcefn is<U>(&self) -> bool where
U: StaticType,
fn is<U>(&self) -> bool where
U: StaticType,
Returns true
if the object is an instance of (can be cast to) T
.
fn type_(&self) -> Type
fn object_class(&self) -> &Class<Object>
fn class(&self) -> &Class<T> where
T: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>> where
U: IsClass,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>> where
U: IsInterface,
fn set_property<'a, N, V>(
&self,
property_name: N,
value: V
) -> Result<(), BoolError> where
N: Into<&'a str>,
V: ToValue,
fn set_property_from_value<'a, N>(
&self,
property_name: N,
value: &Value
) -> Result<(), BoolError> where
N: Into<&'a str>,
fn set_properties(
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
fn set_properties_from_value(
&self,
property_values: &[(&str, Value)]
) -> Result<(), BoolError>
fn property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
fn property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>,
fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
fn list_properties(&self) -> Vec<ParamSpec, Global>
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
sourceunsafe 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,
Safety Read more
sourceunsafe 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,
Safety Read more
sourceunsafe 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,
Safety Read more
sourceunsafe 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,
Safety Read more
fn block_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn stop_signal_emission(&self, signal_name: &str)
fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
sourcefn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
Same as connect
but takes a SignalId
instead of a signal name.
fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: 'static + Fn(&[Value]) -> Option<Value>,
sourcefn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: 'static + Fn(&[Value]) -> Option<Value>,
fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: 'static + Fn(&[Value]) -> Option<Value>,
Same as connect_local
but takes a SignalId
instead of a signal name.
unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value>,
sourceunsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
Same as connect_unsafe
but takes a SignalId
instead of a signal name.
sourcefn emit(
&self,
signal_id: SignalId,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
fn emit(
&self,
signal_id: SignalId,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
Emit signal by signal id.
sourcefn emit_with_values(
&self,
signal_id: SignalId,
args: &[Value]
) -> Result<Option<Value>, BoolError>
fn emit_with_values(
&self,
signal_id: SignalId,
args: &[Value]
) -> Result<Option<Value>, BoolError>
Same as emit
but takes Value
for the arguments.
sourcefn emit_by_name<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
fn emit_by_name<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
Emit signal by its name.
sourcefn emit_by_name_with_values<'a, N>(
&self,
signal_name: N,
args: &[Value]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
fn emit_by_name_with_values<'a, N>(
&self,
signal_name: N,
args: &[Value]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
Same as emit_by_name
but takes Value
for the arguments.
sourcefn emit_with_details(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
fn emit_with_details(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
Emit signal with details by signal id.
sourcefn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value]
) -> Result<Option<Value>, BoolError>
fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value]
) -> Result<Option<Value>, BoolError>
Same as emit_with_details
but takes Value
for the arguments.
fn disconnect(&self, handler_id: SignalHandlerId)
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>,
fn notify_by_pspec(&self, pspec: &ParamSpec)
fn downgrade(&self) -> WeakRef<T>
fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
O: ObjectType,
N: Into<&'a str>,
M: Into<&'a str>,
fn ref_count(&self) -> u32
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.