Struct reflectapi::TypeReference
source · pub struct TypeReference {
pub name: String,
pub parameters: Vec<TypeReference>,
}
Fields§
§name: String
§parameters: Vec<TypeReference>
References to actual types to use instead of the type parameters declared on the referred generic type
Implementations§
source§impl TypeReference
impl TypeReference
pub fn new(name: String, parameters: Vec<TypeReference>) -> TypeReference
pub fn name(&self) -> &str
pub fn parameters(&self) -> Iter<'_, TypeReference>
pub fn fallback_recursively(&mut self, schema: &Typespace)
pub fn fallback_once(&self, schema: &Typespace) -> Option<TypeReference>
Trait Implementations§
source§impl Clone for TypeReference
impl Clone for TypeReference
source§fn clone(&self) -> TypeReference
fn clone(&self) -> TypeReference
Returns a copy 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 TypeReference
impl Debug for TypeReference
source§impl<'de> Deserialize<'de> for TypeReference
impl<'de> Deserialize<'de> for TypeReference
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TypeReference, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TypeReference, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&str> for TypeReference
impl From<&str> for TypeReference
source§fn from(name: &str) -> TypeReference
fn from(name: &str) -> TypeReference
Converts to this type from the input type.
source§impl From<String> for TypeReference
impl From<String> for TypeReference
source§fn from(name: String) -> TypeReference
fn from(name: String) -> TypeReference
Converts to this type from the input type.
source§impl Hash for TypeReference
impl Hash for TypeReference
source§impl Ord for TypeReference
impl Ord for TypeReference
source§fn cmp(&self, other: &TypeReference) -> Ordering
fn cmp(&self, other: &TypeReference) -> Ordering
1.21.0 · 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
source§impl PartialEq for TypeReference
impl PartialEq for TypeReference
source§fn eq(&self, other: &TypeReference) -> bool
fn eq(&self, other: &TypeReference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TypeReference
impl PartialOrd for TypeReference
source§fn partial_cmp(&self, other: &TypeReference) -> Option<Ordering>
fn partial_cmp(&self, other: &TypeReference) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for TypeReference
impl Serialize for TypeReference
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for TypeReference
impl StructuralPartialEq for TypeReference
Auto Trait Implementations§
impl Freeze for TypeReference
impl RefUnwindSafe for TypeReference
impl Send for TypeReference
impl Sync for TypeReference
impl Unpin for TypeReference
impl UnwindSafe for TypeReference
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