struct FileManagerStore {
entries: RwLock<FxHashMap<Uuid, FileStoreEntry>>,
}Expand description
File manager’s data store. It maintains a thread-safe mapping from FileID to FileStoreEntry which might have different backend implementation. Access to the content is encapsulated as methods of this struct.
Fields§
§entries: RwLock<FxHashMap<Uuid, FileStoreEntry>>Implementations§
Source§impl FileManagerStore
impl FileManagerStore
fn new() -> Self
Sourcefn get_impl(
&self,
id: &Uuid,
file_token: &FileTokenCheck,
origin_in: &ImmutableOrigin,
) -> Result<FileImpl, BlobURLStoreError>
fn get_impl( &self, id: &Uuid, file_token: &FileTokenCheck, origin_in: &ImmutableOrigin, ) -> Result<FileImpl, BlobURLStoreError>
Copy out the file backend implementation content
fn invalidate_token(&self, token: &FileTokenCheck, file_id: &Uuid)
pub(crate) fn get_token_for_file( &self, file_id: &Uuid, allow_revoked: bool, ) -> FileTokenCheck
fn insert(&self, id: Uuid, entry: FileStoreEntry)
fn remove(&self, id: &Uuid)
fn inc_ref( &self, id: &Uuid, origin_in: &ImmutableOrigin, ) -> Result<(), BlobURLStoreError>
fn add_sliced_url_entry( &self, parent_id: Uuid, rel_pos: RelativePos, sender: GenericSender<Result<Uuid, BlobURLStoreError>>, origin_in: ImmutableOrigin, )
async fn select_files( &self, control_id: EmbedderControlId, file_picker_request: FilePickerRequest, embedder_proxy: GenericEmbedderProxy<NetToEmbedderMsg>, ) -> EmbedderControlResponse
fn create_entry( &self, file_path: &Path, origin: ImmutableOrigin, ) -> Result<SelectedFile, FileManagerThreadError>
async fn get_blob_buf( &self, sender: &IpcSender<FileManagerResult<ReadFileProgress>>, id: &Uuid, file_token: &FileTokenCheck, origin_in: &ImmutableOrigin, rel_pos: RelativePos, ) -> Result<(), BlobURLStoreError>
async fn try_read_file( &self, sender: &IpcSender<FileManagerResult<ReadFileProgress>>, id: Uuid, origin_in: ImmutableOrigin, ) -> Result<(), BlobURLStoreError>
fn dec_ref( &self, id: &Uuid, origin_in: &ImmutableOrigin, ) -> Result<(), BlobURLStoreError>
fn promote_memory( &self, id: Uuid, blob_buf: BlobBuf, set_valid: bool, origin: ImmutableOrigin, )
fn set_blob_url_validity( &self, validity: bool, id: &Uuid, origin_in: &ImmutableOrigin, ) -> Result<(), BlobURLStoreError>
Auto Trait Implementations§
impl !Freeze for FileManagerStore
impl !RefUnwindSafe for FileManagerStore
impl Send for FileManagerStore
impl Sync for FileManagerStore
impl Unpin for FileManagerStore
impl UnsafeUnpin for FileManagerStore
impl UnwindSafe for FileManagerStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert