Struct warg_server::policy::content::WasmContentPolicy
source · pub struct WasmContentPolicy { /* private fields */ }Expand description
A policy that ensures all uploaded content is valid WebAssembly.
Implementations§
source§impl WasmContentPolicy
impl WasmContentPolicy
sourcepub fn disallow_modules(self) -> Self
pub fn disallow_modules(self) -> Self
Disallows WebAssembly modules from being acceptable content.
sourcepub fn disallow_components(self) -> Self
pub fn disallow_components(self) -> Self
Disallows WebAssembly components from being acceptable content.
sourcepub fn with_features(self, features: WasmFeatures) -> Self
pub fn with_features(self, features: WasmFeatures) -> Self
Sets the WebAssembly features to use when validating content.
Trait Implementations§
source§impl ContentPolicy for WasmContentPolicy
impl ContentPolicy for WasmContentPolicy
source§fn new_stream_policy(
&self,
_digest: &AnyHash
) -> ContentPolicyResult<Box<dyn ContentStreamPolicy>>
fn new_stream_policy( &self, _digest: &AnyHash ) -> ContentPolicyResult<Box<dyn ContentStreamPolicy>>
Creates a new stream policy for the given digest. Read more
Auto Trait Implementations§
impl RefUnwindSafe for WasmContentPolicy
impl Send for WasmContentPolicy
impl Sync for WasmContentPolicy
impl Unpin for WasmContentPolicy
impl UnwindSafe for WasmContentPolicy
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