pub struct DawnApi {
pub comment: Option<Vec<String>>,
pub doc: Option<String>,
pub metadata: ApiMetadata,
pub definitions: HashMap<String, Definition>,
}Expand description
The root structure of dawn.json
Fields§
§comment: Option<Vec<String>>§doc: Option<String>§metadata: ApiMetadata§definitions: HashMap<String, Definition>All other entries are definitions keyed by their canonical names
Implementations§
Source§impl DawnApi
impl DawnApi
Filter definitions by tags
pub fn bitmasks(&self) -> Vec<(&String, &BitmaskDef)>
pub fn structures(&self) -> Vec<(&String, &StructureDef)>
pub fn extensions(&self) -> HashMap<&String, HashSet<Extension<'_>>>
pub fn objects(&self) -> Vec<(&String, &ObjectDef)>
pub fn functions(&self) -> Vec<(&String, &FunctionDef)>
pub fn callbacks(&self) -> Vec<(&String, &CallbackDef)>
pub fn callback_functions(&self) -> Vec<(&String, &CallbackFunctionDef)>
pub fn callback_infos(&self) -> Vec<(&String, &CallbackInfoDef)>
pub fn constants(&self) -> Vec<(&String, &ConstantDef)>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DawnApi
impl<'de> Deserialize<'de> for DawnApi
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 DawnApi
impl RefUnwindSafe for DawnApi
impl Send for DawnApi
impl Sync for DawnApi
impl Unpin for DawnApi
impl UnsafeUnpin for DawnApi
impl UnwindSafe for DawnApi
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more