var searchIndex = {}; searchIndex["bip_util"] = {"doc":"Utilities used by the Bittorrent Infrastructure Project.","items":[[5,"fisher_shuffle","bip_util","Applies a Fisher-Yates shuffle on the given list.",null,null],[0,"bt","","Bittorrent specific types.",null,null],[6,"NodeId","bip_util::bt","Bittorrent NodeId.",null,null],[6,"PeerId","","Bittorrent PeerId.",null,null],[6,"InfoHash","","Bittorrent InfoHash.",null,null],[17,"NODE_ID_LEN","","Length of a NodeId.",null,null],[17,"PEER_ID_LEN","","Length of a PeerId.",null,null],[17,"INFO_HASH_LEN","","Length of an InfoHash.",null,null],[0,"convert","bip_util","Converting between data.",null,null],[5,"four_bytes_to_array","bip_util::convert","Convert a 4 byte value to an array of 4 bytes.",null,null],[5,"eight_bytes_to_array","","Convert an 8 byte value to an array of 8 bytes.",null,null],[5,"ipv4_to_bytes_be","","Convert an ipv4 address to an array of 4 bytes big endian.",null,null],[5,"ipv6_to_bytes_be","","Convert an ipv6 address to an array of 16 bytes big endian.",null,null],[5,"port_to_bytes_be","","",null,null],[5,"sock_v4_to_bytes_be","","Convert a v4 socket address to an array of 6 bytes big endian.",null,null],[5,"sock_v6_to_bytes_be","","Convert a v6 socket address to an array of 18 bytes big endian.",null,null],[5,"bytes_be_to_ipv4","","Convert an array of 4 bytes big endian to an ipv4 address.",null,null],[5,"bytes_be_to_ipv6","","Convert an array of 16 bytes big endian to an ipv6 address.",null,null],[5,"bytes_be_to_port","","Convert an array of 2 bytes big endian to a port.",null,null],[5,"bytes_be_to_sock_v4","","Convert an array of 6 bytes big endian to a v4 socket address.",null,null],[5,"bytes_be_to_sock_v6","","Convert an array of 18 bytes big endian to a v6 socket address.",null,null],[0,"net","bip_util","Networking primitives and helpers.",null,null],[4,"IpAddr","bip_util::net","Abstraction of some ip address.",null,null],[13,"V4","","",0,null],[13,"V6","","",0,null],[5,"default_route_v4","","Get the default route ipv4 socket.",null,{"inputs":[],"output":{"name":"socketaddr"}}],[11,"hash","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"from_socket_addr","","Create a new IpAddr from the given SocketAddr.",0,{"inputs":[{"name":"socketaddr"}],"output":{"name":"ipaddr"}}],[0,"sha","bip_util","Hash primitives and helpers.",null,null],[3,"ShaHashBuilder","bip_util::sha","Building ShaHash objects by adding byte slices to the hash.",null,null],[3,"ShaHash","","SHA-1 hash wrapper type for performing operations on the hash.",null,null],[3,"XorBits","","Iterator over the bits of a xor operation.",null,null],[3,"Bits","","Iterator over some bits.",null,null],[4,"XorRep","","Representation of a bit after a xor operation.",null,null],[13,"Diff","","Bits were equal (1).",1,null],[13,"Same","","Bits were not equal (0).",1,null],[4,"BitRep","","Representation of a bit.",null,null],[13,"Set","","Bit is set (1).",2,null],[13,"Unset","","Bit is not set (0).",2,null],[11,"clone","","",3,null],[11,"new","","Create a new ShaHashBuilder.",3,{"inputs":[],"output":{"name":"shahashbuilder"}}],[11,"add_bytes","","Add bytes to the ShaHashBuilder.",3,null],[11,"build","","Build the ShaHash from the ShaHashBuilder.",3,null],[17,"SHA_HASH_LEN","","Length of a SHA-1 hash.",null,null],[11,"cmp","","",4,null],[11,"partial_cmp","","",4,null],[11,"lt","","",4,null],[11,"le","","",4,null],[11,"gt","","",4,null],[11,"ge","","",4,null],[11,"fmt","","",4,null],[11,"hash","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"from_bytes","","Create a ShaHash by hashing the given bytes.",4,null],[11,"from_hash","","Create a ShaHash directly from the given hash.",4,null],[11,"bits","","",4,null],[11,"len","","",4,{"inputs":[],"output":{"name":"usize"}}],[11,"as_ref","","",4,null],[11,"into","","",4,null],[11,"from","","",4,null],[11,"eq","","",4,null],[11,"bitxor","","",4,null],[11,"fmt","","",1,null],[11,"hash","","",1,null],[11,"eq","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",5,null],[11,"hash","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"clone","","",5,null],[11,"next","","",5,null],[11,"fmt","","",2,null],[11,"hash","","",2,null],[11,"eq","","",2,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"fmt","","",6,null],[11,"hash","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"clone","","",6,null],[11,"next","","",6,null],[0,"test","bip_util","Testing fixtures for dependant crates.",null,null],[5,"travel_into_future","bip_util::test","Allows us to time travel into the future.",null,{"inputs":[{"name":"duration"}],"output":{"name":"datetime"}}],[5,"travel_into_past","","Allows us to time travel into the past.",null,{"inputs":[{"name":"duration"}],"output":{"name":"datetime"}}],[5,"dummy_ipv4_addr","","Generates a dummy Ipv4 address as an IpAddr.",null,{"inputs":[],"output":{"name":"ipaddr"}}],[5,"dummy_ipv6_addr","","Generates a dummy ipv6 address as an IpAddr.",null,{"inputs":[],"output":{"name":"ipaddr"}}],[5,"dummy_socket_addr_v4","","Generates a dummy socket address v4 as a SocketAddr.",null,{"inputs":[],"output":{"name":"socketaddr"}}],[5,"dummy_block_socket_addrs","","Generates a block of unique ipv4 addresses as Vec<SocketAddr>",null,{"inputs":[{"name":"u16"}],"output":{"name":"vec"}}],[5,"dummy_node_id","","Generates a dummy node id as a NodeId.",null,{"inputs":[],"output":{"name":"nodeid"}}],[5,"dummy_block_node_ids","","Generates a block of unique dummy node ids as Vec<NodeId>",null,{"inputs":[{"name":"u8"}],"output":{"name":"vec"}}],[0,"trans","bip_util","Generating transaction ids.",null,null],[3,"TIDGenerator","bip_util::trans","Generates blocks of transaction ids where each block is shuffled before being used.",null,null],[11,"new","","Create a new TIDGenerator.",7,{"inputs":[],"output":{"name":"tidgenerator"}}],[11,"generate","","Grab the next transaction id that was generated.",7,null],[0,"error","bip_util","Common error types.",null,null],[3,"LengthError","bip_util::error","Generic length error for various types.",null,null],[4,"LengthErrorKind","","Enumeraters a set of length related errors.",null,null],[13,"LengthExceeded","","Length exceeded an expected size.",8,null],[13,"LengthExpected","","Length is not equal to an expected size.",8,null],[13,"LengthMultipleExpected","","Length is not a multiple of an expected size.",8,null],[6,"LengthResult","","Result type for a LengthError.",null,null],[11,"fmt","","",8,null],[11,"hash","","",8,null],[11,"eq","","",8,null],[11,"clone","","",8,null],[11,"fmt","","",9,null],[11,"hash","","",9,null],[11,"eq","","",9,null],[11,"ne","","",9,null],[11,"clone","","",9,null],[11,"new","","Create a LengthError.",9,{"inputs":[{"name":"lengtherrorkind"},{"name":"usize"}],"output":{"name":"lengtherror"}}],[11,"with_index","","Create a LengthError for a given element index.",9,{"inputs":[{"name":"lengtherrorkind"},{"name":"usize"},{"name":"usize"}],"output":{"name":"lengtherror"}}],[11,"length","","Error is with the given length/length multiple.",9,null],[11,"index","","Error is for the element at the given index.",9,null]],"paths":[[4,"IpAddr"],[4,"XorRep"],[4,"BitRep"],[3,"ShaHashBuilder"],[3,"ShaHash"],[3,"XorBits"],[3,"Bits"],[3,"TIDGenerator"],[4,"LengthErrorKind"],[3,"LengthError"]]}; initSearch(searchIndex);