var searchIndex = {}; searchIndex["maidsafe_utilities"] = {"doc":"# MaidSafe Utilities","items":[[3,"SeededRng","maidsafe_utilities","A [fast pseudorandom number generator]\n(https://doc.rust-lang.org/rand/rand/struct.XorShiftRng.html) for use in tests which allows\nseeding and prints the seed when the thread in which it is created panics.",null,null],[5,"big_endian_sip_hash","","Generates a deterministic Sip hash from `data`, regardless of the endianness of the host\nmachine.",null,{"inputs":[{"name":"t"}],"output":{"name":"u64"}}],[0,"thread","","Utilities related to threading.",null,null],[3,"Joiner","maidsafe_utilities::thread","A RAII style thread joiner. The destruction of an instance of this type will block until\nthe thread it is managing has joined.",null,null],[5,"named","","This function is intended to be used in all cases where we want to spawn a new thread with a\ngiven name and panic if we fail to create the thread.",null,{"inputs":[{"name":"s"},{"name":"f"}],"output":{"name":"joiner"}}],[6,"RaiiThreadJoiner","","Deprecated name for `Joiner`",null,null],[11,"new","","Create a new instance of self-managing thread joiner",0,{"inputs":[{"name":"joinhandle"}],"output":{"name":"joiner"}}],[11,"detach","","Releases the `Joiner` by detaching the thread.",0,null],[11,"drop","","",0,null],[0,"event_sender","maidsafe_utilities","Utilities related to event-subsetting.",null,null],[3,"EventSender","maidsafe_utilities::event_sender","This structure is coded to achieve event-subsetting. Receivers in Rust are blocking. One cannot\nlisten to multiple receivers at the same time except by using `try_recv` which again is bad for\nthe same reasons spin-lock based on some sleep is bad (wasting cycles, 50% efficient on an\naverage etc.).",null,null],[4,"EventSenderError","","Errors that can be returned by `EventSender`",null,null],[13,"EventSubset","","Error sending the event subset",1,null],[13,"Category","","Error sending the event category",1,null],[4,"MaidSafeEventCategory","","Category of events meant for a MaidSafe observer listening to both, routing and crust events",null,null],[13,"Crust","","Used by Crust to indicate a Crust Event has been fired",2,null],[13,"Routing","","Used by Routing to indicate a Routing Event has been fired",2,null],[6,"MaidSafeObserver","","Observer that Crust (and users of Routing if required) must allow to be registered",null,null],[11,"fmt","","",1,null],[11,"fmt","","",3,null],[11,"new","","Create a new instance of `EventSender`. Category type, category value and EventSubset type\nare baked into `EventSender` to disallow user code from misusing it.",3,{"inputs":[{"name":"sender"},{"name":"category"},{"name":"sender"}],"output":{"name":"eventsender"}}],[11,"send","","Fire an allowed event/signal to the observer.",3,null],[11,"clone","","",3,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[0,"log","maidsafe_utilities","Allows initialising the `env_logger` with a standard message format.\nThese functions can initialise logging for output to stdout only, or to a file and stdout. For\nmore fine-grained control, create a file called `log.toml` in the root directory of the project,\nor in the same directory where the executable is. See [log4rs docs]\n(http://sfackler.github.io/log4rs/doc/v0.3.3/log4rs/index.html) for details about the format and\nstructure of this file.",null,null],[5,"init","maidsafe_utilities::log","Initialises the `env_logger` for output to stdout.",null,{"inputs":[{"name":"bool"}],"output":{"name":"result"}}],[5,"init_to_file","","Initialises the `env_logger` for output to a file and optionally to the console asynchronously.",null,{"inputs":[{"name":"bool"},{"name":"p"},{"name":"bool"}],"output":{"name":"result"}}],[5,"init_to_server","","Initialises the `env_logger` for output to a server and optionally to the console\nasynchronously.",null,{"inputs":[{"name":"a"},{"name":"bool"},{"name":"bool"}],"output":{"name":"result"}}],[5,"init_to_web_socket","","Initialises the `env_logger` for output to a web socket and optionally to the console\nasynchronously. The log which goes to the web-socket will be both verbose and in JSON as\nfilters should be present in web-servers to manipulate the output/view.",null,{"inputs":[{"name":"u"},{"name":"bool"},{"name":"bool"}],"output":{"name":"result"}}],[17,"MSG_TERMINATOR","","Message terminator for streaming to Log Servers. Servers must look out for this sequence which\ndemarcates the end of a particular log message.",null,null],[11,"new","maidsafe_utilities","Construct a new `SeededRng` using a seed generated from cryptographically secure random\ndata.",4,{"inputs":[],"output":{"name":"self"}}],[11,"from_seed","","Construct a new `SeededRng` using `seed`.",4,null],[11,"new_rng","","Construct a new [`XorShiftRng`](https://doc.rust-lang.org/rand/rand/struct.XorShiftRng.html)\nusing a seed generated from random data provided by `self`.",4,null],[11,"default","","",4,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",4,null],[11,"fmt","","",4,null],[11,"drop","","",4,null],[11,"next_u32","","",4,null],[0,"serialisation","","Functions for serialisation and deserialisation",null,null],[4,"SerialisationError","maidsafe_utilities::serialisation","Serialisation error.",null,null],[13,"Serialise","","Error during serialisation (encoding).",5,null],[13,"Deserialise","","Error during deserialisation (decoding).",5,null],[5,"serialise","","Serialise an Encodable type using default max size limit.",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[5,"serialise_with_limit","","Serialise an Encodable type with max limit specified.",null,{"inputs":[{"name":"t"},{"name":"sizelimit"}],"output":{"name":"result"}}],[5,"deserialise","","Deserialise a Decodable type using default max size limit.",null,null],[5,"deserialise_with_limit","","Deserialise a Decodable type with max size limit specified.",null,null],[5,"serialise_into","","Serialise an Encodable type directly into a Write with default size limit.",null,{"inputs":[{"name":"t"},{"name":"w"}],"output":{"name":"result"}}],[5,"serialise_into_with_limit","","Serialise an Encodable type directly into a Write with max size limit specified.",null,{"inputs":[{"name":"t"},{"name":"w"},{"name":"sizelimit"}],"output":{"name":"result"}}],[5,"deserialise_from","","Deserialise a Decodable type directly from a Read with default size limit.",null,{"inputs":[{"name":"r"}],"output":{"name":"result"}}],[5,"deserialise_from_with_limit","","Deserialise a Decodable type directly from a Read with max size limit specified.",null,{"inputs":[{"name":"r"},{"name":"sizelimit"}],"output":{"name":"result"}}],[11,"fmt","","",5,null],[11,"fmt","","",5,null],[11,"description","","",5,null],[11,"cause","","",5,null],[11,"from","","",5,{"inputs":[{"name":"encodingerror"}],"output":{"name":"serialisationerror"}}],[11,"from","","",5,{"inputs":[{"name":"decodingerror"}],"output":{"name":"serialisationerror"}}],[14,"unwrap_result!","maidsafe_utilities","A replacement for calling `unwrap()` on a `Result`.",null,null],[14,"unwrap_option!","","A replacement for calling `unwrap()` on an `Option`.",null,null],[14,"thread!","","This macro is intended to be used in all cases where we want to spawn a new thread of execution\nand if that is not possible then panic out.",null,null]],"paths":[[3,"Joiner"],[4,"EventSenderError"],[4,"MaidSafeEventCategory"],[3,"EventSender"],[3,"SeededRng"],[4,"SerialisationError"]]}; initSearch(searchIndex);