#[non_exhaustive]pub struct ComparatorDescriptor {
pub sdk_version: String,
pub name: String,
pub extensions: Vec<String>,
pub media_types: Vec<String>,
pub scope: ItemScope,
pub handles_identical: bool,
}Expand description
Static metadata for a comparator plugin. Serializable — can be sent as a message, embedded in WASM custom sections, or written to a manifest.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sdk_version: String§name: String§extensions: Vec<String>§media_types: Vec<String>§scope: ItemScope§handles_identical: boolImplementations§
Source§impl ComparatorDescriptor
impl ComparatorDescriptor
pub fn new(name: impl Into<String>) -> Self
pub fn with_extensions(self, exts: Vec<String>) -> Self
pub fn with_media_types(self, types: Vec<String>) -> Self
pub fn with_scope(self, scope: ItemScope) -> Self
pub fn with_handles_identical(self, handles: bool) -> Self
Trait Implementations§
Source§impl Clone for ComparatorDescriptor
impl Clone for ComparatorDescriptor
Source§fn clone(&self) -> ComparatorDescriptor
fn clone(&self) -> ComparatorDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComparatorDescriptor
impl Debug for ComparatorDescriptor
Source§impl<'de> Deserialize<'de> for ComparatorDescriptor
impl<'de> Deserialize<'de> for ComparatorDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ComparatorDescriptor
impl RefUnwindSafe for ComparatorDescriptor
impl Send for ComparatorDescriptor
impl Sync for ComparatorDescriptor
impl Unpin for ComparatorDescriptor
impl UnsafeUnpin for ComparatorDescriptor
impl UnwindSafe for ComparatorDescriptor
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