pub struct FileContentStore { /* private fields */ }Expand description
Filesystem-backed content resolver and store.
Implementations§
Trait Implementations§
Source§impl Clone for FileContentStore
impl Clone for FileContentStore
Source§fn clone(&self) -> FileContentStore
fn clone(&self) -> FileContentStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ContentResolver for FileContentStore
impl ContentResolver for FileContentStore
Source§fn resolve(
&self,
request: ContentResolveRequest,
policy: ContentResolutionPolicy,
) -> Result<ResolvedContent, ContentResolutionError>
fn resolve( &self, request: ContentResolveRequest, policy: ContentResolutionPolicy, ) -> Result<ResolvedContent, ContentResolutionError>
Resolves resolve through the configured ports::content boundary.
Concrete implementations own any backing-store, filesystem, or network
side effects.
Source§fn store_resolved_content(
&self,
content_ref: &ContentRef,
bytes: Vec<u8>,
) -> Result<(), ContentResolutionError>
fn store_resolved_content( &self, content_ref: &ContentRef, bytes: Vec<u8>, ) -> Result<(), ContentResolutionError>
Stores resolved content bytes and metadata in the content backing store.
Implementations store the resolved content bytes and metadata in the content resolver
backing store for later policy-checked lookup.
Source§impl ContentStore for FileContentStore
impl ContentStore for FileContentStore
Source§fn put_content(
&self,
content_ref: &ContentRef,
bytes: Vec<u8>,
) -> Result<(), ContentResolutionError>
fn put_content( &self, content_ref: &ContentRef, bytes: Vec<u8>, ) -> Result<(), ContentResolutionError>
Stores raw bytes for a content ref. Resolution still goes through
ContentResolver and its policy checks.Auto Trait Implementations§
impl Freeze for FileContentStore
impl RefUnwindSafe for FileContentStore
impl Send for FileContentStore
impl Sync for FileContentStore
impl Unpin for FileContentStore
impl UnsafeUnpin for FileContentStore
impl UnwindSafe for FileContentStore
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