Struct AsyncBridge

Source
pub struct AsyncBridge<F, B> { /* private fields */ }
Expand description

Adapts a Filter to the SyncFilter trait.

Trait Implementations§

Source§

impl<F, B> Deref for AsyncBridge<F, B>
where F: Filter, B: Fn(Pin<Box<dyn Future<Output = ()> + '_>>) + Send + Sync,

Source§

type Target = F

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<F, B> SyncFilter for AsyncBridge<F, B>
where F: Filter, B: Fn(Pin<Box<dyn Future<Output = ()> + '_>>) + Send + Sync,

Source§

fn fetch_data( &self, request: Request, ticket: FetchData, info: FetchData, ) -> CResult<()>

A placeholder hydration has been requested. This means that the placeholder should be populated with its corresponding data on the remote.
Source§

fn cancel_fetch_data(&self, request: Request, info: CancelFetchData)

A placeholder hydration request has been cancelled.
Source§

fn validate_data( &self, request: Request, ticket: ValidateData, info: ValidateData, ) -> CResult<()>

Followed by a successful call to SyncFilter::fetch_data, this callback should verify the integrity of the data persisted in the placeholder. Read more
Source§

fn fetch_placeholders( &self, request: Request, ticket: FetchPlaceholders, info: FetchPlaceholders, ) -> CResult<()>

A directory population has been requested. The behavior of this callback is dependent on the PopulationType variant specified during registration.
Source§

fn cancel_fetch_placeholders( &self, request: Request, info: CancelFetchPlaceholders, )

A directory population request has been cancelled.
Source§

fn opened(&self, request: Request, info: Opened)

A placeholder file handle has been opened for read, write, and/or delete access.
Source§

fn closed(&self, request: Request, info: Closed)

A placeholder file handle that has been previously opened with read, write, and/or delete access has been closed.
Source§

fn dehydrate( &self, request: Request, ticket: Dehydrate, info: Dehydrate, ) -> CResult<()>

A placeholder dehydration has been requested. This means that all of the data persisted in the file will be completely discarded. Read more
Source§

fn dehydrated(&self, request: Request, info: Dehydrated)

A placeholder dehydration request has been cancelled.
Source§

fn delete(&self, request: Request, ticket: Delete, info: Delete) -> CResult<()>

A placeholder file is about to be deleted. Read more
Source§

fn deleted(&self, request: Request, info: Deleted)

A placeholder file has been deleted.
Source§

fn rename(&self, request: Request, ticket: Rename, info: Rename) -> CResult<()>

A placeholder file is about to be renamed or moved. Read more
Source§

fn renamed(&self, request: Request, info: Renamed)

A placeholder file has been renamed or moved.
Source§

fn state_changed(&self, changes: Vec<PathBuf>)

Placeholder for changed attributes under the sync root. Read more

Auto Trait Implementations§

§

impl<F, B> Freeze for AsyncBridge<F, B>
where F: Freeze, B: Freeze,

§

impl<F, B> RefUnwindSafe for AsyncBridge<F, B>

§

impl<F, B> Send for AsyncBridge<F, B>
where F: Send, B: Send,

§

impl<F, B> Sync for AsyncBridge<F, B>
where F: Sync, B: Sync,

§

impl<F, B> Unpin for AsyncBridge<F, B>
where F: Unpin, B: Unpin,

§

impl<F, B> UnwindSafe for AsyncBridge<F, B>
where F: UnwindSafe, B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.