pub struct CompressionContentPort { /* private fields */ }Implementations§
Source§impl CompressionContentPort
impl CompressionContentPort
pub fn new(project_root: impl Into<PathBuf>) -> Option<Self>
Sourcepub fn resolve(&self, content_ref: &str) -> OclaResult<Vec<u8>>
pub fn resolve(&self, content_ref: &str) -> OclaResult<Vec<u8>>
Resolve a file:<relative_path> ref to bounded bytes.
Rejects symlinks at any component, path traversal, and oversized files.
Sourcepub fn persist(&self, data: &[u8]) -> OclaResult<String>
pub fn persist(&self, data: &[u8]) -> OclaResult<String>
Persist compressed bytes and return a blake3:<hex> content-addressed ref.
Auto Trait Implementations§
impl !Freeze for CompressionContentPort
impl RefUnwindSafe for CompressionContentPort
impl Send for CompressionContentPort
impl Sync for CompressionContentPort
impl Unpin for CompressionContentPort
impl UnsafeUnpin for CompressionContentPort
impl UnwindSafe for CompressionContentPort
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more