pub struct UpdateOptions<'a> { /* private fields */ }
Expand description
Placeholder update parameters.
Implementations§
Source§impl<'a> UpdateOptions<'a>
impl<'a> UpdateOptions<'a>
Sourcepub fn metadata(self, metadata: Metadata) -> Self
pub fn metadata(self, metadata: Metadata) -> Self
Metadata contains file system metadata about the placeholder to be updated.
File size will be truncates to 0 if not specified, otherwise to the specified size.
Sourcepub fn metadata_all(self, metadata: Metadata) -> Self
pub fn metadata_all(self, metadata: Metadata) -> Self
Fields in Metadata will be updated.
Sourcepub fn dehydrate_ranges(
self,
ranges: impl IntoIterator<Item = Range<u64>>,
) -> Self
pub fn dehydrate_ranges( self, ranges: impl IntoIterator<Item = Range<u64>>, ) -> Self
Extended ranges to be dehydrated.
All the offsets and lengths should be PAGE_SIZE
aligned.
Passing a single range with Offset 0
and Length CF_EOF
will invalidate the entire file.
This has the same effect as passing the flag CF_UPDATE_FLAG_DEHYDRATE
instead
Sourcepub fn update_if_in_sync(self) -> Self
pub fn update_if_in_sync(self) -> Self
The update will fail if the IN_SYNC
attribute is not currently set on the placeholder.
Sourcepub fn mark_in_sync(self) -> Self
pub fn mark_in_sync(self) -> Self
Marks a placeholder as in sync.
See also SetInSyncState, What does “In-Sync” Mean?
Sourcepub fn mark_not_in_sync(self) -> Self
pub fn mark_not_in_sync(self) -> Self
Marks a placeholder as not in sync. Sync Pending
will be shown in explorer.
See also SetInSyncState, What does “In-Sync” Mean?
Sourcepub fn dehydrate(self) -> Self
pub fn dehydrate(self) -> Self
The platform dehydrates the file after updating the placeholder successfully.
Sourcepub fn has_no_children(self) -> Self
pub fn has_no_children(self) -> Self
Disables on-demand population for directories.
Sourcepub fn has_children(self) -> Self
pub fn has_children(self) -> Self
Enable on-demand population for directories.
Sourcepub fn remove_blob(self) -> Self
pub fn remove_blob(self) -> Self
Remove the file identity from the placeholder. UpdateOptions::blob() will be ignored.
Sourcepub fn remove_properties(self) -> Self
pub fn remove_properties(self) -> Self
The platform removes all existing extrinsic properties on the placeholder.
pub fn blob(self, blob: &'a [u8]) -> Self
Trait Implementations§
Source§impl<'a> Clone for UpdateOptions<'a>
impl<'a> Clone for UpdateOptions<'a>
Source§fn clone(&self) -> UpdateOptions<'a>
fn clone(&self) -> UpdateOptions<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more