pub struct Type(pub String);Expand description
A type’s name: image, signal, or an app’s dspk:sorting. any accepts every type.
Tuple Fields§
§0: StringImplementations§
Source§impl Type
impl Type
Sourcepub const ANY: &'static str = "any"
pub const ANY: &'static str = "any"
The type every input of type any accepts, and every type is.
Sourcepub fn new(name: impl AsRef<str>) -> Self
pub fn new(name: impl AsRef<str>) -> Self
The type named name, trimmed and lowercased (lenient: Type::parse checks the name).
Sourcepub fn parse(name: &str) -> Result<Self, String>
pub fn parse(name: &str) -> Result<Self, String>
name as a type, checked: lowercase letters, digits and -, optionally after one
<namespace>: of the same characters.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
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
impl Eq for Type
Source§impl JsonSchema for Type
impl JsonSchema for Type
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Type
impl Ord for Type
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Forget for Type
impl Freeze for Type
impl Move for Type
impl RefUnwindSafe for Type
impl Send for Typewhere
RawVecInner: Send,
impl Sync for Typewhere
RawVecInner: Sync,
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Typewhere
RawVecInner: UnwindSafe,
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