Trait cloud_filter::filter::Filter
source · pub trait Filter: Send + Sync {
Show 14 methods
// Required method
fn fetch_data(
&self,
_request: Request,
_ticket: FetchData,
_info: FetchData,
) -> impl Future<Output = CResult<()>>;
// Provided methods
fn cancel_fetch_data(
&self,
_request: Request,
_info: CancelFetchData,
) -> impl Future<Output = ()> { ... }
fn validate_data(
&self,
_request: Request,
_ticket: ValidateData,
_info: ValidateData,
) -> impl Future<Output = CResult<()>> { ... }
fn fetch_placeholders(
&self,
_request: Request,
_ticket: FetchPlaceholders,
_info: FetchPlaceholders,
) -> impl Future<Output = CResult<()>> { ... }
fn cancel_fetch_placeholders(
&self,
_request: Request,
_info: CancelFetchPlaceholders,
) -> impl Future<Output = ()> { ... }
fn opened(
&self,
_request: Request,
_info: Opened,
) -> impl Future<Output = ()> { ... }
fn closed(
&self,
_request: Request,
_info: Closed,
) -> impl Future<Output = ()> { ... }
fn dehydrate(
&self,
_request: Request,
_ticket: Dehydrate,
_info: Dehydrate,
) -> impl Future<Output = CResult<()>> { ... }
fn dehydrated(
&self,
_request: Request,
_info: Dehydrated,
) -> impl Future<Output = ()> { ... }
fn delete(
&self,
_request: Request,
_ticket: Delete,
_info: Delete,
) -> impl Future<Output = CResult<()>> { ... }
fn deleted(
&self,
_request: Request,
_info: Deleted,
) -> impl Future<Output = ()> { ... }
fn rename(
&self,
_request: Request,
_ticket: Rename,
_info: Rename,
) -> impl Future<Output = CResult<()>> { ... }
fn renamed(
&self,
_request: Request,
_info: Renamed,
) -> impl Future<Output = ()> { ... }
fn state_changed(&self, _changes: Vec<PathBuf>) -> impl Future<Output = ()> { ... }
}
Expand description
Required Methods§
Provided Methods§
sourcefn cancel_fetch_data(
&self,
_request: Request,
_info: CancelFetchData,
) -> impl Future<Output = ()>
fn cancel_fetch_data( &self, _request: Request, _info: CancelFetchData, ) -> impl Future<Output = ()>
A placeholder hydration request has been cancelled.
sourcefn validate_data(
&self,
_request: Request,
_ticket: ValidateData,
_info: ValidateData,
) -> impl Future<Output = CResult<()>>
fn validate_data( &self, _request: Request, _ticket: ValidateData, _info: ValidateData, ) -> impl Future<Output = CResult<()>>
Followed by a successful call to Filter::fetch_data, this callback should verify the integrity of the data persisted in the placeholder.
You are responsible for validating the data in the placeholder. To approve the request, use the ticket provided.
Note that this callback is only called if HydrationPolicy::ValidationRequired is specified.
sourcefn fetch_placeholders(
&self,
_request: Request,
_ticket: FetchPlaceholders,
_info: FetchPlaceholders,
) -> impl Future<Output = CResult<()>>
fn fetch_placeholders( &self, _request: Request, _ticket: FetchPlaceholders, _info: FetchPlaceholders, ) -> impl Future<Output = CResult<()>>
A directory population has been requested. The behavior of this callback is dependent on the PopulationType variant specified during registration.
sourcefn cancel_fetch_placeholders(
&self,
_request: Request,
_info: CancelFetchPlaceholders,
) -> impl Future<Output = ()>
fn cancel_fetch_placeholders( &self, _request: Request, _info: CancelFetchPlaceholders, ) -> impl Future<Output = ()>
A directory population request has been cancelled.
sourcefn opened(&self, _request: Request, _info: Opened) -> impl Future<Output = ()>
fn opened(&self, _request: Request, _info: Opened) -> impl Future<Output = ()>
A placeholder file handle has been opened for read, write, and/or delete access.
sourcefn closed(&self, _request: Request, _info: Closed) -> impl Future<Output = ()>
fn closed(&self, _request: Request, _info: Closed) -> impl Future<Output = ()>
A placeholder file handle that has been previously opened with read, write, and/or delete access has been closed.
sourcefn dehydrate(
&self,
_request: Request,
_ticket: Dehydrate,
_info: Dehydrate,
) -> impl Future<Output = CResult<()>>
fn dehydrate( &self, _request: Request, _ticket: Dehydrate, _info: Dehydrate, ) -> impl Future<Output = CResult<()>>
A placeholder dehydration has been requested. This means that all of the data persisted in the file will be completely discarded.
The operating system will handle dehydrating placeholder files automatically. However, it is up to you to approve this. Use the ticket to approve the request.
sourcefn dehydrated(
&self,
_request: Request,
_info: Dehydrated,
) -> impl Future<Output = ()>
fn dehydrated( &self, _request: Request, _info: Dehydrated, ) -> impl Future<Output = ()>
A placeholder dehydration request has been cancelled.
sourcefn delete(
&self,
_request: Request,
_ticket: Delete,
_info: Delete,
) -> impl Future<Output = CResult<()>>
fn delete( &self, _request: Request, _ticket: Delete, _info: Delete, ) -> impl Future<Output = CResult<()>>
A placeholder file is about to be deleted.
The operating system will handle deleting placeholder files automatically. However, it is up to you to approve this. Use the ticket to approve the request.
sourcefn deleted(&self, _request: Request, _info: Deleted) -> impl Future<Output = ()>
fn deleted(&self, _request: Request, _info: Deleted) -> impl Future<Output = ()>
A placeholder file has been deleted.
sourcefn rename(
&self,
_request: Request,
_ticket: Rename,
_info: Rename,
) -> impl Future<Output = CResult<()>>
fn rename( &self, _request: Request, _ticket: Rename, _info: Rename, ) -> impl Future<Output = CResult<()>>
A placeholder file is about to be renamed or moved.
The operating system will handle moving and renaming placeholder files automatically. However, it is up to you to approve this. Use the ticket to approve the request.
When the operation is completed, the Filter::renamed callback will be called.
sourcefn renamed(&self, _request: Request, _info: Renamed) -> impl Future<Output = ()>
fn renamed(&self, _request: Request, _info: Renamed) -> impl Future<Output = ()>
A placeholder file has been renamed or moved.
sourcefn state_changed(&self, _changes: Vec<PathBuf>) -> impl Future<Output = ()>
fn state_changed(&self, _changes: Vec<PathBuf>) -> impl Future<Output = ()>
Placeholder for changed attributes under the sync root.
This callback is implemented using ReadDirectoryChangesW
so it is not provided by the Cloud Filter APIs
.
This callback is used to detect when a user pins or unpins a placeholder file, etc.