parameters: (self)
return_statement: return used_typemaps
docstring: Returns the typemaps for types needed for serialization in this module.
  
      A type is needed for serialization if it is contained by a struct or union
      defined in this module, is a parameter of a message in an interface in
      this module or is contained within another type needed for serialization.
docstring_summary: Returns the typemaps for types needed for serialization in this module.
docstring_tokens: Returns the typemaps for types needed for serialization in this module .
function: def _GetAllUsedTypemaps(self):
      """Returns the typemaps for types needed for serialization in this module.
  
      A type is needed for serialization if it is contained by a struct or union
      defined in this module, is a parameter of a message in an interface in
      this module or is contained within another type needed for serialization.
      """
      used_typemaps = []
      seen_types = set()
      def AddKind(kind):
        if (mojom.IsIntegralKind(kind) or mojom.IsStringKind(kind) or
            mojom.IsDoubleKind(kind) or mojom.IsFloatKind(kind) or
            mojom.IsAnyHandleKind(kind) or
            mojom.IsInterfaceKind(kind) or
            mojom.IsInterfaceRequestKind(kind) or
            mojom.IsAssociatedKind(kind) or
            mojom.IsPendingRemoteKind(kind) or
            mojom.IsPendingReceiverKind(kind)):
          pass
        elif mojom.IsArrayKind(kind):
          AddKind(kind.kind)
        elif mojom.IsMapKind(kind):
          AddKind(kind.key_kind)
          AddKind(kind.value_kind)
        else:
          name = self._GetFullMojomNameForKind(kind)
          if name in seen_types:
            return
          seen_types.add(name)
  
          typemap = self.typemap.get(name, None)
          if typemap:
            used_typemaps.append(typemap)
          if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
            for field in kind.fields:
              AddKind(field.kind)
  
      for kind in self.module.structs + self.module.unions:
        for field in kind.fields:
          AddKind(field.kind)
  
      for interface in self.module.interfaces:
        for method in interface.methods:
          for parameter in method.parameters + (method.response_parameters or []):
            AddKind(parameter.kind)
  
      return used_typemaps
function_tokens: def _GetAllUsedTypemaps ( self ) : used_typemaps = [ ] seen_types = set ( ) def AddKind ( kind ) : if ( mojom . IsIntegralKind ( kind ) or mojom . IsStringKind ( kind ) or mojom . IsDoubleKind ( kind ) or mojom . IsFloatKind ( kind ) or mojom . IsAnyHandleKind ( kind ) or mojom . IsInterfaceKind ( kind ) or mojom . IsInterfaceRequestKind ( kind ) or mojom . IsAssociatedKind ( kind ) or mojom . IsPendingRemoteKind ( kind ) or mojom . IsPendingReceiverKind ( kind ) ) : pass elif mojom . IsArrayKind ( kind ) : AddKind ( kind . kind ) elif mojom . IsMapKind ( kind ) : AddKind ( kind . key_kind ) AddKind ( kind . value_kind ) else : name = self . _GetFullMojomNameForKind ( kind ) if name in seen_types : return seen_types . add ( name ) typemap = self . typemap . get ( name , None ) if typemap : used_typemaps . append ( typemap ) if mojom . IsStructKind ( kind ) or mojom . IsUnionKind ( kind ) : for field in kind . fields : AddKind ( field . kind ) for kind in self . module . structs + self . module . unions : for field in kind . fields : AddKind ( field . kind ) for interface in self . module . interfaces : for method in interface . methods : for parameter in method . parameters + ( method . response_parameters or [ ] ) : AddKind ( parameter . kind ) return used_typemaps