repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/analyzer.rs | src/analyzer.rs | use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum AnalyzerFeature {
Frequency,
Norm,
Position,
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "lower... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/response.rs | src/response.rs | //! types to deserialize responses from arangoDB server via HTTP request, as
//! well as convenient functions to deserialize `Response`.
//!
//! For response with `error` and `code` fields indicating the whether the
//! request is successful, use `deserialize_response` to abstract over request
//! status and data of co... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/view.rs | src/view.rs | use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use typed_builder::TypedBuilder;
#[derive(Debug, Serialize, Deserialize, PartialEq)]
pub enum ViewType {
#[serde(rename = "arangosearch")]
ArangoSearchView,
}
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "lowercase... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/database.rs | src/database.rs | //! struct and enum pertain to arangoDB database
//!
//! AQL query are all executed in database level, so Database offers AQL query.
use std::{collections::HashMap, fmt::Debug, sync::Arc};
use log::trace;
use maybe_async::maybe_async;
use serde::{de::DeserializeOwned, Deserialize};
use serde_json::value::Value;
use ur... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/error.rs | src/error.rs | use std::fmt;
use serde::Deserialize;
use thiserror::Error;
use crate::connection::Permission;
#[derive(Error, Debug)]
pub enum ClientError {
#[error("Insufficient permission ({permission:?}) to operate: {operation}")]
InsufficientPermission {
permission: Permission,
operation: String,
},... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/aql.rs | src/aql.rs | /// Types related to AQL query in arangoDB.
///
/// While aql queries are performed on database, it would be ponderous to
/// place all aql query related methods and types in `arangors::database`.
///
/// Steps to perform a AQL query:
/// 1. (optional) construct a AqlQuery object.
/// - (optional) construct AqlOpti... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/query.rs | src/query.rs | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false | |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/graph.rs | src/graph.rs | //! This module facilitates the building of new named graphs as well as the
//! retrieval of existing indexes in ArangoDB.
//!
//! The various structures are following the HTTP specification as detailed in
//! this ArangoDB [section](https://www.arangodb.com/docs/stable/http/gharial-management.html)
//!
//! For detaile... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/transaction.rs | src/transaction.rs | use maybe_async::maybe_async;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::Value;
use std::{collections::HashMap, sync::Arc};
use typed_builder::TypedBuilder;
use url::Url;
use crate::{
aql::Cursor,
client::ClientExt,
collection::response::Info,
response::{deserialize_resp... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/connection/auth.rs | src/connection/auth.rs | //! Type definitions for various authentication methods.
/// According to aragndb document, supported auth methods are
/// - basicAuth
/// - JWT
/// - no auth
///
/// And this enum provides an abstraction to these methods.
///
/// Auth is then used when initialize `Connection`.
///
/// # Example
/// ```rust, ignore
//... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/connection/options.rs | src/connection/options.rs | use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
#[cfg(feature = "cluster")]
use std::collections::HashMap;
/// Options for create a collection
#[derive(Serialize, PartialEq, TypedBuilder, Clone)]
#[builder(doc)]
#[serde(rename_all = "camelCase")]
#[cfg(feature = "cluster")]
pub struct CreateData... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/connection/mod.rs | src/connection/mod.rs | //! Top level connection object that hold a http client (either synchronous or
//! asynchronous), arango URL, and buffered accessible databases object.
//!
//! ## Establishing connections
//! There is three way to establish connections:
//! - jwt
//! - basic auth
//! - no authentication
//!
//! So are the `arangors` AP... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/collection/response.rs | src/collection/response.rs | //! Types of response related to collection
use crate::collection::{options::KeyOptions, CollectionType};
use serde::{
de::{Deserializer, Error as DeError},
Deserialize,
};
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Info {
pub count: Option<u32>,
pub id: String,
pub... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/collection/options.rs | src/collection/options.rs | //! Types of response related to collection
use serde::{Deserialize, Serialize, Serializer};
use typed_builder::TypedBuilder;
use crate::collection::CollectionType;
/// Options for create a collection
#[derive(Serialize, PartialEq, TypedBuilder, Clone)]
#[builder(doc)]
#[serde(rename_all = "camelCase")]
pub struct Cr... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/collection/mod.rs | src/collection/mod.rs | //! Collection level operations
//!
//! This mod contains struct and type of colleciton info and management, as well
//! as document related operations.
use std::{convert::TryFrom, sync::Arc};
use http::Request;
use maybe_async::maybe_async;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::js... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/client/reqwest.rs | src/client/reqwest.rs | //! Reqwest HTTP client
use std::convert::TryInto;
#[cfg(any(feature = "reqwest_blocking"))]
use ::reqwest::blocking::Client;
#[cfg(any(feature = "reqwest_async"))]
use ::reqwest::Client;
use http::header::HeaderMap;
use super::ClientExt;
use crate::ClientError;
use http::HeaderValue;
#[derive(Debug, Clone)]
pub s... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/client/mod.rs | src/client/mod.rs | use http::{HeaderMap, Request, Response};
use url::Url;
use crate::ClientError;
#[cfg(any(all(feature = "reqwest_async", feature = "reqwest_blocking"),))]
compile_error!(r#"Enabling both async and blocking version of reqwest client is not allowed."#);
#[cfg(any(feature = "reqwest_async", feature = "reqwest_blocking"... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/client/surf.rs | src/client/surf.rs | //! Surf HTTP client
use std::str::FromStr;
use http::{
header::{HeaderMap, HeaderValue},
Method, StatusCode, Version,
};
use super::ClientExt;
use crate::ClientError;
#[derive(Debug, Clone)]
pub struct SurfClient {
headers: HeaderMap,
}
#[async_trait::async_trait]
impl ClientExt for SurfClient {
fn... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/document/response.rs | src/document/response.rs | //! Types of response related to document
use serde::{de::Error as DeError, Deserialize, Deserializer};
use super::Header;
/// Standard Response when having CRUD operation on document
///
/// TODO could add more response variant as shown in official doc
///
/// 200: is returned if the document was found
///
/// 304: ... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/document/options.rs | src/document/options.rs | //! Types of options related to document
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
/// Options for document insertion.
#[derive(Debug, Serialize, Deserialize, PartialEq, TypedBuilder, Clone)]
#[builder(doc)]
#[serde(rename_all = "camelCase")]
pub struct InsertOptions {
/// Wait until do... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/src/document/mod.rs | src/document/mod.rs | //! Document level types
//!
//! This mod contains document related types.
//! Operations are conducted on collection level struct
use serde::{
de::{DeserializeOwned, Error as DeError},
Deserialize, Deserializer, Serialize,
};
use std::ops::Deref;
pub mod options;
pub mod response;
#[derive(Serialize, Deseria... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/user.rs | tests/user.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use arangors::client::ClientExt;
use log::{info, trace, warn};
use pretty_assertions::assert_eq;
use serde_json::Value;
use std::collections::HashMap;
use crate::common::{get_root_user, root_connection};
use arangors::{
connection::Permission,
user::{User, Us... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/index.rs | tests/index.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use log::trace;
use pretty_assertions::assert_eq;
use serde_json::{json, Value};
use crate::common::{collection, connection};
use arangors::{
collection::{
options::{ChecksumOptions, PropertiesOptions},
response::Status,
CollectionType,
... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/analyzer.rs | tests/analyzer.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use crate::common::{collection, connection};
use log::{info, trace};
use maybe_async::maybe_async;
use pretty_assertions::assert_eq;
use std::collections::HashMap;
use arangors::{
analyzer::{
AnalyzerCase, AnalyzerFeature, AnalyzerInfo, GeoJsonAnalyzerPro... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/view.rs | tests/view.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use std::collections::HashMap;
use crate::common::{collection, connection};
use log::{info, trace};
use maybe_async::maybe_async;
use pretty_assertions::assert_eq;
use arangors::{
client::ClientExt,
collection::{
options::{ChecksumOptions, PropertiesO... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/document.rs | tests/document.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use log::trace;
use pretty_assertions::assert_eq;
use serde_json::{json, Value};
use arangors::{
document::{
options::{
InsertOptions, OverwriteMode, ReadOptions, RemoveOptions, ReplaceOptions, UpdateOptions,
},
response::Docum... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/connection.rs | tests/connection.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use arangors::client::ClientExt;
use pretty_assertions::assert_eq;
use arangors::{connection::Permission, Connection};
use common::{
connection, get_arangodb_host, get_normal_password, get_normal_user, test_root_and_normal,
test_setup,
};
pub mod common;
#[m... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/database.rs | tests/database.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use log::trace;
use pretty_assertions::assert_eq;
use arangors::Connection;
use common::{
connection, get_arangodb_host, get_normal_password, get_normal_user, get_root_password,
get_root_user, test_root_and_normal, test_setup,
};
pub mod common;
const NEW_DB... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/aql.rs | tests/aql.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use pretty_assertions::assert_eq;
use serde::{Deserialize, Serialize};
use arangors::{AqlQuery, Connection, Document};
use common::{connection, test_setup};
use crate::common::{get_arangodb_host, get_root_password, get_root_user};
pub mod common;
#[derive(Serializ... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/common.rs | tests/common.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use arangors::{connection::Connection, Collection, Database};
use std::{env, future::Future};
pub const ARANGODB_HOST: &str = "http://localhost:8529/";
pub const ROOT_USERNAME: &str = "root";
pub const ROOT_PASSWORD: &str = "KWNngteTps7XjrNv";
pub const NORMAL_USERN... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/graph.rs | tests/graph.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use log::trace;
use pretty_assertions::assert_eq;
use serde_json::{json, Value};
use arangors::{
client::ClientExt,
collection::{
options::{ChecksumOptions, PropertiesOptions},
response::Status,
CollectionType,
},
graph::*,
... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/collection.rs | tests/collection.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use log::trace;
use pretty_assertions::assert_eq;
use serde_json::{json, Value};
use crate::common::{collection, connection};
use arangors::{
collection::{
options::{ChecksumOptions, PropertiesOptions},
response::Status,
CollectionType,
... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/tests/transaction.rs | tests/transaction.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use log::trace;
use maybe_async::maybe_async;
use pretty_assertions::assert_eq;
use serde_json::{json, Value};
use crate::common::{collection, connection};
use arangors::{
client::ClientExt,
collection::{
options::{ChecksumOptions, PropertiesOptions},
... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/analyzer.rs | examples/analyzer.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use anyhow::Error;
use arangors::{
analyzer::{AnalyzerCase, AnalyzerFeature, AnalyzerInfo, NormAnalyzerProperties},
Connection,
};
use std::collections::HashMap;
const URL: &str = "http://localhost:8529";
#[cfg_attr(feature = "reqwest_async", tokio::main)]
... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/view.rs | examples/view.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use anyhow::Error;
use arangors::{
view::{ArangoSearchViewLink, ArangoSearchViewPropertiesOptions, ViewOptions},
Connection,
};
use std::collections::HashMap;
const URL: &str = "http://localhost:8529";
#[cfg_attr(feature = "reqwest_async", tokio::main)]
#[c... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/document.rs | examples/document.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use anyhow::Error;
use arangors::{document::options::InsertOptions, Collection, Connection};
use arangors::document::{
options::{RemoveOptions, ReplaceOptions, UpdateOptions},
response::DocumentResponse,
};
use serde::{Deserialize, Serialize};
use serde_json... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/custom_client.rs | examples/custom_client.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
//! You might want you stick with certain ecosystem like reqwest or actix-web,
//! and don't want to mingle two ecosystem, since it significantly increase
//! compile time and binary size.
//!
//! Arangors offers you flexibility to use any HTTP client you like for bot... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/database.rs | examples/database.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use anyhow::Error;
use arangors::Connection;
const URL: &str = "http://localhost:8529";
#[cfg_attr(feature = "reqwest_async", tokio::main)]
#[cfg_attr(feature = "surf_async", async_std::main)]
#[cfg_attr(feature = "reqwest_blocking", maybe_async::must_be_sync)]
asy... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/aql.rs | examples/aql.rs | //! Sync and async version share the exactly same API, except that async API
//! must be awaited.
#![allow(unused_imports)]
#![allow(unused_parens)]
use std::io::Write;
use serde::{Deserialize, Serialize};
use serde_json::value::Value;
use arangors::{AqlQuery, Connection};
use std::collections::HashMap;
const URL:... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/collection.rs | examples/collection.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use anyhow::Error;
use arangors::Connection;
const URL: &str = "http://localhost:8529";
#[cfg_attr(feature = "reqwest_async", tokio::main)]
#[cfg_attr(feature = "surf_async", async_std::main)]
#[cfg_attr(feature = "reqwest_blocking", maybe_async::must_be_sync)]
asy... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/transaction.rs | examples/transaction.rs | #![allow(unused_imports)]
#![allow(unused_parens)]
use anyhow::Error;
use arangors::{
transaction::{TransactionCollections, TransactionSettings},
Connection, Document,
};
use log::info;
use serde_json::{json, Value};
const URL: &str = "http://localhost:8529";
#[cfg_attr(feature = "reqwest_async", tokio::main... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/reqwest_rustls/src/client.rs | examples/reqwest_rustls/src/client.rs | //! Reqwest HTTP client
use std::convert::TryInto;
use ::reqwest::Client;
use http::header::HeaderMap;
use arangors::client::ClientExt;
use arangors::transaction::TRANSACTION_HEADER;
use arangors::ClientError;
#[derive(Debug, Clone)]
pub struct ReqwestClient {
pub client: Client,
pub headers: HeaderMap,
}
#... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/reqwest_rustls/src/main.rs | examples/reqwest_rustls/src/main.rs | //! An example to use reqwest with rustls.
//!
//! 1. use vanilla arangors without any http client implementation by disabling
//! `reqwest_async`, `reqwest_blocking` and `surf_async` on arangors.
//! 2. implement custom reqwest client and enable `rustls` feature gate like in `src/client.rs`.
//! 3. use custom client w... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
fMeow/arangors | https://github.com/fMeow/arangors/blob/4ee57cfdce34a504d94108dedce5abc11809de87/examples/blocking/src/main.rs | examples/blocking/src/main.rs | // exact same API except that you don't need to await
fn main() -> Result<(), Error> {
let conn = Connection::establish_jwt(URL, "username", "password")?;
let database = conn.db("test_db")?;
let collections = database.accessible_collections()?;
println!("{:?}", collections);
let collections = data... | rust | MIT | 4ee57cfdce34a504d94108dedce5abc11809de87 | 2026-01-04T20:24:21.210590Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/lib.rs | library/src/lib.rs | /*!
This crate provides an easy-to-use wrapper around `WebRTC` and `DataChannels` for a peer to peer connections.
# Overview
As creator of [agar.io](https://agar.io) famously stated [`WebRTC` is hard](https://news.ycombinator.com/item?id=13264952).
This library aims to help, by abstracting away all the setup, and pro... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/error.rs | library/src/error.rs | pub type Result<T> = anyhow::Result<T>;
pub type Error = anyhow::Error;
| rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/utils.rs | library/src/utils.rs | use anyhow::anyhow;
use js_sys::{Array, Object, Reflect};
use log::debug;
use wasm_bindgen::closure::Closure;
use wasm_bindgen::{JsCast, JsValue};
use wasm_bindgen_futures::JsFuture;
use wasm_peers_protocol::SessionId;
use web_sys::{RtcConfiguration, RtcPeerConnection, RtcSdpType, RtcSessionDescriptionInit};
/// Retur... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/constants.rs | library/src/constants.rs | pub(crate) const DEFAULT_MAX_RETRANSMITS: u16 = 10;
| rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/one_to_many/callbacks.rs | library/src/one_to_many/callbacks.rs | use js_sys::Uint8Array;
use log::{debug, error, info};
use serde::de::DeserializeOwned;
use wasm_bindgen::closure::Closure;
use wasm_bindgen::{JsCast, JsValue};
use wasm_peers_protocol::one_to_many::SignalMessage;
use wasm_peers_protocol::{IceCandidate, SessionId, UserId};
use web_sys::{
MessageEvent, RtcDataChanne... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/one_to_many/websocket_handler.rs | library/src/one_to_many/websocket_handler.rs | use anyhow::anyhow;
use log::{debug, error, info};
use serde::de::DeserializeOwned;
use wasm_bindgen_futures::JsFuture;
use wasm_peers_protocol::one_to_many::SignalMessage;
use wasm_peers_protocol::{SessionId, UserId};
use web_sys::{
RtcDataChannelInit, RtcIceCandidate, RtcIceCandidateInit, RtcSdpType,
RtcSessi... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/one_to_many/mod.rs | library/src/one_to_many/mod.rs | /*!
Library module for the one-to-many topology in client-server architecture.
There can be exactly one instance of [`MiniServer`] and arbitrary number of [`MiniClient`]'s
connected to the same session.
A [`RtcPeerConnection`] with an accompanying [`RtcDataChannel`] will be established between the [`MiniServer`]
and e... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/one_to_one/callbacks.rs | library/src/one_to_one/callbacks.rs | use js_sys::Uint8Array;
use log::{debug, error, info};
use serde::de::DeserializeOwned;
use wasm_bindgen::closure::Closure;
use wasm_bindgen::{JsCast, JsValue};
use wasm_peers_protocol::one_to_one::SignalMessage;
use wasm_peers_protocol::{IceCandidate, SessionId};
use web_sys::{
MessageEvent, RtcDataChannel, RtcDat... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/one_to_one/websocket_handler.rs | library/src/one_to_one/websocket_handler.rs | use ::log::{debug, error, info};
use anyhow::anyhow;
use wasm_bindgen_futures::JsFuture;
use wasm_peers_protocol::one_to_one::SignalMessage;
use web_sys::{
RtcIceCandidate, RtcIceCandidateInit, RtcPeerConnection, RtcSdpType, RtcSessionDescriptionInit,
WebSocket,
};
use crate::utils::{create_sdp_answer, create_... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/one_to_one/mod.rs | library/src/one_to_one/mod.rs | /*!
Library module for one-to-one network topology in simple tunnel connection.
After connection is established both peers are treated equally and have an opportunity to send messages
with [`NetworkManager::send_message`] method.
# Example
This example shows two peers sending `ping` and `pong` messages to each other... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/src/many_to_many/mod.rs | library/src/many_to_many/mod.rs | /*!
Library module for implementation of the many-to-many topology of peer communication.
Each peer in session is an equal, with ability to send and receive messages from any other peer.
Unlike with one-to-many topology, any peer can leave at any time without compromising the network.
To identify peers you should sto... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/tests/many_to_many.rs | library/tests/many_to_many.rs | //! Test suite for the Web and headless browsers.
#![cfg(target_arch = "wasm32")]
use std::cell::RefCell;
use std::rc::Rc;
use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
use wasm_peers::many_to_many::NetworkManager;
use wasm_peers::{ConnectionType, SessionId};
use web_sys::console;
const S... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/tests/one_to_many.rs | library/tests/one_to_many.rs | //! Test suite for the Web and headless browsers.
#![cfg(target_arch = "wasm32")]
use std::cell::RefCell;
use std::rc::Rc;
use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
use wasm_peers::one_to_many::{MiniClient, MiniServer};
use wasm_peers::{ConnectionType, SessionId};
use web_sys::console;... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/library/tests/one_to_one.rs | library/tests/one_to_one.rs | //! Test suite for the Web and headless browsers.
#![cfg(target_arch = "wasm32")]
use std::cell::RefCell;
use std::rc::Rc;
use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
use wasm_peers::one_to_one::NetworkManager;
use wasm_peers::{ConnectionType, SessionId};
use web_sys::console;
const SIG... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/xtask/src/main.rs | xtask/src/main.rs | #![allow(clippy::cargo_common_metadata)]
use std::process;
use clap::{Parser, Subcommand};
use color_eyre::Result;
use xshell::{cmd, Shell};
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
struct Cli {
#[command(subcommand)]
command: Command,
}
#[derive(Subcommand)]
enum Command {
... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/router.rs | signaling-server/src/router.rs | use axum::extract::{State, WebSocketUpgrade};
use axum::response::Response;
use axum::routing::get;
use axum::Router;
use crate::{many_to_many, one_to_many, one_to_one};
#[derive(Default, Clone)]
pub struct ServerState {
one_to_one_connections: one_to_one::Connections,
one_to_one_sessions: one_to_one::Session... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/lib.rs | signaling-server/src/lib.rs | #![allow(
clippy::module_name_repetitions,
clippy::significant_drop_tightening // shows up only in CI, can't be reproduced locally, should be brought back
)]
// clippy WARN level lints
#![warn(
// missing_docs,
clippy::cargo,
clippy::pedantic,
// clippy::nursery,
clippy::dbg_macro,
clipp... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/many_to_many.rs | signaling-server/src/many_to_many.rs | use std::collections::{HashMap, HashSet};
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use anyhow::anyhow;
use axum::extract::ws::{Message, WebSocket};
use futures_util::{SinkExt, StreamExt, TryFutureExt};
use log::{error, info, warn};
use tokio::sync::{mpsc, RwLock};
use tokio_stream::wrappers::U... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/one_to_many.rs | signaling-server/src/one_to_many.rs | use std::collections::{HashMap, HashSet};
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use anyhow::anyhow;
use axum::extract::ws::{Message, WebSocket};
use futures_util::{SinkExt, StreamExt, TryFutureExt};
use log::{error, info};
use tokio::sync::{mpsc, RwLock};
use tokio_stream::wrappers::Unbound... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/one_to_one.rs | signaling-server/src/one_to_one.rs | use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use anyhow::anyhow;
use axum::extract::ws::{Message, WebSocket};
use futures_util::{SinkExt, StreamExt};
use log::{error, info};
use tokio::sync::{mpsc, RwLock};
use tokio_stream::wra... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/env.rs | signaling-server/src/env.rs | use once_cell::sync::Lazy;
use serde::Deserialize;
#[derive(Deserialize, Debug)]
pub struct Env {
pub example_bool: bool,
pub example_list: Vec<String>,
}
/// Access to parsed environment variables.
pub static ENV: Lazy<Env> = Lazy::new(|| envy::from_env().expect("some env vars missing"));
| rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/error.rs | signaling-server/src/error.rs | pub type Result<T> = anyhow::Result<T>;
pub type Error = anyhow::Error;
| rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/signaling-server/src/main.rs | signaling-server/src/main.rs | use std::env;
use std::net::SocketAddr;
use std::str::FromStr;
use log::{info, LevelFilter};
use simplelog::{ColorChoice, Config, TermLogger, TerminalMode};
use wasm_peers_signaling_server::router::{self, ServerState};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
TermLogger::init(
LevelFilter::D... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/protocol/src/lib.rs | protocol/src/lib.rs | /*!
Helper crate that declares common types and structures shared between [wasm-peers](https://docs.rs/wasm-peers/latest/wasm_peers/)
and [wasm-peers-signaling-server](https://docs.rs/wasm-peers-signaling-server/latest/wasm_peers_signaling_server/).
*/
#![allow(clippy::module_name_repetitions)]
// clippy WARN level li... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/protocol/src/many_to_many.rs | protocol/src/many_to_many.rs | /*!
Signaling messages exchanged between used by `NetworkManagers` and signaling server
to facilitate communication in many-to-many topology.
*/
use serde::{Deserialize, Serialize};
use crate::common::IceCandidate;
use crate::{SessionId, UserId};
/// `Enum` consisting of two main categories are messages used to setu... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/protocol/src/one_to_many.rs | protocol/src/one_to_many.rs | /*!
Signaling messages exchanged between used by `MiniServer`, `MiniClient` and signaling server
to facilitate communication in client-server topology.
*/
use serde::{Deserialize, Serialize};
use crate::common::IceCandidate;
use crate::{IsHost, SessionId, UserId};
/// `Enum` consisting of two main categories are mes... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/protocol/src/one_to_one.rs | protocol/src/one_to_one.rs | /*!
Signaling messages exchanged between used by `MiniServer`, `MiniClient` and signaling server
to facilitate communication in client-server topology.
*/
use serde::{Deserialize, Serialize};
use crate::common::IceCandidate;
use crate::{IsHost, SessionId};
/// `Enum` consisting of two main categories are messages u... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
wasm-peers/wasm-peers | https://github.com/wasm-peers/wasm-peers/blob/f37210d5d67a3d9732794a80a20347849ed8ab1e/protocol/src/common.rs | protocol/src/common.rs | use std::fmt::{Display, Formatter};
use std::str::FromStr;
use serde::{Deserialize, Serialize};
/// Unique identifier of signaling session that each user provides
/// when communicating with the signaling server.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Hash)]
pub struct SessionId(u128);
i... | rust | Apache-2.0 | f37210d5d67a3d9732794a80a20347849ed8ab1e | 2026-01-04T20:24:22.678899Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/src/lib.rs | src/lib.rs | #![doc = include_str!("../README.md")]
pub use venndb_macros::VennDB;
/// A trait that types can implement in order to support `#[venndb(any)]` attribute filters.
pub trait Any {
/// Returns true if the value is considered to be "any" within the context of the type.
///
/// # Example
///
/// ```
... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/src/bitvec.rs | src/bitvec.rs | #![allow(dead_code)]
//! Fork from <https://docs.rs/vob/3.0.6/src/vob/lib.rs.html#138-145>
//! Original License: <https://github.com/softdevteam/vob/blob/master/LICENSE-MIT>
#[must_use]
#[derive(Debug, Clone, Default)]
pub struct BitVec {
len: usize,
data: Vec<usize>,
}
#[derive(Debug)]
pub struct IterOnes<'a... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/fuzz/fuzz_targets/fuzz_employee_db.rs | fuzz/fuzz_targets/fuzz_employee_db.rs | #![no_main]
use libfuzzer_sys::arbitrary::{self, Arbitrary};
use libfuzzer_sys::fuzz_target;
use venndb::{Any, VennDB};
#[derive(Clone, Debug, Arbitrary, VennDB)]
pub struct Employee {
#[venndb(key)]
id: u16,
_name: String,
earth: bool,
alive: Option<bool>,
#[venndb(filter)]
faction: Facti... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/benches/proxydb.rs | benches/proxydb.rs | mod proxies;
use divan::AllocProfiler;
use proxies::{InMemProxyDB, NaiveProxyDB, ProxyDB, SqlLiteProxyDB};
use std::sync::atomic::AtomicUsize;
#[global_allocator]
static ALLOC: AllocProfiler = AllocProfiler::system();
fn main() {
// Run registered benchmarks.
divan::main();
}
const POOLS: [&str; 14] = [
... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/benches/proxies/mod.rs | benches/proxies/mod.rs | use sqlite::Row;
use std::{borrow::Cow, ops::Deref};
use venndb::{Any, VennDB};
pub(super) trait ProxyDB: Sized {
fn create(n: usize) -> Self;
fn get(&self, id: u64) -> Option<Cow<'_, Proxy>>;
fn any_tcp(&self, pool: &str, country: &str) -> Option<Cow<'_, Proxy>>;
fn any_socks5_isp(&self, pool: &str, ... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-macros/src/errors.rs | venndb-macros/src/errors.rs | #![allow(dead_code)]
use {
proc_macro2::{Span, TokenStream},
quote::ToTokens,
std::cell::RefCell,
};
/// Produce functions to expect particular literals in `syn::Expr`
macro_rules! expect_lit_fn {
($(($fn_name:ident, $syn_type:ident, $variant:ident, $lit_name:literal),)*) => {
$(
p... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-macros/src/field.rs | venndb-macros/src/field.rs | //! Struct Field Info
use crate::{
errors::Errors,
parse_attrs::{FieldAttrs, FieldKind},
};
use quote::format_ident;
use syn::Ident;
/// A field of a `#![derive(VennDB)]` struct with attributes and some other
/// notable metadata appended.
pub struct StructField<'a> {
/// The original parsed field
fie... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-macros/src/lib.rs | venndb-macros/src/lib.rs | #![forbid(unsafe_code)]
mod errors;
mod field;
mod generate_db;
mod parse_attrs;
use errors::Errors;
use field::StructField;
use parse_attrs::{FieldAttrs, TypeAttrs};
use proc_macro2::TokenStream;
use quote::{ToTokens, format_ident, quote};
/// Derive macro generating VennDB functionality for this struct.
///
/// Se... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-macros/src/generate_db.rs | venndb-macros/src/generate_db.rs | use crate::field::{FieldInfo, StructField};
use proc_macro2::TokenStream;
use quote::{ToTokens, format_ident, quote};
use syn::{Ident, Path};
/// Generate the venndb logic
pub fn generate_db(
name: &Ident,
name_db: &Ident,
validator: Option<&Path>,
vis: &syn::Visibility,
fields: &[StructField],
) -... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | true |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-macros/src/parse_attrs.rs | venndb-macros/src/parse_attrs.rs | use quote::ToTokens;
use crate::errors::Errors;
/// Attributes applied to a field of a `#![derive(VennDB)]` struct.
#[derive(Default)]
pub struct FieldAttrs<'a> {
pub kind: Option<FieldKind>,
pub option_ty: Option<&'a syn::Type>,
}
pub enum FieldKind {
Key,
Filter,
FilterMap { any: bool },
}
imp... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/src/main.rs | venndb-usage/src/main.rs | #![allow(dead_code)]
use venndb::{Any, VennDB};
#[derive(Debug, VennDB)]
#[venndb(validator = employee_validator)]
pub struct Employee {
#[venndb(key)]
id: u32,
#[venndb(key)]
name: String,
is_manager: bool,
is_admin: bool,
is_active: bool,
#[venndb(filter, any)]
department: Depart... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | true |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compilation_tests.rs | venndb-usage/tests/compilation_tests.rs | #[test]
fn should_compile() {
let t = trybuild::TestCases::new();
t.pass("tests/compiles/*.rs");
}
#[test]
fn should_not_compile() {
let t = trybuild::TestCases::new();
t.compile_fail("tests/fails/*.rs");
}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/any_bool.rs | venndb-usage/tests/fails/any_bool.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(any)]
is_alive: bool,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/lonely_any.rs | venndb-usage/tests/fails/lonely_any.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(any)]
country: String,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/unknown_attr_struct.rs | venndb-usage/tests/fails/unknown_attr_struct.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
#[venndb(foo)]
struct Employee {
id: u32,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/filter_skipped_field.rs | venndb-usage/tests/fails/filter_skipped_field.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
id: u32,
is_manager: bool,
#[venndb(skip)]
is_active: bool,
}
fn main() {
let mut db = EmployeeDB::new();
db.append(Employee {
id: 1,
is_manager: true,
is_active: true,
});
let mut query = db.query(... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/any_filter_bool.rs | venndb-usage/tests/fails/any_filter_bool.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(any, filter)]
is_alive: bool,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/any_key.rs | venndb-usage/tests/fails/any_key.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(any, key)]
country: String,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/derive_enum.rs | venndb-usage/tests/fails/derive_enum.rs | use venndb::VennDB;
#[derive(VennDB)]
enum MyEnum {
A,
B,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/key_and_filter.rs | venndb-usage/tests/fails/key_and_filter.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
id: u32,
is_manager: bool,
is_active: bool,
#[venndb(key, filter)]
country: String,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/derive_struct_with_validator_str.rs | venndb-usage/tests/fails/derive_struct_with_validator_str.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
#[venndb(validator = "employee_validator")]
struct Employee {
pub id: u32,
pub name: String,
pub is_manager: bool,
pub is_admin: bool,
pub is_active: bool,
pub department: Department,
}
#[derive(Debug)]
pub enum Department {
Engineering,
Sal... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/derive_tuple_struct.rs | venndb-usage/tests/fails/derive_tuple_struct.rs | use venndb::VennDB;
#[derive(VennDB)]
struct MyStruct(u32);
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/filter_any_bool.rs | venndb-usage/tests/fails/filter_any_bool.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(filter, any)]
is_alive: bool,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/key_any.rs | venndb-usage/tests/fails/key_any.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(key, any)]
country: String,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/unknown_attr_field.rs | venndb-usage/tests/fails/unknown_attr_field.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(foo)]
id: u32,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/option_key.rs | venndb-usage/tests/fails/option_key.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(key)]
id: Option<u32>,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/fails/filter_and_key.rs | venndb-usage/tests/fails/filter_and_key.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
id: u32,
is_manager: bool,
is_active: bool,
#[venndb(filter, key)]
country: String,
}
fn main() {}
| rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
plabayo/venndb | https://github.com/plabayo/venndb/blob/68c929e6a7f97f74b0b1c84facfa5b1b61369be3/venndb-usage/tests/compiles/derive_struct_with_explicit_filters.rs | venndb-usage/tests/compiles/derive_struct_with_explicit_filters.rs | use venndb::VennDB;
#[derive(Debug, VennDB)]
struct Employee {
#[venndb(key)]
id: u32,
name: String,
#[venndb(filter)]
is_manager: bool,
#[venndb(filter)]
is_admin: bool,
#[venndb(filter)]
is_active: bool,
department: Department,
}
#[derive(Debug)]
pub enum Department {
Eng... | rust | Apache-2.0 | 68c929e6a7f97f74b0b1c84facfa5b1b61369be3 | 2026-01-04T20:24:17.564367Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.