var searchIndex = {}; searchIndex["websocket"] = {"doc":"Rust-WebSocket is a WebSocket (RFC6455) library written in Rust.","items":[[0,"ws","websocket","A module containing the traits and structs that lower layer of Rust-WebSocket is based on.",null,null],[0,"message","websocket::ws","Provides a trait for WebSocket messages",null,null],[8,"Message","websocket::ws::message","A trait for WebSocket messages",null,null],[16,"DataFrameIterator","","The iterator type returned by dataframes",0,null],[10,"from_dataframes","","Attempt to form a message from a slice of data frames.",0,{"inputs":[{"name":"vec"}],"output":{"name":"websocketresult"}}],[10,"dataframes","","Turns this message into an iterator over data frames",0,null],[0,"sender","websocket::ws","Provides a trait for sending data frames and messages.",null,null],[8,"Sender","websocket::ws::sender","A trait for sending data frames and messages.",null,null],[10,"send_dataframe","","Sends a single data frame using this sender.",1,null],[11,"send_message","","Sends a single message using this sender.",1,null],[0,"receiver","websocket::ws","Provides a trait for receiving data frames and messages.",null,null],[3,"DataFrameIterator","websocket::ws::receiver","An iterator over data frames from a Receiver.",null,null],[3,"MessageIterator","","An iterator over messages from a Receiver.",null,null],[8,"Receiver","","A trait for receiving data frames and messages.",null,null],[10,"recv_dataframe","","Reads a single data frame from this receiver.",2,null],[10,"recv_message_dataframes","","Returns the data frames that constitute one message.",2,null],[11,"incoming_dataframes","","Returns an iterator over incoming data frames.",2,null],[11,"recv_message","","Reads a single message from this receiver.",2,null],[11,"incoming_messages","","Returns an iterator over incoming messages.",2,null],[11,"next","","Get the next data frame from the receiver. Always returns `Some`.",3,null],[11,"next","","Get the next message from the receiver. Always returns `Some`.",4,null],[0,"util","websocket::ws","Utility functions for various portions of Rust-WebSocket.",null,null],[5,"bytes_to_string","websocket::ws::util","Transforms a u8 slice into an owned String",null,null],[0,"header","","Utility functions for reading and writing data frame headers.",null,null],[3,"DataFrameFlags","websocket::ws::util::header","Flags relevant to a WebSocket data frame.",null,null],[3,"DataFrameHeader","","Represents a data frame header.",null,null],[12,"flags","","The bit flags for the first byte of the header.",5,null],[12,"opcode","","The opcode of the header - must be <= 16.",5,null],[12,"mask","","The masking key, if any.",5,null],[12,"len","","The length of the payload.",5,null],[5,"write_header","","Writes a data frame header.",null,{"inputs":[{"name":"w"},{"name":"dataframeheader"}],"output":{"name":"websocketresult"}}],[5,"read_header","","Reads a data frame header.",null,{"inputs":[{"name":"r"}],"output":{"name":"websocketresult"}}],[17,"FIN","","Marks this dataframe as the last dataframe",null,null],[17,"RSV1","","First reserved bit",null,null],[17,"RSV2","","Second reserved bit",null,null],[17,"RSV3","","Third reserved bit",null,null],[11,"hash","","",6,null],[11,"cmp","","",6,null],[11,"partial_cmp","","",6,null],[11,"lt","","",6,null],[11,"le","","",6,null],[11,"gt","","",6,null],[11,"ge","","",6,null],[11,"clone","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"fmt","","",6,null],[11,"empty","","Returns an empty set of flags.",6,{"inputs":[],"output":{"name":"dataframeflags"}}],[11,"all","","Returns the set containing all flags.",6,{"inputs":[],"output":{"name":"dataframeflags"}}],[11,"bits","","Returns the raw value of the flags currently stored.",6,null],[11,"from_bits","","Convert from underlying bit representation, unless that\nrepresentation contains bits that do not correspond to a flag.",6,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any bits\nthat do not correspond to flags.",6,{"inputs":[{"name":"u8"}],"output":{"name":"dataframeflags"}}],[11,"is_empty","","Returns `true` if no flags are currently stored.",6,null],[11,"is_all","","Returns `true` if all flags are currently set.",6,null],[11,"intersects","","Returns `true` if there are flags common to both `self` and `other`.",6,null],[11,"contains","","Returns `true` all of the flags in `other` are contained within `self`.",6,null],[11,"insert","","Inserts the specified flags in-place.",6,null],[11,"remove","","Removes the specified flags in-place.",6,null],[11,"toggle","","Toggles the specified flags in-place.",6,null],[11,"bitor","","Returns the union of the two sets of flags.",6,null],[11,"bitor_assign","","Adds the set of flags.",6,null],[11,"bitxor","","Returns the left flags, but with all the right flags toggled.",6,null],[11,"bitxor_assign","","Toggles the set of flags.",6,null],[11,"bitand","","Returns the intersection between the two sets of flags.",6,null],[11,"bitand_assign","","Disables all flags disabled in the set.",6,null],[11,"sub","","Returns the set difference of the two sets of flags.",6,null],[11,"sub_assign","","Disables all flags enabled in the set.",6,null],[11,"not","","Returns the complement of this set of flags.",6,null],[11,"extend","","",6,null],[11,"from_iter","","",6,{"inputs":[{"name":"t"}],"output":{"name":"dataframeflags"}}],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"clone","","",5,null],[11,"fmt","","",5,null],[0,"mask","websocket::ws::util","Utility functions for masking data frame payload data",null,null],[3,"Masker","websocket::ws::util::mask","Struct to pipe data into another writer,\nwhile masking the data being written",null,null],[5,"gen_mask","","Generates a random masking key",null,null],[5,"mask_data","","Masks data to send to a server and writes",null,null],[11,"new","","Create a new Masker with the key and the endpoint\nto be writter to.",7,null],[11,"write","","",7,null],[11,"flush","","",7,null],[0,"url","websocket::ws::util","Utility functions for dealing with URLs",null,null],[5,"parse_url_str","websocket::ws::util::url","Gets the host, port, resource and secure from the string representation of a url",null,{"inputs":[{"name":"str"}],"output":{"name":"websocketresult"}}],[5,"parse_url","","Gets the host, port, resource, and secure flag from a url",null,{"inputs":[{"name":"url"}],"output":{"name":"websocketresult"}}],[8,"ToWebSocketUrlComponents","","Trait that gets required WebSocket URL components",null,null],[10,"to_components","","Retrieve the required WebSocket URL components from this",8,null],[0,"dataframe","websocket::ws","Describes the generic DataFrame, defining a trait\nthat all dataframes should share. This is so one can\noptomize the memory footprint of a dataframe for their\nown needs, and be able to use custom dataframes quickly",null,null],[8,"DataFrame","websocket::ws::dataframe","A generic DataFrame. Every dataframe should be able to\nprovide these methods. (If the payload is not known in advance then\nrewrite the write_payload method)",null,null],[10,"is_last","","Is this dataframe the final dataframe of the message?",9,null],[10,"opcode","","What type of data does this dataframe contain?",9,null],[10,"reserved","","Reserved bits of this dataframe",9,null],[10,"payload","","Entire payload of the dataframe. If not known then implement\nwrite_payload as that is the actual method used when sending the\ndataframe over the wire.",9,null],[11,"size","","How long (in bytes) is this dataframe's payload",9,null],[11,"write_payload","","Write the payload to a writer",9,null],[11,"write_to","","Writes a DataFrame to a Writer.",9,null],[0,"client","websocket","Contains the WebSocket client.",null,null],[3,"Client","websocket::client","Represents a WebSocket client, which can send and receive messages/data frames.",null,null],[0,"request","","Structs for client-side (outbound) WebSocket requests",null,null],[3,"Url","websocket::client::request","A parsed URL record.",null,null],[3,"Request","","Represents a WebSocket request.",null,null],[12,"version","","The HTTP version of this request.",10,null],[12,"headers","","The headers of this request.",10,null],[11,"new","","Creates a new client-side request.",10,{"inputs":[{"name":"t"},{"name":"r"},{"name":"w"}],"output":{"name":"websocketresult"}}],[11,"key","","Short-cut to obtain the WebSocketKey value.",10,null],[11,"version","","Short-cut to obtain the WebSocketVersion value.",10,null],[11,"protocol","","Short-cut to obtain the WebSocketProtocol value.",10,null],[11,"extensions","","Short-cut to obtain the WebSocketExtensions value.",10,null],[11,"origin","","Short-cut to obtain the Origin value.",10,null],[11,"key_mut","","Short-cut to obtain a mutable reference to the WebSocketKey value.",10,null],[11,"version_mut","","Short-cut to obtain a mutable reference to the WebSocketVersion value.",10,null],[11,"protocol_mut","","Short-cut to obtaina mutable reference to the WebSocketProtocol value.",10,null],[11,"extensions_mut","","Short-cut to obtain a mutable reference to the WebSocketExtensions value.",10,null],[11,"origin_mut","","Short-cut to obtain a mutable reference to the Origin value.",10,null],[11,"get_reader","","Returns a reference to the inner Reader.",10,null],[11,"get_writer","","Returns a reference to the inner Writer.",10,null],[11,"get_mut_reader","","Returns a mutable reference to the inner Reader.",10,null],[11,"get_mut_writer","","Returns a mutable reference to the inner Writer.",10,null],[11,"into_inner","","Return the inner Reader and Writer.",10,null],[11,"send","","Sends the request to the server and returns a response.",10,null],[0,"response","websocket::client","Structs for WebSocket responses",null,null],[3,"Response","websocket::client::response","Represents a WebSocket response.",null,null],[12,"status","","The status of the response",11,null],[12,"headers","","The headers contained in this response",11,null],[12,"version","","The HTTP version of this response",11,null],[11,"read","","Reads a Response off the stream associated with a Request.",11,{"inputs":[{"name":"request"}],"output":{"name":"websocketresult"}}],[11,"accept","","Short-cut to obtain the WebSocketAccept value.",11,null],[11,"protocol","","Short-cut to obtain the WebSocketProtocol value.",11,null],[11,"extensions","","Short-cut to obtain the WebSocketExtensions value.",11,null],[11,"get_reader","","Returns a reference to the inner Reader.",11,null],[11,"get_writer","","Returns a reference to the inner Writer.",11,null],[11,"get_mut_reader","","Returns a mutable reference to the inner Reader.",11,null],[11,"get_mut_writer","","Returns a mutable reference to the inner Writer.",11,null],[11,"get_request","","Returns a reference to the request associated with this response.",11,null],[11,"into_inner","","Return the inner Reader and Writer.",11,null],[11,"validate","","Check if this response constitutes a successful handshake.",11,null],[11,"begin_with","","Consume this response and return a Client ready to transmit/receive data frames\nusing the data frame type D, Sender B and Receiver C.",11,null],[11,"begin","","Consume this response and return a Client ready to transmit/receive data frames.",11,null],[11,"connect","websocket::client","Connects to the given ws:// or wss:// URL and return a Request to be sent.",12,{"inputs":[{"name":"t"}],"output":{"name":"websocketresult"}}],[11,"connect_ssl_context","","Connects to the specified wss:// URL using the given SSL context.",12,{"inputs":[{"name":"t"},{"name":"sslcontext"}],"output":{"name":"websocketresult"}}],[11,"shutdown_sender","","Shuts down the sending half of the client connection, will cause all pending\nand future IO to return immediately with an appropriate value.",12,null],[11,"shutdown_receiver","","Shuts down the receiving half of the client connection, will cause all pending\nand future IO to return immediately with an appropriate value.",12,null],[11,"shutdown","","Shuts down the client connection, will cause all pending and future IO to\nreturn immediately with an appropriate value.",12,null],[11,"new","","Creates a Client from the given Sender and Receiver.",12,{"inputs":[{"name":"s"},{"name":"r"}],"output":{"name":"client"}}],[11,"send_dataframe","","Sends a single data frame to the remote endpoint.",12,null],[11,"send_message","","Sends a single message to the remote endpoint.",12,null],[11,"recv_dataframe","","Reads a single data frame from the remote endpoint.",12,null],[11,"incoming_dataframes","","Returns an iterator over incoming data frames.",12,null],[11,"recv_message","","Reads a single message from this receiver.",12,null],[11,"incoming_messages","","Returns an iterator over incoming messages.",12,null],[11,"get_sender","","Returns a reference to the underlying Sender.",12,null],[11,"get_receiver","","Returns a reference to the underlying Receiver.",12,null],[11,"get_mut_sender","","Returns a mutable reference to the underlying Sender.",12,null],[11,"get_mut_receiver","","Returns a mutable reference to the underlying Receiver.",12,null],[11,"split","","Split this client into its constituent Sender and Receiver pair.",12,null],[0,"server","websocket","Provides an implementation of a WebSocket server",null,null],[3,"Server","websocket::server","Represents a WebSocket server which can work with either normal (non-secure) connections, or secure WebSocket connections.",null,null],[3,"Connection","","Represents a connection to the server that has not been processed yet.",null,null],[0,"request","","The server-side WebSocket request.",null,null],[11,"into_url","websocket::client::request","",13,null],[4,"RequestUri","websocket::server::request","The Request-URI of a Request's StartLine.",null,null],[13,"AbsolutePath","","The most common request target, an absolute path and optional query.",14,null],[13,"AbsoluteUri","","An absolute URI. Used in conjunction with proxies.",14,null],[13,"Authority","","The authority form is only for use with `CONNECT` requests.",14,null],[13,"Star","","The star is used to target the entire server, instead of a specific resource.",14,null],[3,"Request","","Represents a server-side (incoming) request.",null,null],[12,"method","","The HTTP method used to create the request. All values except `Method::Get` are\nrejected by `validate()`.",15,null],[12,"url","","The target URI for this request.",15,null],[12,"version","","The HTTP version of this request.",15,null],[12,"headers","","The headers of this request.",15,null],[11,"key","","Short-cut to obtain the WebSocketKey value.",15,null],[11,"version","","Short-cut to obtain the WebSocketVersion value.",15,null],[11,"protocol","","Short-cut to obtain the WebSocketProtocol value.",15,null],[11,"extensions","","Short-cut to obtain the WebSocketExtensions value.",15,null],[11,"origin","","Short-cut to obtain the Origin value.",15,null],[11,"get_reader","","Returns a reference to the inner Reader.",15,null],[11,"get_writer","","Returns a reference to the inner Writer.",15,null],[11,"get_mut_reader","","Returns a mutable reference to the inner Reader.",15,null],[11,"get_mut_writer","","Returns a mutable reference to the inner Writer.",15,null],[11,"into_inner","","Return the inner Reader and Writer",15,null],[11,"read","","Reads an inbound request.",15,{"inputs":[{"name":"r"},{"name":"w"}],"output":{"name":"websocketresult"}}],[11,"validate","","Check if this constitutes a valid WebSocket upgrade request.",15,null],[11,"accept","","Accept this request, ready to send a response.",15,null],[11,"fail","","Fail this request by generating a Bad Request response",15,null],[0,"response","websocket::server","Struct for server-side WebSocket response.",null,null],[3,"Response","websocket::server::response","Represents a server-side (outgoing) response.",null,null],[12,"status","","The status of the response",16,null],[12,"headers","","The headers contained in this response",16,null],[12,"version","","The HTTP version of this response",16,null],[11,"accept","","Short-cut to obtain the WebSocketAccept value",16,null],[11,"protocol","","Short-cut to obtain the WebSocketProtocol value",16,null],[11,"extensions","","Short-cut to obtain the WebSocketExtensions value",16,null],[11,"get_reader","","Returns a reference to the inner Reader.",16,null],[11,"get_writer","","Returns a reference to the inner Writer.",16,null],[11,"get_mut_reader","","Returns a mutable reference to the inner Reader.",16,null],[11,"get_mut_writer","","Returns a mutable reference to the inner Writer.",16,null],[11,"get_request","","Returns a reference to the request associated with this response/",16,null],[11,"into_inner","","Return the inner Reader and Writer",16,null],[11,"new","","Create a new outbound WebSocket response.",16,{"inputs":[{"name":"request"}],"output":{"name":"response"}}],[11,"bad_request","","Create a Bad Request response",16,{"inputs":[{"name":"request"}],"output":{"name":"response"}}],[11,"accept_mut","","Short-cut to obtain a mutable reference to the WebSocketAccept value\nNote that to add a header that does not already exist, ```WebSocketResponse.headers.set()```\nmust be used.",16,null],[11,"protocol_mut","","Short-cut to obtain a mutable reference to the WebSocketProtocol value\nNote that to add a header that does not already exist, ```WebSocketResponse.headers.set()```\nmust be used.",16,null],[11,"extensions_mut","","Short-cut to obtain a mutable reference to the WebSocketExtensions value\nNote that to add a header that does not already exist, ```WebSocketResponse.headers.set()```\nmust be used.",16,null],[11,"send_with","","Send this response with the given data frame type D, Sender B and Receiver C.",16,null],[11,"send_into_inner","","Send this response, retrieving the inner Reader and Writer",16,null],[11,"send","","Send this response, returning a Client ready to transmit/receive data frames",16,null],[11,"bind","websocket::server","Bind this Server to this socket",17,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[11,"bind_secure","","Bind this Server to this socket, utilising the given SslContext",17,{"inputs":[{"name":"t"},{"name":"sslcontext"}],"output":{"name":"result"}}],[11,"local_addr","","Get the socket address of this server",17,null],[11,"try_clone","","Create a new independently owned handle to the underlying socket.",17,null],[11,"accept","","Wait for and accept an incoming WebSocket connection, returning a WebSocketRequest",17,null],[11,"next","","",17,null],[11,"read_request","","Process this connection and read the request.",18,null],[11,"shutdown","","Shuts down the currennt connection in the specified way.\nAll future IO calls to this connection will return immediately with an appropriate\nreturn value.",18,null],[0,"dataframe","websocket","Module containing the default implementation of data frames.",null,null],[3,"DataFrame","websocket::dataframe","Represents a WebSocket data frame.",null,null],[12,"finished","","Whether or no this constitutes the end of a message",19,null],[12,"reserved","","The reserved portion of the data frame (RFC6455 5.2)",19,null],[12,"opcode","","The opcode associated with this data frame",19,null],[12,"data","","The payload associated with this data frame",19,null],[4,"Opcode","","Represents a WebSocket data frame opcode",null,null],[13,"Continuation","","A continuation data frame",20,null],[13,"Text","","A UTF-8 text data frame",20,null],[13,"Binary","","A binary data frame",20,null],[13,"NonControl1","","An undefined non-control data frame",20,null],[13,"NonControl2","","An undefined non-control data frame",20,null],[13,"NonControl3","","An undefined non-control data frame",20,null],[13,"NonControl4","","An undefined non-control data frame",20,null],[13,"NonControl5","","An undefined non-control data frame",20,null],[13,"Close","","A close data frame",20,null],[13,"Ping","","A ping data frame",20,null],[13,"Pong","","A pong data frame",20,null],[13,"Control1","","An undefined control data frame",20,null],[13,"Control2","","An undefined control data frame",20,null],[13,"Control3","","An undefined control data frame",20,null],[13,"Control4","","An undefined control data frame",20,null],[13,"Control5","","An undefined control data frame",20,null],[11,"eq","","",19,null],[11,"ne","","",19,null],[11,"clone","","",19,null],[11,"fmt","","",19,null],[11,"new","","Creates a new DataFrame.",19,{"inputs":[{"name":"bool"},{"name":"opcode"},{"name":"vec"}],"output":{"name":"dataframe"}}],[11,"read_dataframe","","Reads a DataFrame from a Reader.",19,{"inputs":[{"name":"r"},{"name":"bool"}],"output":{"name":"websocketresult"}}],[11,"is_last","","",19,null],[11,"opcode","","",19,null],[11,"reserved","","",19,null],[11,"payload","","",19,null],[11,"eq","","",20,null],[11,"fmt","","",20,null],[11,"clone","","",20,null],[11,"new","","Attempts to form an Opcode from a nibble.",20,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[0,"message","websocket","Module containing the default implementation for messages.",null,null],[3,"Message","websocket::message","Represents a WebSocket message.",null,null],[12,"opcode","","Type of WebSocket message",21,null],[12,"cd_status_code","","Optional status code to send when closing a connection.\n(only used if this message is of Type::Close)",21,null],[12,"payload","","Main payload",21,null],[4,"Type","","Valid types of messages (in the default implementation)",null,null],[13,"Text","","Message with UTF8 test",22,null],[13,"Binary","","Message containing binary data",22,null],[13,"Ping","","Ping message with data",22,null],[13,"Pong","","Pong message with data",22,null],[13,"Close","","Close connection message with optional reason",22,null],[8,"IntoCowBytes","","Trait representing the ability to convert\nself to a `Cow<'a, [u8]>`",null,null],[10,"into","","Consume `self` and produce a `Cow<'a, [u8]>`",23,null],[11,"clone","","",22,null],[11,"eq","","",22,null],[11,"fmt","","",22,null],[11,"fmt","","",21,null],[11,"clone","","",21,null],[11,"eq","","",21,null],[11,"ne","","",21,null],[11,"text","","Create a new WebSocket message with text data",21,{"inputs":[{"name":"s"}],"output":{"name":"self"}}],[11,"binary","","Create a new WebSocket message with binary data",21,{"inputs":[{"name":"b"}],"output":{"name":"self"}}],[11,"close","","Create a new WebSocket message that signals the end of a WebSocket\nconnection, although messages can still be sent after sending this",21,{"inputs":[],"output":{"name":"self"}}],[11,"close_because","","Create a new WebSocket message that signals the end of a WebSocket\nconnection and provide a text reason and a status code for why.\nMessages can still be sent after sending this message.",21,{"inputs":[{"name":"u16"},{"name":"s"}],"output":{"name":"self"}}],[11,"ping","","Create a ping WebSocket message, a pong is usually sent back\nafter sending this with the same data",21,{"inputs":[{"name":"p"}],"output":{"name":"self"}}],[11,"pong","","Create a pong WebSocket message, usually a response to a\nping message",21,{"inputs":[{"name":"p"}],"output":{"name":"self"}}],[11,"into_pong","","Convert a ping message to a pong, keeping the data.\nThis will fail if the original message is not a ping.",21,null],[11,"is_last","","",21,null],[11,"opcode","","",21,null],[11,"reserved","","",21,null],[11,"payload","","",21,null],[11,"size","","",21,null],[11,"write_payload","","",21,null],[11,"dataframes","","",21,null],[11,"from_dataframes","","Attempt to form a message from a series of data frames",21,{"inputs":[{"name":"vec"}],"output":{"name":"websocketresult"}}],[0,"result","websocket","The result type used within Rust-WebSocket",null,null],[4,"WebSocketError","websocket::result","Represents a WebSocket error",null,null],[13,"ProtocolError","","A WebSocket protocol error",24,null],[13,"RequestError","","Invalid WebSocket request error",24,null],[13,"ResponseError","","Invalid WebSocket response error",24,null],[13,"DataFrameError","","Invalid WebSocket data frame error",24,null],[13,"NoDataAvailable","","No data available",24,null],[13,"IoError","","An input/output error",24,null],[13,"HttpError","","An HTTP parsing error",24,null],[13,"UrlError","","A URL parsing error",24,null],[13,"WebSocketUrlError","","A WebSocket URL error",24,null],[13,"SslError","","An SSL error",24,null],[13,"Utf8Error","","A UTF-8 error",24,null],[4,"WSUrlErrorKind","","Represents a WebSocket URL error",null,null],[13,"CannotSetFragment","","Fragments are not valid in a WebSocket URL",25,null],[13,"InvalidScheme","","The scheme provided is invalid for a WebSocket",25,null],[6,"WebSocketResult","","The type used for WebSocket results",null,null],[11,"fmt","","",24,null],[11,"fmt","","",24,null],[11,"description","","",24,null],[11,"cause","","",24,null],[11,"from","","",24,{"inputs":[{"name":"error"}],"output":{"name":"websocketerror"}}],[11,"from","","",24,{"inputs":[{"name":"httperror"}],"output":{"name":"websocketerror"}}],[11,"from","","",24,{"inputs":[{"name":"parseerror"}],"output":{"name":"websocketerror"}}],[11,"from","","",24,{"inputs":[{"name":"sslerror"}],"output":{"name":"websocketerror"}}],[11,"from","","",24,{"inputs":[{"name":"utf8error"}],"output":{"name":"websocketerror"}}],[11,"from","","",24,{"inputs":[{"name":"wsurlerrorkind"}],"output":{"name":"websocketerror"}}],[11,"fmt","","",25,null],[11,"fmt","","",25,null],[11,"description","","",25,null],[0,"stream","websocket","Provides the default stream type for WebSocket connections.",null,null],[4,"SocketAddr","websocket::stream","Representation of a socket address for networking applications.",null,null],[13,"V4","","An IPv4 socket address which is a (ip, port) combination.",26,null],[13,"V6","","An IPv6 socket address",26,null],[4,"Shutdown","","Possible values which can be passed to the `shutdown` method of `TcpStream`.",null,null],[13,"Read","","Indicates that the reading portion of this stream/socket should be shut\ndown. All currently blocked and future reads will return `Ok(0)`.",27,null],[13,"Write","","Indicates that the writing portion of this stream/socket should be shut\ndown. All currently blocked and future writes will return an error.",27,null],[13,"Both","","Shut down both the reading and writing portions of this stream.",27,null],[3,"TcpStream","","A structure which represents a TCP stream between a local socket and a\nremote socket.",null,null],[4,"WebSocketStream","","A useful stream type for carrying WebSocket connections.",null,null],[13,"Tcp","","A TCP stream.",28,null],[13,"Ssl","","An SSL-backed TCP Stream",28,null],[11,"read","","",28,null],[11,"write","","",28,null],[11,"flush","","",28,null],[11,"peer_addr","","See `TcpStream.peer_addr()`.",28,null],[11,"local_addr","","See `TcpStream.local_addr()`.",28,null],[11,"set_nodelay","","See `TcpStream.set_nodelay()`.",28,null],[11,"set_keepalive","","See `TcpStream.set_keepalive()`.",28,null],[11,"shutdown","","See `TcpStream.shutdown()`.",28,null],[11,"try_clone","","See `TcpStream.try_clone()`.",28,null],[0,"header","websocket","Structs representing headers relevant in a WebSocket context.",null,null],[3,"Headers","websocket::header","A map of header fields on requests and responses.",null,null],[3,"WebSocketKey","","Represents a Sec-WebSocket-Key header.",null,null],[12,"0","","",29,null],[3,"WebSocketAccept","","Represents a Sec-WebSocket-Accept header",null,null],[3,"WebSocketProtocol","","Represents a Sec-WebSocket-Protocol header",null,null],[12,"0","","",30,null],[3,"Origin","","Represents an Origin header",null,null],[12,"0","","",31,null],[4,"WebSocketVersion","","Represents a Sec-WebSocket-Version header",null,null],[13,"WebSocket13","","The version of WebSocket defined in RFC6455",32,null],[13,"Unknown","","An unknown version of WebSocket",32,null],[11,"clone","","",33,null],[11,"eq","","",33,null],[11,"ne","","",33,null],[11,"fmt","","",33,null],[11,"from_str","","",33,{"inputs":[{"name":"str"}],"output":{"name":"websocketresult"}}],[11,"new","","Create a new WebSocketAccept from the given WebSocketKey",33,{"inputs":[{"name":"websocketkey"}],"output":{"name":"websocketaccept"}}],[11,"serialize","","Return the Base64 encoding of this WebSocketAccept",33,null],[11,"header_name","","",33,{"inputs":[],"output":{"name":"str"}}],[11,"parse_header","","",33,null],[11,"fmt_header","","",33,null],[11,"clone","","",29,null],[11,"eq","","",29,null],[11,"ne","","",29,null],[11,"fmt","","",29,null],[11,"from_str","","",29,{"inputs":[{"name":"str"}],"output":{"name":"websocketresult"}}],[11,"new","","Generate a new, random WebSocketKey",29,{"inputs":[],"output":{"name":"websocketkey"}}],[11,"serialize","","Return the Base64 encoding of this WebSocketKey",29,null],[11,"header_name","","",29,{"inputs":[],"output":{"name":"str"}}],[11,"parse_header","","",29,null],[11,"fmt_header","","",29,null],[11,"fmt","","",30,null],[11,"clone","","",30,null],[11,"eq","","",30,null],[11,"ne","","",30,null],[11,"deref","","",30,null],[11,"header_name","","",30,{"inputs":[],"output":{"name":"str"}}],[11,"parse_header","","",30,null],[11,"fmt_header","","",30,null],[11,"clone","","",32,null],[11,"eq","","",32,null],[11,"ne","","",32,null],[11,"fmt","","",32,null],[11,"header_name","","",32,{"inputs":[],"output":{"name":"str"}}],[11,"parse_header","","",32,null],[11,"fmt_header","","",32,null],[0,"extensions","","Provides the Sec-WebSocket-Extensions header.",null,null],[3,"WebSocketExtensions","websocket::header::extensions","Represents a Sec-WebSocket-Extensions header",null,null],[12,"0","","",34,null],[3,"Extension","","A WebSocket extension",null,null],[12,"name","","The name of this extension",35,null],[12,"params","","The parameters for this extension",35,null],[3,"Parameter","","A parameter for an Extension",null,null],[12,"name","","The name of this parameter",36,null],[12,"value","","The value of this parameter, if any",36,null],[11,"fmt","","",34,null],[11,"clone","","",34,null],[11,"eq","","",34,null],[11,"ne","","",34,null],[11,"deref","","",34,null],[11,"fmt","","",35,null],[11,"clone","","",35,null],[11,"eq","","",35,null],[11,"ne","","",35,null],[11,"new","","Creates a new extension with the given name",35,{"inputs":[{"name":"string"}],"output":{"name":"extension"}}],[11,"from_str","","",35,{"inputs":[{"name":"str"}],"output":{"name":"websocketresult"}}],[11,"fmt","","",35,null],[11,"fmt","","",36,null],[11,"clone","","",36,null],[11,"eq","","",36,null],[11,"ne","","",36,null],[11,"new","","Creates a new parameter with the given name and value",36,{"inputs":[{"name":"string"},{"name":"option"}],"output":{"name":"parameter"}}],[11,"fmt","","",36,null],[11,"header_name","","",34,{"inputs":[],"output":{"name":"str"}}],[11,"parse_header","","",34,null],[11,"fmt_header","","",34,null],[11,"fmt","websocket::header","",31,null],[11,"clone","","",31,null],[11,"eq","","",31,null],[11,"ne","","",31,null],[11,"deref","","",31,null],[11,"header_name","","",31,{"inputs":[],"output":{"name":"str"}}],[11,"parse_header","","",31,null],[11,"fmt_header","","",31,null],[0,"receiver","websocket","The default implementation of a WebSocket Receiver.",null,null],[3,"Receiver","websocket::receiver","A Receiver that wraps a Reader and provides a default implementation using\nDataFrames and Messages.",null,null],[11,"new","","Create a new Receiver using the specified Reader.",37,{"inputs":[{"name":"bufreader"},{"name":"bool"}],"output":{"name":"receiver"}}],[11,"get_ref","","Returns a reference to the underlying Reader.",37,null],[11,"get_mut","","Returns a mutable reference to the underlying Reader.",37,null],[11,"shutdown","","Closes the receiver side of the connection, will cause all pending and future IO to\nreturn immediately with an appropriate value.",37,null],[11,"shutdown_all","","Shuts down both Sender and Receiver, will cause all pending and future IO to\nreturn immediately with an appropriate value.",37,null],[11,"recv_dataframe","","Reads a single data frame from the remote endpoint.",37,null],[11,"recv_message_dataframes","","Returns the data frames that constitute one message.",37,null],[0,"sender","websocket","The default implementation of a WebSocket Sender.",null,null],[3,"Sender","websocket::sender","A Sender that wraps a Writer and provides a default implementation using\nDataFrames and Messages.",null,null],[11,"new","","Create a new WebSocketSender using the specified Writer.",38,{"inputs":[{"name":"w"},{"name":"bool"}],"output":{"name":"sender"}}],[11,"get_ref","","Returns a reference to the underlying Writer.",38,null],[11,"get_mut","","Returns a mutable reference to the underlying Writer.",38,null],[11,"shutdown","","Closes the sender side of the connection, will cause all pending and future IO to\nreturn immediately with an appropriate value.",38,null],[11,"shutdown_all","","Shuts down both Sender and Receiver, will cause all pending and future IO to\nreturn immediately with an appropriate value.",38,null],[11,"send_dataframe","","Sends a single data frame to the remote endpoint.",38,null],[11,"to_components","websocket::client::request","",13,null],[11,"parse","","Parse an absolute URL from a string.",13,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"join","","Parse a string as an URL, with this URL as the base URL.",13,null],[11,"options","","Return a default `ParseOptions` that can fully configure the URL parser.",13,{"inputs":[],"output":{"name":"parseoptions"}}],[11,"as_str","","Return the serialization of this URL.",13,null],[11,"into_string","","Return the serialization of this URL.",13,null],[11,"origin","","Return the origin of this URL (https://url.spec.whatwg.org/#origin)",13,null],[11,"scheme","","Return the scheme of this URL, lower-cased, as an ASCII string without the ':' delimiter.",13,null],[11,"has_authority","","Return whether the URL has an 'authority',\nwhich can contain a username, password, host, and port number.",13,null],[11,"cannot_be_a_base","","Return whether this URL is a cannot-be-a-base URL,\nmeaning that parsing a relative URL string with this URL as the base will return an error.",13,null],[11,"username","","Return the username for this URL (typically the empty string)\nas a percent-encoded ASCII string.",13,null],[11,"password","","Return the password for this URL, if any, as a percent-encoded ASCII string.",13,null],[11,"has_host","","Equivalent to `url.host().is_some()`.",13,null],[11,"host_str","","Return the string representation of the host (domain or IP address) for this URL, if any.",13,null],[11,"host","","Return the parsed representation of the host for this URL.\nNon-ASCII domain labels are punycode-encoded per IDNA.",13,null],[11,"domain","","If this URL has a host and it is a domain name (not an IP address), return it.",13,null],[11,"port","","Return the port number for this URL, if any.",13,null],[11,"port_or_known_default","","Return the port number for this URL, or the default port number if it is known.",13,null],[11,"with_default_port","","If the URL has a host, return something that implements `ToSocketAddrs`.",13,null],[11,"path","","Return the path for this URL, as a percent-encoded ASCII string.\nFor cannot-be-a-base URLs, this is an arbitrary string that doesn’t start with '/'.\nFor other URLs, this starts with a '/' slash\nand continues with slash-separated path segments.",13,null],[11,"path_segments","","Unless this URL is cannot-be-a-base,\nreturn an iterator of '/' slash-separated path segments,\neach as a percent-encoded ASCII string.",13,null],[11,"query","","Return this URL’s query string, if any, as a percent-encoded ASCII string.",13,null],[11,"query_pairs","","Parse the URL’s query string, if any, as `application/x-www-form-urlencoded`\nand return an iterator of (key, value) pairs.",13,null],[11,"fragment","","Return this URL’s fragment identifier, if any.",13,null],[11,"set_fragment","","Change this URL’s fragment identifier.",13,null],[11,"set_query","","Change this URL’s query string.",13,null],[11,"query_pairs_mut","","Manipulate this URL’s query string, viewed as a sequence of name/value pairs\nin `application/x-www-form-urlencoded` syntax.",13,null],[11,"set_path","","Change this URL’s path.",13,null],[11,"path_segments_mut","","Return an object with methods to manipulate this URL’s path segments.",13,null],[11,"set_port","","Change this URL’s port number.",13,null],[11,"set_host","","Change this URL’s host.",13,null],[11,"set_ip_host","","Change this URL’s host to the given IP address.",13,null],[11,"set_password","","Change this URL’s password.",13,null],[11,"set_username","","Change this URL’s username.",13,null],[11,"set_scheme","","Change this URL’s scheme.",13,null],[11,"from_file_path","","Convert a file name as `std::path::Path` into an URL in the `file` scheme.",13,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"from_directory_path","","Convert a directory name as `std::path::Path` into an URL in the `file` scheme.",13,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"to_file_path","","Assuming the URL is in the `file` scheme or similar,\nconvert its path to an absolute `std::path::Path`.",13,null],[11,"index","","",13,null],[11,"index","","",13,null],[11,"index","","",13,null],[11,"index","","",13,null],[11,"clone","","",13,null],[11,"to_socket_addrs","","",13,null],[11,"from_str","","",13,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",13,null],[11,"fmt","","",13,null],[11,"eq","","",13,null],[11,"cmp","","",13,null],[11,"partial_cmp","","",13,null],[11,"hash","","",13,null],[11,"as_ref","","",13,null],[11,"clone","websocket::header","",39,null],[11,"new","","Creates a new, empty headers map.",39,{"inputs":[],"output":{"name":"headers"}}],[11,"set","","Set a header field to the corresponding value.",39,null],[11,"get_raw","","Access the raw value of a header.",39,null],[11,"set_raw","","Set the raw value of a header, bypassing any typed headers.",39,null],[11,"remove_raw","","Remove a header set by set_raw",39,null],[11,"get","","Get a reference to the header field's value, if it exists.",39,null],[11,"get_mut","","Get a mutable reference to the header field's value, if it exists.",39,null],[11,"has","","Returns a boolean of whether a certain header is in the map.",39,null],[11,"remove","","Removes a header from the map, if one existed.\nReturns true if a header has been removed.",39,null],[11,"iter","","Returns an iterator over the header fields.",39,null],[11,"len","","Returns the number of headers in the map.",39,null],[11,"clear","","Remove all headers from the map.",39,null],[11,"eq","","",39,null],[11,"fmt","","",39,null],[11,"fmt","","",39,null],[11,"extend","","",39,null],[11,"from_iter","","",39,{"inputs":[{"name":"i"}],"output":{"name":"headers"}}],[11,"clone","websocket::server::request","",14,null],[11,"eq","","",14,null],[11,"ne","","",14,null],[11,"fmt","","",14,null],[11,"from_str","","",14,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",14,null],[11,"new","websocket::stream","Creates a new socket address from the (ip, port) pair.",26,{"inputs":[{"name":"ipaddr"},{"name":"u16"}],"output":{"name":"socketaddr"}}],[11,"ip","","Returns the IP address associated with this socket address.",26,null],[11,"set_ip","","Change the IP address associated with this socket address.",26,null],[11,"port","","Returns the port number associated with this socket address.",26,null],[11,"set_port","","Change the port number associated with this socket address.",26,null],[11,"fmt","","",26,null],[11,"hash","","",26,null],[11,"eq","","",26,null],[11,"ne","","",26,null],[11,"clone","","",26,null],[11,"fmt","","",26,null],[11,"to_socket_addrs","","",26,null],[11,"connect","","Opens a TCP connection to a remote host.",40,{"inputs":[{"name":"a"}],"output":{"name":"result"}}],[11,"peer_addr","","Returns the socket address of the remote peer of this TCP connection.",40,null],[11,"local_addr","","Returns the socket address of the local half of this TCP connection.",40,null],[11,"shutdown","","Shuts down the read, write, or both halves of this connection.",40,null],[11,"try_clone","","Creates a new independently owned handle to the underlying socket.",40,null],[11,"set_read_timeout","","Sets the read timeout to the timeout specified.",40,null],[11,"set_write_timeout","","Sets the write timeout to the timeout specified.",40,null],[11,"read_timeout","","Returns the read timeout of this socket.",40,null],[11,"write_timeout","","Returns the write timeout of this socket.",40,null],[11,"set_nodelay","","Sets the value of the `TCP_NODELAY` option on this socket.",40,null],[11,"nodelay","","Gets the value of the `TCP_NODELAY` option on this socket.",40,null],[11,"set_ttl","","Sets the value for the `IP_TTL` option on this socket.",40,null],[11,"ttl","","Gets the value of the `IP_TTL` option for this socket.",40,null],[11,"take_error","","Get the value of the `SO_ERROR` option on this socket.",40,null],[11,"set_nonblocking","","Moves this TCP stream into or out of nonblocking mode.",40,null],[11,"read","","",40,null],[11,"read_to_end","","",40,null],[11,"write","","",40,null],[11,"flush","","",40,null],[11,"fmt","","",40,null],[11,"from_str","","",26,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",27,null],[11,"eq","","",27,null],[11,"clone","","",27,null],[11,"as_raw_fd","","",40,null],[11,"from_raw_fd","","",40,{"inputs":[{"name":"i32"}],"output":{"name":"tcpstream"}}],[11,"into_raw_fd","","",40,null]],"paths":[[8,"Message"],[8,"Sender"],[8,"Receiver"],[3,"DataFrameIterator"],[3,"MessageIterator"],[3,"DataFrameHeader"],[3,"DataFrameFlags"],[3,"Masker"],[8,"ToWebSocketUrlComponents"],[8,"DataFrame"],[3,"Request"],[3,"Response"],[3,"Client"],[3,"Url"],[4,"RequestUri"],[3,"Request"],[3,"Response"],[3,"Server"],[3,"Connection"],[3,"DataFrame"],[4,"Opcode"],[3,"Message"],[4,"Type"],[8,"IntoCowBytes"],[4,"WebSocketError"],[4,"WSUrlErrorKind"],[4,"SocketAddr"],[4,"Shutdown"],[4,"WebSocketStream"],[3,"WebSocketKey"],[3,"WebSocketProtocol"],[3,"Origin"],[4,"WebSocketVersion"],[3,"WebSocketAccept"],[3,"WebSocketExtensions"],[3,"Extension"],[3,"Parameter"],[3,"Receiver"],[3,"Sender"],[3,"Headers"],[3,"TcpStream"]]}; initSearch(searchIndex);