pub struct CodeGenMetadata {
pub messages: HashMap<String, MessageInfo>,
pub enums: HashMap<String, EnumInfo>,
pub services: HashMap<String, ServiceInfo>,
}Expand description
Collected metadata for code generation
Fields§
§messages: HashMap<String, MessageInfo>§enums: HashMap<String, EnumInfo>§services: HashMap<String, ServiceInfo>Implementations§
Source§impl CodeGenMetadata
impl CodeGenMetadata
Sourcepub fn get_message_fields(&self, type_name: &str) -> Vec<MessageField>
pub fn get_message_fields(&self, type_name: &str) -> Vec<MessageField>
Get message fields for a given type name
Sourcepub fn resource_from_singular(&self, name: &str) -> Option<&ResourceDescriptor>
pub fn resource_from_singular(&self, name: &str) -> Option<&ResourceDescriptor>
Find a resource descriptor whose singular field matches name.
Sourcepub fn resource_from_plural(&self, name: &str) -> Option<&ResourceDescriptor>
pub fn resource_from_plural(&self, name: &str) -> Option<&ResourceDescriptor>
Find a resource descriptor whose plural field matches name.
Sourcepub fn get_resource_descriptor(
&self,
type_name: &str,
) -> Option<&ResourceDescriptor>
pub fn get_resource_descriptor( &self, type_name: &str, ) -> Option<&ResourceDescriptor>
Get resource descriptor by message type name (simple or fully-qualified).
Trait Implementations§
Source§impl Debug for CodeGenMetadata
impl Debug for CodeGenMetadata
Source§impl Default for CodeGenMetadata
impl Default for CodeGenMetadata
Source§fn default() -> CodeGenMetadata
fn default() -> CodeGenMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodeGenMetadata
impl RefUnwindSafe for CodeGenMetadata
impl Send for CodeGenMetadata
impl Sync for CodeGenMetadata
impl Unpin for CodeGenMetadata
impl UnsafeUnpin for CodeGenMetadata
impl UnwindSafe for CodeGenMetadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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