Struct ostree::RepoFile [−][src]
pub struct RepoFile(_);
Implementations
pub fn tree_query_child<P: IsA<Cancellable>>(
&self,
n: i32,
attributes: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<FileInfo, Error>
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for RepoFile
impl UnwindSafe for RepoFile
Blanket Implementations
Mutably borrows from an owned value. Read more
Upcasts an object to a superclass or interface T
. Read more
Upcasts an object to a reference of its superclass or interface T
. Read more
Tries to downcast to a subclass or interface implementor T
. Read more
Tries to downcast to a reference of its subclass or interface implementor T
. Read more
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
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
Casts to T
unconditionally. Read more
Casts to &T
unconditionally. Read more
pub fn append_to<P>(
&self,
flags: FileCreateFlags,
cancellable: Option<&P>
) -> Result<FileOutputStream, Error> where
P: IsA<Cancellable>,
pub fn append_to_async<P, Q>(
&self,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileOutputStream, Error>) + Send,
pub fn append_to_async_future(
&self,
flags: FileCreateFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileOutputStream, Error>> + 'static, Global>>
pub fn copy<P, Q>(
&self,
destination: &P,
flags: FileCopyFlags,
cancellable: Option<&Q>,
progress_callback: Option<&mut dyn FnMut(i64, i64)>
) -> Result<(), Error> where
P: IsA<File>,
Q: IsA<Cancellable>,
pub fn copy_attributes<P, Q>(
&self,
destination: &P,
flags: FileCopyFlags,
cancellable: Option<&Q>
) -> Result<(), Error> where
P: IsA<File>,
Q: IsA<Cancellable>,
pub fn create<P>(
&self,
flags: FileCreateFlags,
cancellable: Option<&P>
) -> Result<FileOutputStream, Error> where
P: IsA<Cancellable>,
pub fn create_async<P, Q>(
&self,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileOutputStream, Error>) + Send,
pub fn create_async_future(
&self,
flags: FileCreateFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileOutputStream, Error>> + 'static, Global>>
pub fn create_readwrite<P>(
&self,
flags: FileCreateFlags,
cancellable: Option<&P>
) -> Result<FileIOStream, Error> where
P: IsA<Cancellable>,
pub fn create_readwrite_async<P, Q>(
&self,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileIOStream, Error>) + Send,
pub fn create_readwrite_async_future(
&self,
flags: FileCreateFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileIOStream, Error>> + 'static, Global>>
pub fn delete_async<P, Q>(
&self,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
pub fn delete_async_future(
&self,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
pub fn eject_mountable_with_operation<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn eject_mountable_with_operation_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn enumerate_children<P>(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<FileEnumerator, Error> where
P: IsA<Cancellable>,
pub fn find_enclosing_mount<P>(
&self,
cancellable: Option<&P>
) -> Result<Mount, Error> where
P: IsA<Cancellable>,
pub fn load_contents<P>(
&self,
cancellable: Option<&P>
) -> Result<(Vec<u8, Global>, Option<GString>), Error> where
P: IsA<Cancellable>,
pub fn load_contents_async<P, Q>(&self, cancellable: Option<&P>, callback: Q) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(Vec<u8, Global>, Option<GString>), Error>) + Send,
pub fn load_contents_async_future(
&self
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8, Global>, Option<GString>), Error>> + 'static, Global>>
pub fn make_directory<P>(&self, cancellable: Option<&P>) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn make_directory_async<P, Q>(
&self,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
pub fn make_directory_async_future(
&self,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
pub fn make_directory_with_parents<P>(
&self,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn make_symbolic_link<P, Q>(
&self,
symlink_value: P,
cancellable: Option<&Q>
) -> Result<(), Error> where
P: AsRef<Path>,
Q: IsA<Cancellable>,
pub fn measure_disk_usage<P>(
&self,
flags: FileMeasureFlags,
cancellable: Option<&P>,
progress_callback: Option<Box<dyn Fn(bool, u64, u64, u64) + 'static, Global>>
) -> Result<(u64, u64, u64), Error> where
P: IsA<Cancellable>,
pub fn monitor<P>(
&self,
flags: FileMonitorFlags,
cancellable: Option<&P>
) -> Result<FileMonitor, Error> where
P: IsA<Cancellable>,
pub fn monitor_directory<P>(
&self,
flags: FileMonitorFlags,
cancellable: Option<&P>
) -> Result<FileMonitor, Error> where
P: IsA<Cancellable>,
pub fn monitor_file<P>(
&self,
flags: FileMonitorFlags,
cancellable: Option<&P>
) -> Result<FileMonitor, Error> where
P: IsA<Cancellable>,
pub fn mount_enclosing_volume<P, Q, R>(
&self,
flags: MountMountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn mount_enclosing_volume_future<P>(
&self,
flags: MountMountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn mount_mountable<P, Q, R>(
&self,
flags: MountMountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<File, Error>) + Send,
pub fn mount_mountable_future<P>(
&self,
flags: MountMountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<File, Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn move_<P, Q>(
&self,
destination: &P,
flags: FileCopyFlags,
cancellable: Option<&Q>,
progress_callback: Option<&mut dyn FnMut(i64, i64)>
) -> Result<(), Error> where
P: IsA<File>,
Q: IsA<Cancellable>,
pub fn open_readwrite<P>(
&self,
cancellable: Option<&P>
) -> Result<FileIOStream, Error> where
P: IsA<Cancellable>,
pub fn open_readwrite_async<P, Q>(
&self,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileIOStream, Error>) + Send,
pub fn open_readwrite_async_future(
&self,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileIOStream, Error>> + 'static, Global>>
pub fn poll_mountable<P, Q>(&self, cancellable: Option<&P>, callback: Q) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
pub fn poll_mountable_future(
&self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
pub fn query_default_handler<P>(
&self,
cancellable: Option<&P>
) -> Result<AppInfo, Error> where
P: IsA<Cancellable>,
pub fn query_file_type<P>(
&self,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> FileType where
P: IsA<Cancellable>,
pub fn query_filesystem_info<P>(
&self,
attributes: &str,
cancellable: Option<&P>
) -> Result<FileInfo, Error> where
P: IsA<Cancellable>,
pub fn query_filesystem_info_async<P, Q>(
&self,
attributes: &str,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileInfo, Error>) + Send,
pub fn query_filesystem_info_async_future(
&self,
attributes: &str,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileInfo, Error>> + 'static, Global>>
pub fn query_info<P>(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<FileInfo, Error> where
P: IsA<Cancellable>,
pub fn query_info_async<P, Q>(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileInfo, Error>) + Send,
pub fn query_info_async_future(
&self,
attributes: &str,
flags: FileQueryInfoFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileInfo, Error>> + 'static, Global>>
pub fn read<P>(&self, cancellable: Option<&P>) -> Result<FileInputStream, Error> where
P: IsA<Cancellable>,
pub fn read_async<P, Q>(
&self,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileInputStream, Error>) + Send,
pub fn read_async_future(
&self,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileInputStream, Error>> + 'static, Global>>
pub fn replace<P>(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&P>
) -> Result<FileOutputStream, Error> where
P: IsA<Cancellable>,
pub fn replace_async<P, Q>(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileOutputStream, Error>) + Send,
pub fn replace_async_future(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileOutputStream, Error>> + 'static, Global>>
pub fn replace_contents<P>(
&self,
contents: &[u8],
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&P>
) -> Result<Option<GString>, Error> where
P: IsA<Cancellable>,
pub fn replace_readwrite<P>(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&P>
) -> Result<FileIOStream, Error> where
P: IsA<Cancellable>,
pub fn replace_readwrite_async<P, Q>(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileIOStream, Error>) + Send,
pub fn replace_readwrite_async_future(
&self,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileIOStream, Error>> + 'static, Global>>
pub fn set_attribute_byte_string<P>(
&self,
attribute: &str,
value: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_attribute_int32<P>(
&self,
attribute: &str,
value: i32,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_attribute_int64<P>(
&self,
attribute: &str,
value: i64,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_attribute_string<P>(
&self,
attribute: &str,
value: &str,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_attribute_uint32<P>(
&self,
attribute: &str,
value: u32,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_attribute_uint64<P>(
&self,
attribute: &str,
value: u64,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_attributes_async<P, Q>(
&self,
info: &FileInfo,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileInfo, Error>) + Send,
pub fn set_attributes_async_future(
&self,
info: &FileInfo,
flags: FileQueryInfoFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileInfo, Error>> + 'static, Global>>
pub fn set_attributes_from_info<P>(
&self,
info: &FileInfo,
flags: FileQueryInfoFlags,
cancellable: Option<&P>
) -> Result<(), Error> where
P: IsA<Cancellable>,
pub fn set_display_name<P>(
&self,
display_name: &str,
cancellable: Option<&P>
) -> Result<File, Error> where
P: IsA<Cancellable>,
pub fn set_display_name_async<P, Q>(
&self,
display_name: &str,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<File, Error>) + Send,
pub fn set_display_name_async_future(
&self,
display_name: &str,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<File, Error>> + 'static, Global>>
pub fn start_mountable<P, Q, R>(
&self,
flags: DriveStartFlags,
start_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn start_mountable_future<P>(
&self,
flags: DriveStartFlags,
start_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn stop_mountable<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn stop_mountable_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn trash_async<P, Q>(
&self,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<(), Error>) + Send,
pub fn trash_async_future(
&self,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>>
pub fn unmount_mountable_with_operation<P, Q, R>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>,
cancellable: Option<&Q>,
callback: R
) where
P: IsA<MountOperation>,
Q: IsA<Cancellable>,
R: 'static + FnOnce(Result<(), Error>) + Send,
pub fn unmount_mountable_with_operation_future<P>(
&self,
flags: MountUnmountFlags,
mount_operation: Option<&P>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static, Global>> where
P: 'static + IsA<MountOperation> + Clone,
pub fn replace_contents_async<B, R, C>(
&self,
contents: B,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags,
cancellable: Option<&C>,
callback: R
) where
C: IsA<Cancellable>,
R: 'static + FnOnce(Result<(B, GString), (B, Error)>) + Send,
B: 'static + AsRef<[u8]> + Send,
pub fn replace_contents_async_future<B>(
&self,
contents: B,
etag: Option<&str>,
make_backup: bool,
flags: FileCreateFlags
) -> Pin<Box<dyn Future<Output = Result<(B, GString), (B, Error)>> + 'static, Global>> where
B: 'static + AsRef<[u8]> + Send,
pub fn enumerate_children_async<P, Q>(
&self,
attributes: &'static str,
flags: FileQueryInfoFlags,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
) where
P: IsA<Cancellable>,
Q: 'static + FnOnce(Result<FileEnumerator, Error>) + Send,
pub fn enumerate_children_async_future(
&self,
attributes: &'static str,
flags: FileQueryInfoFlags,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<FileEnumerator, Error>> + 'static, Global>>
Returns true
if the object is an instance of (can be cast to) T
.
pub fn set_property<'a, N, V>(
&self,
property_name: N,
value: V
) -> Result<(), BoolError> where
V: ToValue,
N: Into<&'a str>,
pub fn set_property_from_value<'a, N>(
&self,
property_name: N,
value: &Value
) -> Result<(), BoolError> where
N: Into<&'a str>,
pub fn set_properties_from_value(
&self,
property_values: &[(&str, Value)]
) -> Result<(), BoolError>
pub fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
pub fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
Safety Read more
Safety Read more
Safety Read more
Safety Read more
pub fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
Same as connect
but takes a SignalId
instead of a signal name.
pub fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
Same as connect_local
but takes a SignalId
instead of a signal name.
pub unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
Same as connect_unsafe
but takes a SignalId
instead of a signal name.
Emit signal by signal id.
Same as emit
but takes Value
for the arguments.
Emit signal by its name.
Same as emit_by_name
but takes Value
for the arguments.
Emit signal with details by signal id.
Same as emit_with_details
but takes Value
for the arguments.
pub fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
pub fn connect_notify_local<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec),
pub unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
pub 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>,
Returns a SendValue
clone of self
.