Kernel.is_struct
You're seeing just the macro
is_struct
, go back to Kernel module for more information.
Returns true if term
is a struct; otherwise returns false
.
Allowed in guard tests.
Examples
iex> is_struct(URI.parse("/"))
true
iex> is_struct(%{})
false
Returns true if term
is a struct of name
; otherwise returns false
.
Allowed in guard tests.
Examples
iex> is_struct(URI.parse("/"), URI)
true
iex> is_struct(URI.parse("/"), Macro.Env)
false