Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cabal-club/cable.rs
/ functions
Functions
300 in github.com/cabal-club/cable.rs
⨍
Functions
300
◇
Types & classes
56
↓ 48 callers
Function
length
Determine the length of an unsigned 64 bit integer.
desert/src/varint.rs:42
↓ 45 callers
Function
encode
Encode an unsigned 64 bit integer as a varint and write the bytes to the given buffer, returning the byte length of the value.
desert/src/varint.rs:25
↓ 43 callers
Method
to_bytes
Convert a `Post` data type to bytes.
cable/src/post.rs:354
↓ 42 callers
Function
decode
Decode a varint into an unsigned 64 bit integer (includes offset in result).
desert/src/varint.rs:4
↓ 21 callers
Method
raise
(self)
cable/src/error.rs:37
↓ 18 callers
Method
read_message_from_stream
Read an encrypted message from the given stream and return it as a byte vector. This method essentially reads two messages from the stream: the unenc
handshake/src/post_handshake.rs:72
↓ 16 callers
Function
init
Initialise the logger in test mode. Set `is_test()` to `false` if you wish to see logging output during the test run.
cable_core/tests/channel_state.rs:79
↓ 16 callers
Method
raise
(self)
desert/src/error.rs:22
↓ 14 callers
Method
new_req_id
Generate a new request ID.
cable_core/src/manager.rs:161
↓ 14 callers
Method
next
(&mut self)
length_prefixed_stream/src/lib.rs:81
↓ 12 callers
Method
send
Send a message to a single peer identified by the given peer ID.
cable_core/src/manager.rs:759
↓ 11 callers
Method
post_text
Publish a new text post and return the hash.
cable_core/src/manager.rs:480
↓ 10 callers
Method
get_public_key
Retrieve the public key of the local peer.
cable_core/src/manager.rs:147
↓ 10 callers
Function
validate_channel
Validate the length of a channel name (1 to 64 UTF-8 codepoints).
cable/src/validation.rs:6
↓ 10 callers
Method
write_message_to_stream
Encrypt and write a message to the stream, returning the byte size of the written payload. This method essentially writes at least two messages to th
handshake/src/post_handshake.rs:190
↓ 8 callers
Function
client
Initiate the handshake over a synchronous stream and run to completion.
handshake/src/sync/handshake.rs:16
↓ 8 callers
Method
read_message_from_async_stream
Read an encrypted message from the given asynchronous stream and return it as a byte vector. This method essentially reads two messages from the stre
handshake/src/post_handshake.rs:104
↓ 8 callers
Function
server
Respond to a handshake over a synchronous stream and run to completion.
handshake/src/sync/handshake.rs:60
↓ 8 callers
Method
to_bytes
Convert a `Message` data type to bytes.
cable/src/message.rs:524
↓ 8 callers
Method
write_eos_marker_to_stream
Write an end-of-stream marker (zero-length message) to the stream.
handshake/src/post_handshake.rs:205
↓ 7 callers
Method
read_message
Read an encrypted message of the given length from the receive buffer, decrypt and return it as a byte vector. This method handles defragmentation of
handshake/src/post_handshake.rs:31
↓ 7 callers
Method
sign
Sign a post using the given secret key.
cable/src/post.rs:300
↓ 7 callers
Method
write_message
Encrypt and write a message to the send buffer, returning the total number of written bytes. This method handles message fragmentation in the case th
handshake/src/post_handshake.rs:143
↓ 6 callers
Function
decode
( input: impl AsyncRead + Send + Sync + Unpin + 'static, )
length_prefixed_stream/src/lib.rs:26
↓ 6 callers
Method
insert_post_payload
(&mut self, hash: &Hash, payload: Payload)
cable_core/src/store.rs:967
↓ 6 callers
Method
major
Return the major version identifier.
handshake/src/version.rs:26
↓ 6 callers
Method
post
Publish a post and return the hash.
cable_core/src/manager.rs:587
↓ 5 callers
Method
decrement_ttl_and_write_to_outbound
Decrement the TTL of a request message and write it to the outbound requests store.
cable_core/src/manager.rs:768
↓ 5 callers
Method
get_timestamp
Return the timestamp of the post.
cable/src/post.rs:255
↓ 5 callers
Method
listen
Listen for incoming peer messages and respond with locally-generated messages. Decode each received message and pass it off to the handler.
cable_core/src/manager.rs:270
↓ 5 callers
Function
now
Get the current system time in milliseconds since the UNIX epoch.
cable_core/tests/channel_time_range.rs:67
↓ 5 callers
Method
recv_client_version
Receive the version data from the client and validate it before advancing to the next client state.
handshake/src/lib.rs:396
↓ 5 callers
Method
recv_server_version
Receive the version data from the server and validate it before advancing to the next client state. Terminate the handshake with an error if the majo
handshake/src/lib.rs:240
↓ 5 callers
Method
send_client_version
Send the client version data to the server and advance to the next client state.
handshake/src/lib.rs:222
↓ 5 callers
Method
send_server_version
Send server version data to the client and advance to the next server state.
handshake/src/lib.rs:417
↓ 5 callers
Function
validate_topic
Validate the length of a topic name (1 to 512 UTF-8 codepoints).
cable/src/validation.rs:38
↓ 5 callers
Method
write_bytes
(&self, dst: &mut [u8])
desert/src/lib.rs:326
↓ 4 callers
Method
get_channel
Return the channel name associated with a post.
cable/src/post.rs:235
↓ 4 callers
Method
post_header_values
Post header value generator.
cable_core/src/manager.rs:464
↓ 4 callers
Method
write_eos_marker_to_async_stream
Write an end-of-stream marker (zero-length message) to the asynchronous stream.
handshake/src/post_handshake.rs:235
↓ 4 callers
Method
write_message_to_async_stream
Encrypt and write a message to the asynchronous stream, returning the byte size of the written payload. This method essentially writes at least two m
handshake/src/post_handshake.rs:219
↓ 3 callers
Method
broadcast
Broadcast a message to all peers.
cable_core/src/manager.rs:751
↓ 3 callers
Method
build_client_noise_state_machine
Build the Noise handshake state machine for the client with the PSK and private key.
handshake/src/lib.rs:266
↓ 3 callers
Method
build_server_noise_state_machine
Build the Noise handshake state machine for the server with the PSK and private key.
handshake/src/lib.rs:435
↓ 3 callers
Method
count_bytes
(&self)
desert/src/lib.rs:296
↓ 3 callers
Method
count_bytes_be
(&self)
desert/src/lib.rs:306
↓ 3 callers
Method
count_bytes_le
(&self)
desert/src/lib.rs:316
↓ 3 callers
Function
decode_with_options
( input: impl AsyncRead + Send + Sync + Unpin + 'static, options: DecodeOptions, )
length_prefixed_stream/src/lib.rs:32
↓ 3 callers
Method
init_client_transport_mode
Complete the client handshake by initialising the encrypted transport.
handshake/src/lib.rs:361
↓ 3 callers
Function
init_handshakers
( client_version: (u8, u8), server_version: (u8, u8), )
handshake/src/lib.rs:550
↓ 3 callers
Method
init_server_transport_mode
Complete the server handshake by initialising the encrypted transport.
handshake/src/lib.rs:528
↓ 3 callers
Function
now
Generate a timestamp for the current time.
cable_core/src/manager.rs:84
↓ 3 callers
Method
recv_client_ephemeral_key
Receive the ephemeral key from the client and advance to the next server state.
handshake/src/lib.rs:454
↓ 3 callers
Method
recv_client_static_key
Receive the static key from the clientand advance to the next server state.
handshake/src/lib.rs:500
↓ 3 callers
Method
recv_server_ephemeral_and_static_key
Receive the ephemeral and static keys from the server and advance to the next client state.
handshake/src/lib.rs:310
↓ 3 callers
Method
send_client_ephemeral_key
Send the client ephemeral key to the server and advance to the next client state.
handshake/src/lib.rs:286
↓ 3 callers
Method
send_client_static_key
Send the client static key to the server and advance to the next client state.
handshake/src/lib.rs:338
↓ 3 callers
Method
send_server_ephemeral_and_static_key
Send the ephemeral and static keys to the client and advance to the next server state.
handshake/src/lib.rs:476
↓ 3 callers
Method
to_bytes
(&self)
desert/src/lib.rs:322
↓ 3 callers
Method
update_posts
( &mut self, post: &Post, channel: Option<Channel>, timestamp: &Timestamp,
cable_core/src/store.rs:914
↓ 3 callers
Method
write_bytes_be
(&self, dst: &mut [u8])
desert/src/lib.rs:344
↓ 3 callers
Method
write_bytes_le
(&self, dst: &mut [u8])
desert/src/lib.rs:354
↓ 2 callers
Function
build_noise_state_machine
Initialise the Noise handshake state machine according to the given role, ie. initiator or responder.
handshake/src/lib.rs:179
↓ 2 callers
Method
get_channel_members
(&self, channel: &Channel)
cable_core/src/store.rs:344
↓ 2 callers
Method
get_channel_membership_hashes
(&self, channel: &Channel)
cable_core/src/store.rs:386
↓ 2 callers
Method
get_channel_topic_and_hash
(&self, channel: &Channel)
cable_core/src/store.rs:476
↓ 2 callers
Method
get_channels
(&self)
cable_core/src/store.rs:329
↓ 2 callers
Method
get_or_create_keypair
Retrieve the keypair associated with the store, creating a new keypair if one does not yet exist.
cable_core/src/store.rs:69
↓ 2 callers
Method
get_peer_name_and_hash
(&self, public_key: &PublicKey)
cable_core/src/store.rs:606
↓ 2 callers
Method
get_post_hashes
(&self, opts: &ChannelOptions)
cable_core/src/store.rs:764
↓ 2 callers
Method
hash
Return the hash of the post.
cable/src/post.rs:262
↓ 2 callers
Function
help
()
handshake/examples/tcp.rs:16
↓ 2 callers
Function
help
()
handshake/examples/unix.rs:19
↓ 2 callers
Function
help
()
handshake/examples/async_tcp.rs:15
↓ 2 callers
Function
help
()
handshake/examples/cli.rs:14
↓ 2 callers
Method
insert_channel
(&mut self, channel: &Channel)
cable_core/src/store.rs:339
↓ 2 callers
Method
insert_post
(&mut self, post: &Post)
cable_core/src/store.rs:792
↓ 2 callers
Method
message_type
Return the numeric type identifier for the message.
cable/src/message.rs:45
↓ 2 callers
Method
post_info_name
Publish a new info post with the given name and return the hash.
cable_core/src/manager.rs:525
↓ 2 callers
Method
post_topic
Publish a new topic post for the given channel and return the hash.
cable_core/src/manager.rs:540
↓ 2 callers
Method
post_type
Return the numeric type identifier for the post.
cable/src/post.rs:287
↓ 2 callers
Method
raise
(self)
length_prefixed_stream/src/error.rs:21
↓ 2 callers
Method
req_id
(&self)
cable_core/src/manager.rs:57
↓ 2 callers
Method
send_post_hashes
Send post hashes matching peer request parameters for all live requests. Live requests may have originated from a ChannelTimeRange (`time_end` of 0)
cable_core/src/manager.rs:627
↓ 2 callers
Method
send_post_to_live_streams
(&self, post: &Post, channel: &Channel)
cable_core/src/store.rs:980
↓ 2 callers
Function
setup
()
handshake/tests/async_handshake.rs:20
↓ 2 callers
Function
setup
()
handshake/examples/tcp.rs:27
↓ 2 callers
Function
setup
()
handshake/examples/unix.rs:30
↓ 2 callers
Function
setup
()
handshake/examples/async_tcp.rs:26
↓ 2 callers
Function
setup
()
handshake/examples/cli.rs:26
↓ 2 callers
Method
to_bytes
(&self)
desert/tests/custom.rs:16
↓ 2 callers
Method
update_channel_membership_hashes
( &mut self, channel: &Channel, public_key: &PublicKey, hash: &Hash, )
cable_core/src/store.rs:416
↓ 2 callers
Function
validate_text
Validate the length of a post's text (less than or equal to 4096 bytes).
cable/src/validation.rs:22
↓ 1 callers
Function
cleanup
()
handshake/benches/message_sync.rs:94
↓ 1 callers
Function
cleanup
()
handshake/benches/handshake_sync.rs:65
↓ 1 callers
Function
client_handshake
()
handshake/tests/async_handshake.rs:35
↓ 1 callers
Method
count_bytes
Calculate the total number of bytes comprising the encoded message.
cable/src/message.rs:447
↓ 1 callers
Method
decrement_ttl
Decrement the TTL of a request-type message by one.
cable/src/message.rs:37
↓ 1 callers
Method
delete_post
(&mut self, hash: &Hash)
cable_core/src/store.rs:904
↓ 1 callers
Method
get_delete_hashes
(&self, public_key: &PublicKey)
cable_core/src/store.rs:533
next →
1–100 of 300, ranked by callers