pub struct Primitive {
pub name: String,
pub description: String,
pub parameters: Vec<TypeParameter>,
pub fallback: Option<TypeReference>,
}
Fields§
§name: String
§description: String
§parameters: Vec<TypeParameter>
Generic type parameters, if any
fallback: Option<TypeReference>
Fallback type to use when the type is not supported by the target language
Implementations§
Source§impl Primitive
impl Primitive
pub fn new( name: String, description: String, parameters: Vec<TypeParameter>, fallback: Option<TypeReference>, ) -> Self
pub fn name(&self) -> &str
pub fn description(&self) -> &str
pub fn parameters(&self) -> Iter<'_, TypeParameter>
pub fn fallback(&self) -> Option<&TypeReference>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Primitive
impl<'de> Deserialize<'de> for Primitive
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 Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnwindSafe for Primitive
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