pub struct TypeInfoTable {
pub package_name: String,
pub types: Vec<TypeInfo>,
}Fields§
§package_name: String§types: Vec<TypeInfo>Implementations§
Source§impl TypeInfoTable
impl TypeInfoTable
pub fn collect(package_name: impl Into<String>, ast: &TypedAst) -> Self
pub fn collect_from_shapes( package_name: impl Into<String>, shapes: &[Shape], ) -> Self
pub fn collect_from_shapes_and_types( package_name: impl Into<String>, shapes: &[Shape], types: &[Type], ) -> Self
Sourcepub fn collect_indexed(
package_name: impl Into<String>,
shapes: &[Shape],
types: &[Type],
) -> (Self, TypeInfoIndex)
pub fn collect_indexed( package_name: impl Into<String>, shapes: &[Shape], types: &[Type], ) -> (Self, TypeInfoIndex)
collect_from_shapes_and_types,
plus the id each collected type was interned under.
pub fn is_empty(&self) -> bool
pub fn get(&self, id: TypeInfoId) -> Option<&TypeInfo>
pub fn object_type_id(&self, ty: &Type) -> Option<TypeInfoId>
pub fn type_id(&self, ty: &Type) -> Option<TypeInfoId>
pub fn supports_host_json_object(&self, ty: &Type) -> bool
pub fn supports_host_json_type(&self, ty: &Type) -> bool
Trait Implementations§
Source§impl Clone for TypeInfoTable
impl Clone for TypeInfoTable
Source§impl Debug for TypeInfoTable
impl Debug for TypeInfoTable
Source§impl Default for TypeInfoTable
impl Default for TypeInfoTable
Source§impl<'de> Deserialize<'de> for TypeInfoTable
impl<'de> Deserialize<'de> for TypeInfoTable
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
Source§impl PartialEq for TypeInfoTable
impl PartialEq for TypeInfoTable
Source§impl Serialize for TypeInfoTable
impl Serialize for TypeInfoTable
impl StructuralPartialEq for TypeInfoTable
Auto Trait Implementations§
impl Freeze for TypeInfoTable
impl RefUnwindSafe for TypeInfoTable
impl Send for TypeInfoTable
impl Sync for TypeInfoTable
impl Unpin for TypeInfoTable
impl UnsafeUnpin for TypeInfoTable
impl UnwindSafe for TypeInfoTable
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