Base.showFunction
show(x)

Write an informative text representation of a value to the current output stream. New types should overload show(io::IO, x) where the first argument is a stream. The representation used by show generally includes Julia-specific formatting and type information.

repr returns the output of show as a string.

See also print, which writes un-decorated representations.

Examples

julia> show("Hello World!")
"Hello World!"
julia> print("Hello World!")
Hello World!
source
show(io, mime, x)

The display functions ultimately call show in order to write an object x as a given mime type to a given I/O stream io (usually a memory buffer), if possible. In order to provide a rich multimedia representation of a user-defined type T, it is only necessary to define a new show method for T, via: show(io, ::MIME"mime", x::T) = ..., where mime is a MIME-type string and the function body calls write (or similar) to write that representation of x to io. (Note that the MIME"" notation only supports literal strings; to construct MIME types in a more flexible manner use MIME{Symbol("")}.)

For example, if you define a MyImage type and know how to write it to a PNG file, you could define a function show(io, ::MIME"image/png", x::MyImage) = ... to allow your images to be displayed on any PNG-capable AbstractDisplay (such as IJulia). As usual, be sure to import Base.show in order to add new methods to the built-in Julia function show.

The default MIME type is MIME"text/plain". There is a fallback definition for text/plain output that calls show with 2 arguments. Therefore, this case should be handled by defining a 2-argument show(io::IO, x::MyType) method.

Technically, the MIME"mime" macro defines a singleton type for the given mime string, which allows us to exploit Julia's dispatch mechanisms in determining how to display objects of any given type.

The first argument to show can be an IOContext specifying output format properties. See IOContext for details.

source
Base.show(io::IO, ex::RuntimeException)

Custom printing of RuntimeException

source
Base.show(io::IO, ex::FileExistsException)

Custom printing for FileExistsException

source
Genie.Router.ParamsType
mutable struct Params{T}

Collection of key value pairs representing the parameters of the current request - response cycle.

source
Genie.Router.ispayloadFunction
ispayload(req::HTTP.Request)

True if the request can carry a payload - that is, it's a POST, PUT, or PATCH request

source
Genie.Router.route_requestFunction
route_request(req::Request, res::Response, ip::IPv4 = Genie.config.server_host) :: Response

First step in handling a request: sets up @params collection, handles query vars, negotiates content.

source
Genie.Router.route_ws_requestFunction
route_ws_request(req::Request, msg::String, ws_client::HTTP.WebSockets.WebSocket, ip::IPv4 = Genie.config.server_host) :: String

First step in handling a web socket request: sets up @params collection, handles query vars.

source
Base.push!Function
push!(collection, items...) -> collection

Insert one or more items in collection. If collection is an ordered container, the items are inserted at the end (in the given order).

Examples

julia> push!([1, 2, 3], 4, 5, 6)
6-element Array{Int64,1}:
 1
 2
 3
 4
 5
 6

If collection is ordered, use append! to add all the elements of another collection to it. The result of the preceding example is equivalent to append!([1, 2, 3], [4, 5, 6]). For AbstractSet objects, union! can be used instead.

source
Genie.Router.baptizerFunction
baptizer(params::Union{Route,Channel}, parts::Vector{String}) :: Symbol

Generates default names for routes and channels.

source
Missing docstring.

Missing docstring for routes. Check Documenter's build log for details.

Missing docstring.

Missing docstring for channels. Check Documenter's build log for details.

Genie.Router.delete!Function
delete!(routes, route_name::Symbol)

Removes the route with the corresponding name from the routes collection and returns the collection of remaining routes.

source
Genie.Router.to_linkFunction

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.tolinkFunction

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.link_toFunction

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.linktoFunction

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.torouteFunction

Generates the HTTP link corresponding to route_name using the parameters in d.

source

Generates the HTTP link corresponding to route_name using the parameters in route_params.

source
Genie.Router.action_controller_paramsFunction
action_controller_params(action::Function, params::Params) :: Nothing

Sets up the :action_controller, :action, and :controller key - value pairs of the params collection.

source
Genie.Router.match_routesFunction
match_routes(req::Request, res::Response, params::Params) :: Response

Matches the invoked URL to the corresponding route, sets up the execution environment and invokes the controller method.

source
Genie.Router.match_channelsFunction
match_channels(req::Request, msg::String, ws_client::HTTP.WebSockets.WebSocket, params::Params) :: String

Matches the invoked URL to the corresponding channel, sets up the execution environment and invokes the channel controller method.

source
Genie.Router.parse_routeFunction
parse_route(route::String) :: Tuple{String,Vector{String},Vector{Any}}

Parses a route and extracts its named params and types.

source
Genie.Router.parse_channelFunction
parse_channel(channel::String) :: Tuple{String,Vector{String},Vector{Any}}

Parses a channel and extracts its named parms and types.

source
Genie.Router.extract_uri_paramsFunction
extract_uri_params(uri::String, regex_route::Regex, param_names::Vector{String}, param_types::Vector{Any}, params::Params) :: Bool

Extracts params from request URI and sets up the params Dict.

source
Genie.Router.nested_keysFunction
nested_keys(k::String, v, params::Params) :: Nothing

Utility function to process nested keys and set them up in params.

source
Genie.Router.setup_base_paramsFunction
setup_base_params(req::Request, res::Response, params::Dict{Symbol,Any}) :: Dict{Symbol,Any}

Populates params with default environment vars.

source
Missing docstring.

Missing docstring for params. Check Documenter's build log for details.

Missing docstring.

Missing docstring for request. Check Documenter's build log for details.

Genie.Router.response_typeFunction
response_type{T}(params::Dict{Symbol,T}) :: Symbol
response_type(params::Params) :: Symbol

Returns the content-type of the current request-response cycle.

source
response_type{T}(check::Symbol, params::Dict{Symbol,T}) :: Bool

Checks if the content-type of the current request-response cycle matches check.

source
Genie.Router.file_pathFunction
file_path(resource::String; within_doc_root = true) :: String

Returns the path to a resource file. If within_doc_root it will automatically prepend the document root to resource.

source
Genie.Router.filepathFunction
file_path(resource::String; within_doc_root = true) :: String

Returns the path to a resource file. If within_doc_root it will automatically prepend the document root to resource.

source
Missing docstring.

Missing docstring for ormatch. Check Documenter's build log for details.