Skip to main content

Module prelude

Module prelude 

Source
Expand description

Convenience import for building applications

Re-exports§

pub use crate::backend_kv_store::BackendHandler;
pub use crate::prefabs::client::peer_connection::PeerConnectionSetupAggregator;
pub use crate::prefabs::client::PrefabFunctions;
pub use crate::prefabs::client::DefaultServerConnectionSettingsBuilder;
pub use crate::prefabs::client::ServerConnectionSettings;
pub use crate::prefabs::ClientServerRemote;
pub use crate::remote_ext::remote_specialization::PeerRemote;
pub use crate::responses;
pub use crate::remote_ext::*;

Structs§

AccountManager
The default manager for handling the list of users stored locally. It also allows for user creation, and is used especially for when creating a new user via the registration service.
ActiveSessions
ArgonDefaultServerSettings
CNACMetadata
For passing metadata from a cnac
CallbackReceiver
A receiver for the tracked callback channel.
CitadelNode
CommandPath
A position in a command hierarchy: ordered segments from the root (e.g. /HQ/Bn1/Co-A/Plt-2). An empty path is the root authority. is_ancestor_of is the “superior reads subordinate” predicate.
ConnectFail
ConnectSuccess
ConnectToHypernode
ConnectionInfo
CryptoParameters
DeRegistration
DeleteObject
DeregisterFromHypernode
Disconnect
DisconnectFromHypernode
EncryptionAlgorithmIter
An iterator over the variants of EncryptionAlgorithm
ExplicitPanicFuture
Ensures that if a panic occurs in a task, the panic backtrace prints and halts the program
FcmKeys
GroupBroadcastCommand
GroupChannel
GroupChannelCreated
GroupChannelRecvHalf
GroupChannelSendHalf
GroupEvent
HostSqlHandle
The SqlHost a crate::backend::BackendType::HostSql carries. Two handles are equal only when they are the same host, which is what “the same backend” means for them.
IfEq
InternalServerError
KemAlgorithmIter
An iterator over the variants of KemAlgorithm
KernelExecutor
Creates a KernelExecutor
KernelExecutorSettings
Used for fine-tuning parameters within the [KernelExecutor]
MailboxDelivery
MessageGroupKey
MessageGroupOptions
Options for creating message groups
MonoRatchet
A compact ratchet meant for protocols that require smaller payloads
MutualPeer
This is to replace a tuple for greater organization
NativeIO
Default [ProtocolIO] implementation for native platforms.
NativeOrderedReliableConfig
Config for ordered reliable transport without encryption (TCP).
NativeP2PConfig
Config for P2P-capable transport (QUIC).
NativeSecureConfig
Config for ordered reliable secure transport (TLS).
NetworkError
The single error type used across the entire Citadel workspace.
NodeBuilder
Used to construct a running client/peer or server instance
NodeFuture
An awaitable future whose return value propagates any internal protocol or kernel-level errors
NodeRemote
allows convenient communication with the server
ObjectId
ObjectTransferHandle
ObjectTransferHandler
ObjectTransferHandlerInner
Used to keep track of file transfer progress for either sender or receiver orientation
OutboundRequestRejected
OutboundUdpSender
P2pPathCell
Shared, live view of a virtual connection’s P2pPath, read by the application’s channel and written when a P2P connection is (or is not) established.
PeerChannel
PeerChannelCreated
PeerChannelRecvHalf
A stream interface for receiving secure packets NOTE: on drop, if this is used for a P2P connection, disconnection will occur
PeerChannelSendHalf
PeerCommand
PeerEvent
PeerInfo
Contains info about a peer, used for giving the user access to usernames and names of peers
PersistenceHandler
This is what every C/NAC gets. This gets called before making I/O operations
PreSharedKey
PullObject
QuicRedirectSignal
Redirect signal carrying QUIC connection parameters.
ReKey
ReKeyResult
ReVFSResult
RegisterFailure
RegisterOkay
RegisterToHypernode
RtdbConfig
For use in the TOML config as well as for during the Post-login phase
SecBuffer
A memory-secure wrapper for shipping around Bytes
SecrecyModeIter
An iterator over the variants of SecrecyMode
SecureBufMutHandle
SecurityLevelIter
An iterator over the variants of SecurityLevel
SendObject
ServerMiscSettings
Miscellaneous settings for a node serving connections
ServerOnlySessionInitSettings
ServicesConfig
ServicesObject
Passed to the services handler post-login at the server. Intended to be passed to the client afterwards
SessionInfo
SessionList
SessionSecuritySettings
SessionSecuritySettingsBuilder
SetPeerTurnConfig
Supplies (Some) or withdraws (None) the TURN relay configuration for the next P2P attempt between session_cid and peer_cid. Both peers must supply one for the relay to be used; it is consumed by that attempt. Local only — credentials are never sent over the wire.
SigAlgorithmIter
An iterator over the variants of SigAlgorithm
SqlStatement
One statement and its positional (?) parameters.
StackedRatchet
A container meant to establish perfect forward secrecy AND scrambling w/ an independent key This is meant for messages, not file transfer. File transfers should use a single key throughout the entire file
SymmetricIdentifierHandle
A convenience structure for executing commands that depend on a specific registered user
SymmetricIdentifierHandleRef
A reference to a user identifier
TcpToQuicUpgrade
TCP-to-QUIC protocol upgrade.
Ticket
A type sent through the server when a request is made
TrackedCallbackChannel
A tracked callback channel that provides request-response tracking and monitoring.
TrackedCallbackChannelPayload
A payload for the tracked callback channel.
TransferMetadata
Platform-portable file metadata returned by PlatformOps::open_and_validate_for_transfer.
TurnRelayConfig
Everything the relay needs for one P2P attempt. Both peers must supply one; the lower-CID peer allocates, the other dials the relayed address.
TurnServerConfig
TURN server configuration for NAT traversal relay.
TurnServerCredential
One TURN server and the long-term credential used to authenticate against it.
TurnUrl
A parsed RFC 7065 TURN URI: turn:host[:port][?transport=udp|tcp] or turns:host[:port][?transport=tcp].
UdpChannel
UdpModeIter
An iterator over the variants of UdpMode
VirtualObjectMetadata
WebRTCCompatChannel
WebSocketEndpoint
A ws:// or wss:// URL naming a Citadel server.

