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
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/mod.rs
src/config/mod.rs
pub mod enums; pub mod structs; pub mod impls;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/impls.rs
src/config/impls.rs
pub mod configuration; pub mod configuration_error;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/impls/configuration.rs
src/config/impls/configuration.rs
use std::fs::File; use std::io::Write; use std::sync::Arc; use std::thread::available_parallelism; use regex::Regex; use crate::common::structs::custom_error::CustomError; use crate::config::enums::configuration_error::ConfigurationError; use crate::config::structs::api_trackers_config::ApiTrackersConfig; use crate::co...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/impls/configuration_error.rs
src/config/impls/configuration_error.rs
use crate::config::enums::configuration_error::ConfigurationError; impl std::fmt::Display for ConfigurationError { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { ConfigurationError::IOError(e) => e.fmt(f), ConfigurationError::ParseError(e) => e.fmt(f) ...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_structure_config_blacklist.rs
src/config/structs/database_structure_config_blacklist.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct DatabaseStructureConfigBlacklist { pub table_name: String, pub column_infohash: String, pub bin_type_infohash: bool }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/http_trackers_config.rs
src/config/structs/http_trackers_config.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct HttpTrackersConfig { pub enabled: bool, pub bind_address: String, pub real_ip: String, pub keep_alive: u64, pub request_timeout: u64, pub disconnect_timeout: u64, pub max_connections: u64, pu...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/configuration.rs
src/config/structs/configuration.rs
use serde::{Deserialize, Serialize}; use crate::config::structs::api_trackers_config::ApiTrackersConfig; use crate::config::structs::database_config::DatabaseConfig; use crate::config::structs::database_structure_config::DatabaseStructureConfig; use crate::config::structs::http_trackers_config::HttpTrackersConfig; use ...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/udp_trackers_config.rs
src/config/structs/udp_trackers_config.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct UdpTrackersConfig { pub enabled: bool, pub bind_address: String, pub udp_threads: usize, pub worker_threads: usize, pub receive_buffer_size: usize, pub send_buffer_size: usize, pub reuse_address:...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_structure_config.rs
src/config/structs/database_structure_config.rs
use serde::{Deserialize, Serialize}; use crate::config::structs::database_structure_config_blacklist::DatabaseStructureConfigBlacklist; use crate::config::structs::database_structure_config_keys::DatabaseStructureConfigKeys; use crate::config::structs::database_structure_config_torrents::DatabaseStructureConfigTorrents...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_structure_config_whitelist.rs
src/config/structs/database_structure_config_whitelist.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct DatabaseStructureConfigWhitelist { pub table_name: String, pub column_infohash: String, pub bin_type_infohash: bool }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/api_trackers_config.rs
src/config/structs/api_trackers_config.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ApiTrackersConfig { pub enabled: bool, pub bind_address: String, pub real_ip: String, pub keep_alive: u64, pub request_timeout: u64, pub disconnect_timeout: u64, pub max_connections: u64, pub...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_structure_config_keys.rs
src/config/structs/database_structure_config_keys.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct DatabaseStructureConfigKeys { pub table_name: String, pub column_hash: String, pub bin_type_hash: bool, pub column_timeout: String }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_config.rs
src/config/structs/database_config.rs
use serde::{Deserialize, Serialize}; use crate::database::enums::database_drivers::DatabaseDrivers; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct DatabaseConfig { pub engine: DatabaseDrivers, pub path: String, pub persistent: bool, pub persistent_interval: u64, pub insert_vacant: bool,...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/sentry_config.rs
src/config/structs/sentry_config.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct SentryConfig { pub enabled: bool, pub dsn: String, pub debug: bool, pub sample_rate: f32, pub max_breadcrumbs: usize, pub attach_stacktrace: bool, pub send_default_pii: bool, pub traces_sampl...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_structure_config_torrents.rs
src/config/structs/database_structure_config_torrents.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct DatabaseStructureConfigTorrents { pub table_name: String, pub column_infohash: String, pub bin_type_infohash: bool, pub column_seeds: String, pub column_peers: String, pub column_completed: String }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/tracker_config.rs
src/config/structs/tracker_config.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TrackerConfig { pub api_key: String, pub whitelist_enabled: bool, pub blacklist_enabled: bool, pub keys_enabled: bool, pub keys_cleanup_interval: u64, pub users_enabled: bool, pub request_interva...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/structs/database_structure_config_users.rs
src/config/structs/database_structure_config_users.rs
use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct DatabaseStructureConfigUsers { pub table_name: String, pub id_uuid: bool, pub column_uuid: String, pub column_id: String, pub column_key: String, pub bin_type_key: bool, pub column_uploaded: Stri...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/config/enums/configuration_error.rs
src/config/enums/configuration_error.rs
#[derive(Debug)] pub enum ConfigurationError { IOError(std::io::Error), ParseError(toml::de::Error), }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/structs.rs
src/database/structs.rs
pub mod database_connector; pub mod database_connector_sqlite; pub mod database_connector_mysql; pub mod database_connector_pgsql;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/enums.rs
src/database/enums.rs
pub mod database_drivers;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/mod.rs
src/database/mod.rs
pub mod enums; pub mod impls; pub mod structs;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/impls.rs
src/database/impls.rs
pub mod database_connector; pub mod database_connector_sqlite; pub mod database_connector_mysql; pub mod database_connector_pgsql;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/impls/database_connector_pgsql.rs
src/database/impls/database_connector_pgsql.rs
use std::collections::BTreeMap; use std::ops::Deref; use std::process::exit; use std::str::FromStr; use std::sync::Arc; use std::time::Duration; use async_std::task; use futures_util::TryStreamExt; use log::{error, info}; use sha1::{Digest, Sha1}; use sqlx::{ConnectOptions, Error, Pool, Postgres, Row, Transaction}; use...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
true
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/impls/database_connector_sqlite.rs
src/database/impls/database_connector_sqlite.rs
use std::collections::BTreeMap; use std::ops::Deref; use std::process::exit; use std::str::FromStr; use std::sync::Arc; use std::time::Duration; use async_std::task; use futures_util::TryStreamExt; use log::{error, info}; use sha1::{Digest, Sha1}; use sqlx::{ConnectOptions, Error, Sqlite, Pool, Row, Transaction}; use s...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
true
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/impls/database_connector_mysql.rs
src/database/impls/database_connector_mysql.rs
use std::collections::BTreeMap; use std::ops::Deref; use std::process::exit; use std::str::FromStr; use std::sync::Arc; use std::time::Duration; use async_std::task; use futures_util::TryStreamExt; use log::{error, info}; use sha1::{Digest, Sha1}; use sqlx::{ConnectOptions, Error, MySql, Pool, Row, Transaction}; use sq...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
true
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/impls/database_connector.rs
src/database/impls/database_connector.rs
use std::collections::BTreeMap; use std::sync::Arc; use sqlx::Error; use crate::config::structs::configuration::Configuration; use crate::database::enums::database_drivers::DatabaseDrivers; use crate::database::structs::database_connector::DatabaseConnector; use crate::database::structs::database_connector_mysql::Datab...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/structs/database_connector_pgsql.rs
src/database/structs/database_connector_pgsql.rs
use sqlx::{Pool, Postgres}; #[derive(Debug, Clone)] pub struct DatabaseConnectorPgSQL { pub(crate) pool: Pool<Postgres>, }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/structs/database_connector_sqlite.rs
src/database/structs/database_connector_sqlite.rs
use sqlx::{Pool, Sqlite}; #[derive(Debug, Clone)] pub struct DatabaseConnectorSQLite { pub(crate) pool: Pool<Sqlite>, }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/structs/database_connector_mysql.rs
src/database/structs/database_connector_mysql.rs
use sqlx::{MySql, Pool}; #[derive(Debug, Clone)] pub struct DatabaseConnectorMySQL { pub(crate) pool: Pool<MySql>, }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/structs/database_connector.rs
src/database/structs/database_connector.rs
use crate::database::enums::database_drivers::DatabaseDrivers; use crate::database::structs::database_connector_mysql::DatabaseConnectorMySQL; use crate::database::structs::database_connector_pgsql::DatabaseConnectorPgSQL; use crate::database::structs::database_connector_sqlite::DatabaseConnectorSQLite; #[derive(Debug...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/database/enums/database_drivers.rs
src/database/enums/database_drivers.rs
use clap::ValueEnum; use serde::{Deserialize, Serialize}; #[allow(non_camel_case_types)] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)] pub enum DatabaseDrivers { sqlite3, mysql, pgsql, }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/http.rs
src/http/http.rs
use std::borrow::Cow; use std::fs::File; use std::future::Future; use std::io::{BufReader, Write}; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; use std::process::exit; use std::str::FromStr; use std::sync::Arc; use std::time::Duration; use actix_cors::Cors; use actix_web::{App, http, HttpRequest, HttpRespons...
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
true
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/structs.rs
src/http/structs.rs
pub mod http_service_data;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/enums.rs
src/http/enums.rs
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/types.rs
src/http/types.rs
use std::collections::HashMap; use actix_web::HttpResponse; pub type HttpServiceQueryHashingMapOk = HashMap<String, Vec<Vec<u8>>>; pub type HttpServiceQueryHashingMapErr = HttpResponse;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/mod.rs
src/http/mod.rs
pub mod enums; pub mod structs; pub mod impls; pub mod types; #[allow(clippy::module_inception)] pub mod http;
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/impls.rs
src/http/impls.rs
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
Power2All/torrust-actix
https://github.com/Power2All/torrust-actix/blob/20d91c8be4b979abd1d67602b898a444d48a8945/src/http/structs/http_service_data.rs
src/http/structs/http_service_data.rs
use std::sync::Arc; use crate::config::structs::http_trackers_config::HttpTrackersConfig; use crate::tracker::structs::torrent_tracker::TorrentTracker; #[derive(Debug)] pub struct HttpServiceData { pub(crate) torrent_tracker: Arc<TorrentTracker>, pub(crate) http_trackers_config: Arc<HttpTrackersConfig> }
rust
MIT
20d91c8be4b979abd1d67602b898a444d48a8945
2026-01-04T20:24:47.160557Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/catch_unwind.rs
src/catch_unwind.rs
use core::future::Future; use pin_project::pin_project; use std::{ any::Any, panic, pin::Pin, task::{Context, Poll}, }; #[pin_project] #[derive(Debug)] #[must_use = "futures do nothing unless you `.await` or poll them"] pub struct CatchUnwind<F: Future>(#[pin] F); impl<F: Future> CatchUnwind<F> { ...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/dart_array.rs
src/dart_array.rs
//! A FFI Compatible Array for Dart use core::slice; use std::mem::ManuallyDrop; use ffi::{DartCObject, DartCObjectType, DartCObjectValue, DartNativeArray}; use crate::{ffi, IntoDart}; /// A wrapper around a list of `DartCObject` that will be dropped after been /// sent to dart vm. #[derive(Debug, Clone)] pub struc...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/lib.rs
src/lib.rs
#![deny( missing_docs, missing_debug_implementations, missing_copy_implementations, elided_lifetimes_in_paths, rust_2018_idioms, clippy::fallible_impl_from, clippy::missing_const_for_fn )] #![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/55122894")] //! Allo Isolate //! Run ...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/into_dart_extra.rs
src/into_dart_extra.rs
//! The conversions in this file is not lossless. On the contrary, it is lossy //! and the type that Dart receives will not be the same as the type you send in //! Rust. For example, numeric types can become String. use crate::{ffi::*, IntoDart}; impl IntoDart for i8 { fn into_dart(self) -> DartCObject { ...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/into_dart.rs
src/into_dart.rs
use std::collections::{HashMap, HashSet}; use std::{ ffi::{c_void, CString}, mem::ManuallyDrop, }; use crate::{ dart_array::DartArray, ffi::{DartHandleFinalizer, *}, }; /// A trait to convert between Rust types and Dart Types that could then /// be sent to the isolate /// /// see: [`crate::Isolate::po...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/chrono.rs
src/chrono.rs
//! chrono types //! //! based on Dart VM, microseconds unit is used //! //! recommendations below implies UTC based conversions, //! as these are generally easier to work with. //! > see [timestamp_micros](https://docs.rs/chrono/0.4.20/chrono/naive/struct.NaiveDateTime.html?search=timestamp_micros#method.timestamp_mic...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/ffi.rs
src/ffi.rs
#![allow(missing_docs, clippy::derive_partial_eq_without_eq)] use std::{ ffi::{c_void, CString}, os::raw, }; use crate::{ dart_array::DartArray, into_dart::{ visit_dart_typed_data_type, DartTypedDataTypeTrait, DartTypedDataTypeVisitor, }, }; /// A port is used to send or receive i...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/src/uuid.rs
src/uuid.rs
//! uuid type use crate::{ ffi::{DartCObject, DartHandleFinalizer, DartTypedDataType}, into_dart::{free_zero_copy_buffer_u8, DartTypedDataTypeTrait}, IntoDart, }; impl IntoDart for uuid::Uuid { /// delegate to `Vec<u8>` implementation /// /// on the other side of FFI, value should be reconstru...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/tests/vm.rs
tests/vm.rs
use allo_isolate::{ ffi::{ DartCObject, DartCObjectType, DartCObjectValue, DartNativeArray, DartTypedDataType, }, IntoDart, }; use std::{ collections::HashMap, ffi::{c_void, CStr}, sync::Mutex, }; thread_local! { static DART_VM: DartVM = DartVM::new(); } struct DartVM { p...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/tests/containers.rs
tests/containers.rs
use allo_isolate::{ffi::DartCObjectType, IntoDart, Isolate, ZeroCopyBuffer}; use std::collections::{HashMap, HashSet}; mod vm; fn main() { // Create a Dart VM call before we could handle sending a message back to // Dart let port = vm::port(); assert_ne!(port, -1); let isolate = Isolate::new(port)...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
shekohex/allo-isolate
https://github.com/shekohex/allo-isolate/blob/9134004487720ca3ae3457da84933c4337038f0e/benches/uuid.rs
benches/uuid.rs
use std::io::Write; use allo_isolate::{ffi::DartCObject, IntoDart}; use criterion::{ black_box, criterion_group, criterion_main, BenchmarkId, Criterion, }; fn simple(uuids: Vec<uuid::Uuid>) -> DartCObject { uuids .into_iter() .map(<uuid::Uuid as IntoDart>::into_dart) .collect::<Vec<Dar...
rust
Apache-2.0
9134004487720ca3ae3457da84933c4337038f0e
2026-01-04T20:25:25.259611Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/build.rs
build.rs
const COMMANDS: &[&str] = &[ "get_interfaces", "get_non_empty_interfaces", "find_available_port", "is_port_taken", "is_http_port_open", "scan_online_ip_port_pairs", "scan_online_ips_by_port", "non_localhost_networks", "local_server_is_running", "scan_local_network_online_hosts_by...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/lib.rs
src/lib.rs
use tauri::{ plugin::{Builder, TauriPlugin}, Manager, Runtime, }; mod commands; mod error; mod model; mod network; pub use error::{Error, Result}; /// Initializes the plugin. pub fn init<R: Runtime>() -> TauriPlugin<R> { Builder::new("network") .invoke_handler(tauri::generate_handler![ ...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/error.rs
src/error.rs
use serde::{ser::Serializer, Serialize}; pub type Result<T> = std::result::Result<T, Error>; #[derive(Debug, thiserror::Error)] pub enum Error { #[error(transparent)] Io(#[from] std::io::Error), #[cfg(mobile)] #[error(transparent)] PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError), } impl Seri...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/model/interface.rs
src/model/interface.rs
use ipnetwork::{ipv4_mask_to_prefix, ipv6_mask_to_prefix, Ipv4Network, Ipv6Network}; use network_interface as niface; use serde::{Deserialize, Serialize}; use std::net::{Ipv4Addr, Ipv6Addr}; #[derive(Debug, Serialize, Deserialize)] pub struct MacAddr(pub [u8; 6]); #[derive(Debug, Serialize, Deserialize)] pub struct V...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/model/mod.rs
src/model/mod.rs
pub mod interface;
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/commands/interface.rs
src/commands/interface.rs
use crate::{model::interface::NetworkInterface, network}; #[tauri::command] pub fn get_interfaces() -> Result<Vec<NetworkInterface>, String> { network::utils::get_interfaces().map_err(|e| e.to_string()) } #[tauri::command] pub fn get_non_empty_interfaces() -> Result<Vec<NetworkInterface>, String> { network::u...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/commands/mod.rs
src/commands/mod.rs
pub mod interface; pub mod scan;
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/commands/scan.rs
src/commands/scan.rs
use std::net::Ipv4Addr; use ipnetwork::Ipv4Network; use crate::network::{self, model::Ipv4NetworkSerialize, scan::IpPortPair}; #[tauri::command] pub fn find_available_port() -> Result<u16, String> { network::scan::find_available_port().map_err(|e| e.to_string()) } #[tauri::command] pub fn is_port_taken(port: u1...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/network/utils.rs
src/network/utils.rs
use crate::model::interface::NetworkInterface; use network_interface as niface; use network_interface::NetworkInterfaceConfig; /// ```ignore /// let prefix = octets_to_prefix([255, 255, 224, 0]); /// assert_eq!(prefix, 19); /// ``` pub fn octets_to_prefix(octets: [u8; 4]) -> u8 { let mut prefix_len = 0; // eac...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/network/model.rs
src/network/model.rs
use ipnetwork::Ipv4Network; use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize)] pub struct Ipv4NetworkSerialize { addr: String, prefix: u8, } impl From<Ipv4Network> for Ipv4NetworkSerialize { fn from(network: Ipv4Network) -> Self { Ipv4NetworkSerialize { addr...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/network/mod.rs
src/network/mod.rs
pub mod constant; pub mod scan; pub mod utils; pub mod model;
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/network/constant.rs
src/network/constant.rs
use lazy_static::lazy_static; use std::collections::HashMap; lazy_static! { pub static ref IPV4_MAPPING: HashMap<[u8; 4], u8> = { let mut map = HashMap::new(); map.insert([255, 255, 255, 255], 32); map.insert([255, 255, 255, 254], 31); map.insert([255, 255, 255, 252], 30); m...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/src/network/scan.rs
src/network/scan.rs
use futures::future::join_all; use if_addrs::{get_if_addrs, IfAddr, Ifv4Addr, Ifv6Addr, Interface}; use ipnetwork::{IpNetworkError, Ipv4Network}; use reqwest; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::net::{Ipv4Addr, TcpListener}; use std::sync::mpsc; use std::thread; use std::time::D...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/examples/sveltekit/src-tauri/build.rs
examples/sveltekit/src-tauri/build.rs
fn main() { tauri_build::build() }
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/examples/sveltekit/src-tauri/src/lib.rs
examples/sveltekit/src-tauri/src/lib.rs
use tauri::Manager; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_network::init()) .setup(|app| { #[cfg(debug_assertions)] // only inclupde this code on debug builds { let window = app.get_webview...
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
HuakunShen/tauri-plugin-network
https://github.com/HuakunShen/tauri-plugin-network/blob/6f14e18294d389a167b041eed74e112064e00c00/examples/sveltekit/src-tauri/src/main.rs
examples/sveltekit/src-tauri/src/main.rs
// Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] fn main() { app_lib::run(); }
rust
MIT
6f14e18294d389a167b041eed74e112064e00c00
2026-01-04T20:25:28.969475Z
false
efernau/rot8
https://github.com/efernau/rot8/blob/428221ea0990d90a2fce1f29be6d09af48d1874d/src/main.rs
src/main.rs
extern crate clap; extern crate glob; extern crate regex; use std::fs; use std::path::Path; use std::process::Command; use std::thread; use std::time::Duration; use clap::{App, Arg}; use glob::glob; use wayland_client::protocol::wl_output::Transform; mod backends; use backends::{sway::SwayBackend, wlroots::WaylandBa...
rust
MIT
428221ea0990d90a2fce1f29be6d09af48d1874d
2026-01-04T20:25:27.674044Z
false
efernau/rot8
https://github.com/efernau/rot8/blob/428221ea0990d90a2fce1f29be6d09af48d1874d/src/backends/wlroots.rs
src/backends/wlroots.rs
use wayland_client::{ event_created_child, protocol::{wl_output::Transform, wl_registry}, Connection, Dispatch, EventQueue, QueueHandle, }; use wayland_protocols_wlr::output_management::v1::client::{ zwlr_output_configuration_head_v1::{self, ZwlrOutputConfigurationHeadV1}, zwlr_output_configuration_...
rust
MIT
428221ea0990d90a2fce1f29be6d09af48d1874d
2026-01-04T20:25:27.674044Z
false
efernau/rot8
https://github.com/efernau/rot8/blob/428221ea0990d90a2fce1f29be6d09af48d1874d/src/backends/mod.rs
src/backends/mod.rs
use crate::Orientation; use wayland_client::protocol::wl_output::Transform; pub trait DisplayManager { /// Change the orientation of the target display. fn change_rotation_state(&mut self, new_state: &Orientation); /// Get the current transformation of the target display. fn get_rotation_state(&mut se...
rust
MIT
428221ea0990d90a2fce1f29be6d09af48d1874d
2026-01-04T20:25:27.674044Z
false
efernau/rot8
https://github.com/efernau/rot8/blob/428221ea0990d90a2fce1f29be6d09af48d1874d/src/backends/xorg.rs
src/backends/xorg.rs
use std::process::Command; use wayland_client::protocol::wl_output::Transform; use super::DisplayManager; use crate::Orientation; pub struct XorgBackend { touchscreens: Vec<String>, target_display: String, } impl XorgBackend { pub fn new(display: &str, touchscreens: Vec<String>) -> Self { XorgBa...
rust
MIT
428221ea0990d90a2fce1f29be6d09af48d1874d
2026-01-04T20:25:27.674044Z
false
efernau/rot8
https://github.com/efernau/rot8/blob/428221ea0990d90a2fce1f29be6d09af48d1874d/src/backends/sway.rs
src/backends/sway.rs
use std::process::Command; use serde_json::Value; use wayland_client::protocol::wl_output::Transform; use crate::Orientation; use super::{wlroots::WaylandBackend, DisplayManager}; pub struct SwayBackend { wayland_backend: WaylandBackend, manage_keyboard: bool, } impl SwayBackend { pub fn new(wayland_ba...
rust
MIT
428221ea0990d90a2fce1f29be6d09af48d1874d
2026-01-04T20:25:27.674044Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/corecli.rs
src/corecli.rs
use std::process::Command; pub fn spawn(command: &str) -> Result<i32, ()> { let child = if cfg!(target_os = "windows") { Command::new("cmd") .args(&["/C", command]) .spawn() } else { Command::new("sh") .arg("-c") .arg(command) ...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/lib.rs
src/lib.rs
#[macro_use] extern crate serde_derive; extern crate toml; pub mod reporter; pub mod corecli; pub mod commands; pub mod context; pub mod git;
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/git.rs
src/git.rs
use context::Context; use corecli::{ get_stdout }; use reporter; use std::io::stdout; use std::io::Write; pub fn clone_remotes_if_needed(ctx: &Context) { for r in &ctx.remotes { let remote_dir = ctx.remote_alias_path(&r.alias); let remote_dir_path = remote_dir.as_path(); if !remote_dir_...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/reporter.rs
src/reporter.rs
use std::fmt; use std::io::Write; enum Color { Red, Green, Yellow, Reset, } impl fmt::Display for Color { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let s: &str = match self { Color::Red => "\u{001B}[0;31m", Color::Green => "\u{001B}[0;32m", ...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/main.rs
src/main.rs
extern crate cmdshelf; use std::process::{ exit }; use std::env; use cmdshelf::reporter; use cmdshelf::commands::Runnable; use cmdshelf::commands; const VERSION: &str = "2.0.2"; fn main() { let args: Vec<String> = env::args().collect(); if args.len() < 2 { commands::help_command().run([].to_vec()).ok...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/context.rs
src/context.rs
extern crate is_executable; extern crate walkdir; use self::walkdir::{ WalkDir, DirEntry }; use self::is_executable::IsExecutable; use std::path::{ Path, PathBuf, MAIN_SEPARATOR }; use std::error::Error; use std::fmt; use std::fs; use toml; pub struct Context { pub remotes: Vec<RemoteConfig>, pub workspace_di...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/update.rs
src/commands/update.rs
use super::Runnable; use context::Context; use git; pub struct Update { } impl Runnable for Update { fn name(&self) -> String { return "update".to_owned() } fn run(&mut self, _: Vec<String>) -> Result<i32, String> { let ctx = Context::new(); git::update_or_clone_remotes(&ctx); ...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/list.rs
src/commands/list.rs
use super::Runnable; use context::Context; use git; pub struct List { } impl Runnable for List { fn name(&self) -> String { return "list".to_owned() } fn run(&mut self, args: Vec<String>) -> Result<i32, String> { let is_fullpath = args.contains(&"--path".to_owned()); let ctx = Con...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/help.rs
src/commands/help.rs
use super::Runnable; use corecli::spawn; use std::fmt; #[derive(Copy,Clone)] enum HelpPage { Run, Cat, List, Remote, Update, Default, } impl HelpPage { fn from(arg: &str) -> HelpPage { match arg { "run" => HelpPage::Run, "cat" => HelpPage::Cat, ...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/remote.rs
src/commands/remote.rs
use super::Runnable; use context::Context; use std::path::MAIN_SEPARATOR; pub struct Remote { } impl Runnable for Remote { fn name(&self) -> String { return "remote".to_owned() } fn run(&mut self, args: Vec<String>) -> Result<i32, String> { if args.len() < 1 { return Err("missi...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/mod.rs
src/commands/mod.rs
mod cat; mod help; mod list; mod remote; mod run; mod update; use self::cat::Cat; use self::help::Help; use self::list::List; use self::remote::Remote; use self::run::Run; use self::update::Update; pub trait Runnable { fn name(&self) -> String; fn run(&mut self, args: Vec<String>) -> Result<i32, String>; } p...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/run.rs
src/commands/run.rs
use super::Runnable; use context::Context; use corecli::spawn; use git; pub struct Run { } impl Runnable for Run { fn name(&self) -> String { return "run".to_owned() } fn run(&mut self, args: Vec<String>) -> Result<i32, String> { if args.len() == 0 { return Err("missing argumen...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
toshi0383/cmdshelf
https://github.com/toshi0383/cmdshelf/blob/590ec80b1e4c55b3d801cb4deafd379391d23f7b/src/commands/cat.rs
src/commands/cat.rs
use super::Runnable; use context::Context; use corecli::spawn; use git; pub struct Cat { } impl Runnable for Cat { fn name(&self) -> String { return "cat".to_owned() } fn run(&mut self, args: Vec<String>) -> Result<i32, String> { if args.len() == 0 { return Err("missing argumen...
rust
Apache-2.0
590ec80b1e4c55b3d801cb4deafd379391d23f7b
2026-01-04T20:25:28.323553Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/lib.rs
src/lib.rs
//! This library provides rust implementations for some stemmer algorithms //! written in the [snowball language](https://snowballstem.org/). //! //! //! All algorithms expect the input to already be lowercased. //! //! # Usage //! ```toml //! [dependencies] //! rust-stemmers = "^1.0" //! ``` //! //! ```rust //! extern...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/among.rs
src/snowball/among.rs
use snowball::SnowballEnv; pub struct Among<T: 'static>(pub &'static str, pub i32, pub i32, pub Option<&'static (dyn Fn(&mut SnowballEnv, &mut T) -> bool + Sync)>);
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/snowball_env.rs
src/snowball/snowball_env.rs
use std::borrow::Cow; use snowball::Among; #[derive(Debug, Clone)] pub struct SnowballEnv<'a> { pub current: Cow<'a, str>, pub cursor: usize, pub limit: usize, pub limit_backward: usize, pub bra: usize, pub ket: usize, } impl<'a> SnowballEnv<'a> { pub fn create(value: &'a str) -> Self { ...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/mod.rs
src/snowball/mod.rs
pub mod algorithms; mod among; mod snowball_env; pub use snowball::among::Among; pub use snowball::snowball_env::SnowballEnv;
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/armenian.rs
src/snowball/algorithms/armenian.rs
//! Generated by Snowball 2.1.0 - https://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 23] = &[ Among("\u{0562}\u{0561}\u{0580}", -1, 1, None), ...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/german.rs
src/snowball/algorithms/german.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 6] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/spanish.rs
src/snowball/algorithms/spanish.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 6] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/greek.rs
src/snowball/algorithms/greek.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 46] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
true
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/portuguese.rs
src/snowball/algorithms/portuguese.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 3] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/finnish.rs
src/snowball/algorithms/finnish.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 10] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/italian.rs
src/snowball/algorithms/italian.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 7] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/mod.rs
src/snowball/algorithms/mod.rs
pub mod arabic; pub mod armenian; pub mod danish; pub mod dutch; pub mod english; pub mod finnish; pub mod french; pub mod german; pub mod greek; pub mod hungarian; pub mod italian; pub mod norwegian; pub mod portuguese; pub mod romanian; pub mod russian; pub mod spanish; pub mod swedish; pub mod tamil; pub mod turkish...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/danish.rs
src/snowball/algorithms/danish.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 32] = &[ Among...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/russian.rs
src/snowball/algorithms/russian.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 9] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/arabic.rs
src/snowball/algorithms/arabic.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 161] = &[ Amon...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
true
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/french.rs
src/snowball/algorithms/french.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 3] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
true
CurrySoftware/rust-stemmers
https://github.com/CurrySoftware/rust-stemmers/blob/1fde09dfa08fb0fb07fbd6570aba8ecc98174edb/src/snowball/algorithms/hungarian.rs
src/snowball/algorithms/hungarian.rs
//! This file was generated automatically by the Snowball to Rust compiler //! http://snowballstem.org/ #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #![allow(unused_variables)] #![allow(unused_mut)] use snowball::SnowballEnv; use snowball::Among; static A_0: &'static [Among<Context>; 8] = &[ Among(...
rust
MIT
1fde09dfa08fb0fb07fbd6570aba8ecc98174edb
2026-01-04T20:25:20.053159Z
false