Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 016232f1d9a3f7bee85855d35a2bca58 > files > 36

elixir-doc-1.7.2-1.mga7.noarch.rpm

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="ExDoc v0.19.1">
    <title>Behaviour – Elixir v1.7.2</title>
    <link rel="stylesheet" href="dist/app-240d7fc7e5.css" />
      <link rel="canonical" href="https://hexdocs.pm/elixir/v1.7/Behaviour.html" />
    <script src="dist/sidebar_items-cdf4e58b19.js"></script>
    
  </head>
  <body data-type="modules">
    <script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
    <div class="main">
<button class="sidebar-button sidebar-toggle">
  <span class="icon-menu" aria-hidden="true"></span>
  <span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
  <span class="icon-theme" aria-hidden="true"></span>
  <span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">

  <a href="http://elixir-lang.org/docs.html" class="sidebar-projectLink">
    <div class="sidebar-projectDetails">
      <h1 class="sidebar-projectName">
Elixir      </h1>
      <h2 class="sidebar-projectVersion">
        v1.7.2
      </h2>
    </div>
      <img src="assets/logo.png" alt="Elixir" class="sidebar-projectImage">
  </a>

  <form class="sidebar-search" action="search.html">
    <button type="submit" class="search-button">
      <span class="icon-search" aria-hidden="true"></span>
    </button>
    <input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
  </form>

  <ul class="sidebar-listNav">
    <li><a id="extras-list" href="#full-list">Pages</a></li>

      <li><a id="modules-list" href="#full-list">Modules</a></li>

      <li><a id="exceptions-list" href="#full-list">Exceptions</a></li>

  </ul>
  <div class="gradient"></div>
  <ul id="full-list" class="sidebar-fullList"></ul>
</section>

<section class="content">
  <div class="content-outer">
    <div id="content" class="content-inner">


      <h1>
        <small class="visible-xs">Elixir v1.7.2</small>
Behaviour        
          <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/behaviour.ex#L1" title="View Source" class="view-source" rel="help">
            <span class="icon-code" aria-hidden="true"></span>
            <span class="sr-only">View Source</span>
          </a>
      </h1>

        <div class="deprecated">
          This module is deprecated. Use @callback and @macrocallback attributes instead.
        </div>

        <section id="moduledoc">
<p>Mechanism for handling behaviours.</p>
<p>This module is deprecated. Instead of <a href="#defcallback/1"><code class="inline">defcallback/1</code></a> and
<a href="#defmacrocallback/1"><code class="inline">defmacrocallback/1</code></a>, the <code class="inline">@callback</code> and <code class="inline">@macrocallback</code>
module attributes can be used (respectively). See the
documentation for <a href="Module.html"><code class="inline">Module</code></a> for more information on these
attributes.</p>
<p>Instead of <code class="inline">MyModule.__behaviour__(:callbacks)</code>,
<code class="inline">MyModule.behaviour_info(:callbacks)</code> can be used.</p>
        </section>

        <section id="summary" class="details-list">
          <h1 class="section-heading">
            <a class="hover-link" href="#summary">
              <span class="icon-link" aria-hidden="true"></span>
              <span class="sr-only">Link to this section</span>
            </a>
            Summary
          </h1>
          
  <div class="summary-functions summary">
    <h2>
      <a href="#functions">Functions</a>
    </h2>
<div class="summary-row">
  <div class="summary-signature">
    <a href="#defcallback/1">defcallback(spec)</a>
  </div>
    <div class="summary-synopsis"><p>Defines a function callback according to the given type specification</p>
</div>
</div>
<div class="summary-row">
  <div class="summary-signature">
    <a href="#defmacrocallback/1">defmacrocallback(spec)</a>
  </div>
    <div class="summary-synopsis"><p>Defines a macro callback according to the given type specification</p>
</div>
</div>
  </div>
          
        </section>



        <section id="functions" class="details-list">
          <h1 class="section-heading">
            <a class="hover-link" href="#functions">
              <span class="icon-link" aria-hidden="true"></span>
              <span class="sr-only">Link to this section</span>
            </a>
            Functions
          </h1>
<div class="detail" id="defcallback/1">
    <div class="detail-header">
    <a href="#defcallback/1" class="detail-link" title="Link to this macro">
      <span class="icon-link" aria-hidden="true"></span>
      <span class="sr-only">Link to this macro</span>
    </a>
    <span class="signature">defcallback(spec)</span>
      <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/behaviour.ex#L20" class="view-source" rel="help" title="View Source">
       <span class="icon-code" aria-hidden="true"></span>
       <span class="sr-only">View Source</span>
     </a>
    
      <span class="note">(macro)</span>
      </div>
  <section class="docstring">
<p>Defines a function callback according to the given type specification.</p>
  </section>
</div>
<div class="detail" id="defmacrocallback/1">
    <div class="detail-header">
    <a href="#defmacrocallback/1" class="detail-link" title="Link to this macro">
      <span class="icon-link" aria-hidden="true"></span>
      <span class="sr-only">Link to this macro</span>
    </a>
    <span class="signature">defmacrocallback(spec)</span>
      <a href="https://github.com/elixir-lang/elixir/blob/v1.7.2/lib/elixir/lib/behaviour.ex#L27" class="view-source" rel="help" title="View Source">
       <span class="icon-code" aria-hidden="true"></span>
       <span class="sr-only">View Source</span>
     </a>
    
      <span class="note">(macro)</span>
      </div>
  <section class="docstring">
<p>Defines a macro callback according to the given type specification.</p>
  </section>
</div>
        </section>

          <footer class="footer">
        <p>
          <span class="line">
            Built using
            <a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.19.1),
          </span>
          <span class="line">
            designed by
            <a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>.
            </span>
        </p>
      </footer>
    </div>
  </div>
</section>
</div>
  <script src="dist/app-a0c90688fa.js"></script>
  
  </body>
</html>