Enums§

AuthenticationRequest
Arguments for connecting to a node
BackendType
Used when constructing the account manager
ClientConnectionType
Type of client-to-server connection.
ConnectMode
How a client asks the server to treat a login for an account that the server already holds a session for.
ConnectProtocol
For saving the state of client-side connections
EncryptionAlgorithm
GenericNetworkStream
GroupBroadcast
Enum representing different types of group broadcast messages
GroupBroadcastPayload
GroupHierarchyMode
How a group’s encryption is structured. Flat is the ordinary zero-trust CGKA where every member shares one epoch key; CommandHierarchy adds the Decentralized Hierarchy Encryption overlay where a superior can read its subordinates’ messages (see ReadPolicy).
GroupMemberAlterMode
GroupType
HeaderObfuscatorSettings
KemAlgorithm
MemberState
NodeRequest
These are sent down the stack into the server. Most of the requests expect a ticket ID in order for processes sitting above the [Kernel] to know how the request went
NodeResult
This type is for relaying results between the lower-level protocol and the higher-level kernel
NodeType
Used for determining the proper action when loading the server
ObjectTransferOrientation
ObjectTransferStatus
P2pPath
The path carrying a P2P connection’s traffic.
PeerConnectionType
Type of peer-to-peer connection.
PeerResponse
PeerSignal
ProposedCredentials
When creating credentials, this is required
ReKeyReturnType
ReadPolicy
Who can read a hierarchy-group message.
SecrecyMode
SecurityLevel
Provides the enumeration for all security levels
ServerMode
Capability-based server configuration.
SigAlgorithm
SqlValue
A value bound into, or read out of, a statement. Integers must stay within ±2^53 so a JS host can carry them as numbers; CIDs, which do not, travel as decimal text.
StorageQuota
How much RE-VFS storage a SqlHost grants.
TransferType
TurnPolicy
When the relay is used for a P2P attempt.
TurnTransport
How the client reaches the TURN server. The relayed leg (TURN server ↔ peer) is always UDP.
UdpMode
UserIdentifier
A convenience wrapper for passing arguments to functions that require searches for a user
VirtualConnectionType
Unified type representing all possible virtual connections.

Constants§

AES_GCM_NONCE_LENGTH_BYTES
ASCON_NONCE_LENGTH_BYTES
C2S_IDENTITY_CID
Constant for C2S identity (target_cid = 0 means server).
CHA_CHA_NONCE_LENGTH_BYTES
KEM_ALGORITHM_COUNT
KYBER_NONCE_LENGTH_BYTES
LARGEST_NONCE_LEN

Traits§

AlgorithmsExt
IfEqConditional
IfTrueConditional
NativeServerModeExt
Extension trait for ServerMode<NativeIO> convenience methods.
NetKernel
The NetKernel is the thread-safe interface between the single-threaded OR multi-threaded async protocol and your network application
ObjectSource
PairMap
PlatformOps
Platform-specific capabilities extending the transport abstraction.
Ratchet
For allowing registration inside the toolset
Remote
RuntimeFuture
SqlHost
SQL storage supplied by the host.
SyncIO
Convenient serialization methods for types that #[derive(Serialize, Deserialize)]
TargetLockedRemote
Then

Functions§

add_inner
calculate_optimal_argon_params
Uses: https://www.ory.sh/choose-recommended-argon2-parameters-password-hashing/ “To reach the desired execution time, you can tweak two variables. It is recommended to start with the highest amount of memory possible and one iteration. Reduce the memory until one hashing operation takes less than your desired duration. Next, advance the number of iterations to approach the desired execution time as close as possible”
load_server_endpoint
The WebSocket URL the account cid registered to, or None for an account whose server is its address.
prepare_virtual_path
read_one_packet_as_framed
username_to_cid
Generates a CID given a username.
validate_virtual_path
write_one_packet

Type Aliases§

DefaultNodeBuilder
Default node builder type using platform-appropriate transport
DefaultTransport
Platform-appropriate default transport.
LightweightNodeBuilder
Lightweight node builder using MonoRatchet for reduced cryptographic overhead
SqlRow
A result row, columns in the order the statement selected them.
TrackedCallbackError
Error type for tracked callback channel operations.
VirtualTargetType
Alias for VirtualConnectionType (for readability in target contexts).

Attribute Macros§

async_trait