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 |
|---|---|---|---|---|---|---|---|---|
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/main.rs | src/main.rs | use std::env;
use pakhi::start_pakhi;
use pakhi::common::io::{RealIO, IO};
fn main() {
let main_module_path = get_main_module_path();
match main_module_path {
Ok(path) => {
let mut io = RealIO::new();
if let Err(err) = start_pakhi(path, &mut io) {
io.panic(err);
... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/backend/built_ins.rs | src/backend/built_ins.rs | use std::collections::HashMap;
use std::path::Path;
use crate::backend::interpreter::DataType;
// Contains all built-in function and constant names
pub struct BuiltInFunctionList {
built_in_functions: HashMap<Vec<char>, String>,
}
impl BuiltInFunctionList {
pub(crate) fn new() -> Self {
let mut functi... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/backend/mark_sweep.rs | src/backend/mark_sweep.rs | use std::collections::HashMap;
use crate::backend::interpreter::DataType;
// Implementation of a mark-sweep garbage collector
pub(crate) struct GC<'a> {
envs: &'a mut Vec<HashMap<String, Option<DataType>>>,
lists: &'a mut Vec<Vec<DataType>>,
free_lists: &'a mut Vec<usize>,
nameless_records: &'a mut Vec... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/backend/mod.rs | src/backend/mod.rs | pub mod interpreter;
pub mod built_ins;
mod mark_sweep; | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/backend/interpreter.rs | src/backend/interpreter.rs | use std::collections::HashMap;
use crate::common::io::{IO, RealIO};
use crate::frontend::parser;
use crate::frontend::lexer::{TokenKind, Token};
use crate::backend::built_ins::BuiltInFunctionList;
use crate::backend::mark_sweep;
use crate::common::pakhi_error::PakhiErr;
use std::iter::FromIterator;
use crate::common::p... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | true |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/common/io.rs | src/common/io.rs | use crate::common::pakhi_error::PakhiErr;
pub trait IO {
fn new() -> Self;
fn print(&mut self, m: &str);
fn println(&mut self, m: &str);
fn read_src_code_from_file(&mut self, file_path: &str) -> Result<String, std::io::Error> {
match std::fs::read_to_string(file_path) {
Ok(src_strin... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/common/mod.rs | src/common/mod.rs | pub mod io;
pub mod pakhi_error;
| rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/common/pakhi_error.rs | src/common/pakhi_error.rs | #[derive(Debug, Clone, PartialOrd, PartialEq)]
pub enum PakhiErr {
// Every tuple is (line_number, file_path, err_message)
SyntaxError(u32, String, String),
TypeError(u32, String, String),
RuntimeError(u32, String, String),
UnexpectedError(String), // Here only string will contain error message
} | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/frontend/lexer.rs | src/frontend/lexer.rs | use std::collections::HashMap;
use crate::common::pakhi_error::PakhiErr::SyntaxError;
use crate::common::pakhi_error::PakhiErr;
#[derive(Clone, Debug, PartialEq)]
pub struct Token {
pub kind: TokenKind,
pub lexeme: Vec<char>,
pub line: u32,
pub src_file_path: String,
}
#[derive(Clone, Debug, PartialEq... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/frontend/parser.rs | src/frontend/parser.rs | use crate::frontend::lexer;
use crate::frontend::lexer::Token;
use crate::frontend::lexer::TokenKind;
use crate::common::io;
use crate::common::io::IO;
use std::path::Path;
use std::collections::HashMap;
use std::ffi::OsStr;
use crate::backend::built_ins::BuiltInFunctionList;
use crate::common::pakhi_error::PakhiErr;
... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | true |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/src/frontend/mod.rs | src/frontend/mod.rs | pub mod parser;
pub mod lexer; | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/tests/lexer.rs | tests/lexer.rs | use pakhi::frontend::lexer::{tokenize, TokenKind};
#[test]
fn lexer_var_declare() {
let tokens = tokenize("নাম ল = ০;".chars().collect::<Vec<char>>(),
"test.pakhi".to_string()).unwrap();
assert_eq!(TokenKind::Var, tokens[0].kind);
assert_eq!(TokenKind::Identifier, tokens[1].kind);... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/tests/parser.rs | tests/parser.rs | use pakhi::frontend::{lexer, parser};
use pakhi::frontend::parser::{Stmt, Primary, Expr, Binary, Unary, Assignment, AssignmentKind, And, Or, parse};
use pakhi::frontend::lexer::{TokenKind, Token};
use pakhi::frontend::parser::AssignmentKind::FirstAssignment;
use pakhi::frontend::lexer::TokenKind::{Identifier, Plus};
us... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/tests/interpreter.rs | tests/interpreter.rs | use pakhi::frontend::{lexer, parser};
use pakhi::frontend::parser::Stmt;
use pakhi::common::io::{MockIO, IO};
use pakhi::backend::interpreter::Interpreter;
use pakhi::common::pakhi_error::PakhiErr;
fn src_to_ast(src_lines: Vec<&str>) -> Vec<Stmt> {
let src: String = src_lines.join("\n");
let src_chars: Vec<cha... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
Shafin098/pakhi-bhasha | https://github.com/Shafin098/pakhi-bhasha/blob/9805017f595169a9b49c9f36d9b30bbbee3e7b28/tests/main_integration.rs | tests/main_integration.rs | use pakhi::common::io::{MockIO, IO};
use std::io::Write;
use std::sync::{Arc, PoisonError};
use std::sync::Mutex;
use lazy_static::lazy_static;
lazy_static! {
static ref MUTEX: Arc<Mutex<u32>> = Arc::new(Mutex::new(0));
}
// create_file creates file ./tmp folder
fn create_file(file_name: &str, lines: Vec<&str>) {... | rust | MIT | 9805017f595169a9b49c9f36d9b30bbbee3e7b28 | 2026-01-04T20:18:15.998668Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/lib.rs | src/lib.rs | use crate::ids::{BlockId, DatabaseId};
use crate::models::error::ErrorResponse;
use crate::models::search::{DatabaseQuery, SearchRequest};
use crate::models::{Database, ListResponse, Object, Page};
use ids::{AsIdentifier, PageId};
use models::block::Block;
use models::PageCreateRequest;
use reqwest::header::{HeaderMap,... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/tests.rs | src/tests.rs | use crate::ids::BlockId;
use crate::models::search::PropertyCondition::Text;
use crate::models::search::{
DatabaseQuery, FilterCondition, FilterProperty, FilterValue, NotionSearch, TextCondition,
};
use crate::models::Object;
use crate::NotionApi;
fn test_token() -> String {
let token = {
if let Some(t... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/ids.rs | src/ids.rs | use std::fmt::Display;
use std::fmt::Error;
pub trait Identifier: Display {
fn value(&self) -> &str;
}
/// Meant to be a helpful trait allowing anything that can be
/// identified by the type specified in `ById`.
pub trait AsIdentifier<ById: Identifier> {
fn as_id(&self) -> &ById;
}
impl<T> AsIdentifier<T> fo... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/paging.rs | src/models/paging.rs | use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone)]
#[serde(transparent)]
pub struct PagingCursor(String);
#[derive(Serialize, Debug, Eq, PartialEq, Default, Clone)]
pub struct Paging {
#[serde(skip_serializing_if = "Option::is_none")]
pub... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/properties.rs | src/models/properties.rs | use crate::models::text::RichText;
use crate::models::users::User;
use crate::ids::{DatabaseId, PageId, PropertyId};
use crate::models::{DateTime, Number, Utc};
use chrono::NaiveDate;
use serde::{Deserialize, Serialize};
pub mod formulas;
#[cfg(test)]
mod tests;
/// How the number is displayed in Notion.
#[derive(S... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/tests.rs | src/models/tests.rs | use crate::ids::UserId;
use crate::models::properties::{DateOrDateTime, DateValue};
use crate::models::text::{
Annotations, Link, MentionObject, RichText, RichTextCommon, Text, TextColor,
};
use crate::models::users::{Person, User, UserCommon};
use crate::models::{ListResponse, Object, Page};
use chrono::{DateTime,... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/search.rs | src/models/search.rs | use crate::ids::{PageId, UserId};
use crate::models::paging::{Pageable, Paging, PagingCursor};
use crate::models::Number;
use chrono::{DateTime, Utc};
use serde::ser::SerializeMap;
use serde::{Serialize, Serializer};
#[derive(Serialize, Debug, Eq, PartialEq, Hash, Copy, Clone)]
#[serde(rename_all = "snake_case")]
pub ... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/block.rs | src/models/block.rs | use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::ids::{AsIdentifier, BlockId, DatabaseId, PageId};
use crate::models::text::{RichText, TextColor};
use crate::models::users::UserCommon;
mod tests;
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]
pub struct BlockCommon {
p... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/text.rs | src/models/text.rs | use crate::models::properties::DateValue;
use crate::models::users::User;
use crate::{Database, Page};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Copy, Clone)]
#[serde(rename_all = "snake_case")]
pub enum TextColor {
Default,
Gray,
Brown,
Orange,
Yel... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/error.rs | src/models/error.rs | use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};
#[derive(Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Debug, Clone, Hash)]
#[serde(transparent)]
pub struct StatusCode(u16);
impl StatusCode {
pub fn code(&self) -> u16 {
self.0
}
}
impl Display for StatusCode {
f... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/users.rs | src/models/users.rs | use crate::ids::UserId;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq)]
pub struct UserCommon {
pub id: UserId,
pub name: Option<String>,
pub avatar_url: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq)]
pub struct Person {... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/mod.rs | src/models/mod.rs | pub mod block;
pub mod error;
pub mod paging;
pub mod properties;
pub mod search;
#[cfg(test)]
mod tests;
pub mod text;
pub mod users;
use crate::models::properties::{PropertyConfiguration, PropertyValue};
use crate::models::text::RichText;
use crate::Error;
use block::ExternalFileObject;
use serde::{Deserialize, Seri... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/block/tests.rs | src/models/block/tests.rs | #[cfg(test)]
mod tests {
use crate::ids::{BlockId, UserId};
use crate::models::block::{
Block, BlockCommon, Callout, ExternalFileObject, FileOrEmojiObject, InternalFileObject,
Text as TextBlockModel,
};
use crate::models::text::{Annotations, RichText, RichTextCommon, Text, TextColor};
... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/properties/tests.rs | src/models/properties/tests.rs | use crate::models::{
properties::{DateOrDateTime, RollupPropertyValue, RollupValue},
PropertyValue,
};
use chrono::NaiveDate;
#[test]
fn verify_date_parsing() {
let date = NaiveDate::from_ymd_opt(2021, 01, 02).unwrap();
let result = serde_json::to_string(&DateOrDateTime::Date(date)).unwrap();
let p... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/src/models/properties/formulas.rs | src/models/properties/formulas.rs | #[cfg(test)]
mod tests {
use crate::models::properties::{FormulaResultValue, PropertyValue};
#[test]
fn parse_number_formula_prop() {
let _property: PropertyValue =
serde_json::from_str(include_str!("tests/formula_number_value.json")).unwrap();
}
#[test]
fn parse_date_formu... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/examples/todo/commands.rs | examples/todo/commands.rs | pub mod configure;
| rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/examples/todo/main.rs | examples/todo/main.rs | mod commands;
use anyhow::{Context, Result};
use clap::Parser;
use notion::ids::DatabaseId;
use notion::NotionApi;
use serde::{Deserialize, Serialize};
// From <https://docs.rs/clap/3.0.0-beta.2/clap/>
#[derive(Parser, Debug)]
#[clap(version = "1.0", author = "Jake Swenson")]
struct Opts {
#[clap(subcommand)]
... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
jakeswenson/notion | https://github.com/jakeswenson/notion/blob/aaff357c1b8ef6d266d68820f243122a2880fb3d/examples/todo/commands/configure.rs | examples/todo/commands/configure.rs | use crate::TodoConfig;
use anyhow::Result;
use notion::ids::{AsIdentifier, DatabaseId};
use notion::models::search::NotionSearch;
use notion::models::Database;
use notion::NotionApi;
use skim::{Skim, SkimItem, SkimItemReceiver, SkimItemSender, SkimOptions};
use std::borrow::Cow;
use std::ops::Deref;
use std::sync::Arc;... | rust | MIT | aaff357c1b8ef6d266d68820f243122a2880fb3d | 2026-01-04T20:18:07.998626Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/build.rs | src-tauri/build.rs | fn main() {
tauri_build::build()
}
| rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/lib.rs | src-tauri/src/lib.rs | mod command;
use std::sync::{Arc, Mutex};
mod utils;
use command::model::ServerState;
use tauri::menu::*;
pub fn run() {
tauri::Builder::default()
.manage(Arc::new(Mutex::new(ServerState {
server_handle: None,
})))
.menu(|handle| {
let menu = Menu::with_items(
... | rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/main.rs | 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() {
PacBao_lib::run()
}
| rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/command/model.rs | src-tauri/src/command/model.rs | pub struct ServerState {
pub server_handle: Option<tokio::task::JoinHandle<()>>,
}
#[derive(serde::Serialize)]
pub struct ProgressPayload {
pub file_id: String,
pub downloaded: u64,
pub total: Option<u64>,
}
| rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/command/mod.rs | src-tauri/src/command/mod.rs | pub mod cmds;
pub mod model;
| rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/command/cmds.rs | src-tauri/src/command/cmds.rs | use crate::command::model::ServerState;
use base64::prelude::*;
use futures::StreamExt;
use notify_rust::Notification;
use reqwest::Client;
use serde::Serialize;
use std::env;
use std::fs;
use std::fs::File;
use std::io;
use std::io::Read;
use std::io::Write;
use std::net::TcpListener;
use std::path::Path;
use std::pat... | rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | true |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/utils/mod.rs | src-tauri/src/utils/mod.rs | pub mod init; | rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
Sjj1024/PacBao | https://github.com/Sjj1024/PacBao/blob/23ef96a8a12be8536587548611ceeab76e800c54/src-tauri/src/utils/init.rs | src-tauri/src/utils/init.rs | use crate::command::cmds::{get_config_js, get_exe_dir, get_www_dir, load_man};
use base64::{prelude::BASE64_STANDARD, Engine};
use serde::{Deserialize, Serialize};
use serde_json::{json, Error, Value};
use tauri::{utils::config::WindowConfig, App, Url, WebviewUrl, WindowEvent};
use tauri_plugin_store::StoreExt;
#[deri... | rust | MIT | 23ef96a8a12be8536587548611ceeab76e800c54 | 2026-01-04T20:17:44.488910Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/lib.rs | src/lib.rs | //! Wrap REST calls with Rust traits.
//!
//! ```rust
//! #[macro_use] extern crate anterofit;
//! # fn main() {}
//!
//! service! {
//! /// Trait wrapping `myservice.com` API.
//! pub trait MyService {
//! /// Get the version of this API.
//! fn api_version(&self) -> String {
//! GE... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/mpmc.rs | src/mpmc.rs | use crossbeam::sync::SegQueue;
use parking_lot::{Condvar, Mutex};
use std::iter::IntoIterator;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use executor::ExecBox;
pub fn channel() -> (Sender, Receiver) {
let inner = Arc::new(
Inner {
queue: SegQueue::new(),
... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/adapter.rs | src/adapter.rs | use hyper::Url;
use hyper::client::Client;
use std::sync::Arc;
use std::fmt;
use executor::{DefaultExecutor, Executor};
use mpmc::{self, Sender};
use net::intercept::{Interceptor, Chain, NoIntercept};
use serialize::{self, Serializer, Deserializer};
use serialize::none::NoSerializer;
use serialize::FromStrDeserial... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/error.rs | src/error.rs | //! Assorted error types and helper functions used by this crate.
/// Error type from the `hyper` crate.
///
/// Associated with errors from connection issues or I/O issues with sockets.
pub use hyper::Error as HyperError;
/// Error type from the `url` crate.
///
/// Associated with errors with URL string parsing or ... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/mime.rs | src/mime.rs | //! Shorthands for various MIME types.
pub use mime_::Mime;
/// `application/octet-stream`
pub fn octet_stream() -> Mime {
mime!(Application/OctetStream)
}
/// `application/json`
pub fn json() -> Mime {
mime!(Application/Json)
}
/// `application/www-form-urlencoded`
pub fn form_urlencoded() -> Mime {
mi... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/serialize/none.rs | src/serialize/none.rs | //! No-op serializers which return errors when invoked.
use std::io::{Read, Write};
use super::{Serializer, Deserializer, Serialize, Deserialize};
use mime::Mime;
use ::Result;
/// A no-op serializer which returns an error when attempting to use it.
#[derive(Debug)]
pub struct NoSerializer;
impl Serializer for No... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/serialize/json.rs | src/serialize/json.rs | //! Integration with the `serde_json` crate providing JSON serialization.
extern crate serde_json;
use mime::{self, Mime};
use std::io::{Read, Write};
use super::{Serialize, Deserialize};
use serialize;
use ::{Error, Result};
/// Serializer for JSON request bodies with compact output.
#[derive(Clone, Debug, Defau... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/serialize/xml.rs | src/serialize/xml.rs | //! Integration with the `serde_xml` crate providing XML serialization.
//!
//! ##Note
//! As of November 2016, only deserialization is supported by `serde_xml`.
extern crate serde_xml;
use std::io::Read;
use super::Deserialize;
use serialize;
use ::{Error, Result};
/// Deserializer for pulling values from XML re... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/serialize/mod.rs | src/serialize/mod.rs | //! Types used to serialize and deserialize request and response bodies, respectively.
//!
//! ## Note
//! If you get an error about duplicate types or items in this module, make sure you don't have both
//! the `rustc-serialize` and `serde` features enabled.
use mime::Mime;
use std::fmt;
use std::io::{Read, Write};
... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/macros/mod.rs | src/macros/mod.rs | //! Macros for Anterofit.
#[macro_use]
mod request;
/// Define a service trait whose methods make HTTP requests.
///
/// ##Example
/// ```rust
/// # #[macro_use] extern crate anterofit;
/// # fn main() {}
/// pub type ApiToken = String;
///
/// service! {
/// pub trait MyService {
/// /// Get the version ... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/macros/request.rs | src/macros/request.rs | /// A `try!()` macro replacement for service method bodies.
///
/// Instead of returning the error in a method returning `Result`,
/// this returns a `Request<T>` which will immediate return the error when it is executed;
/// no network or disk activity will occur.
#[macro_export]
#[doc(hidden)]
macro_rules! try_reques... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/call.rs | src/net/call.rs | use futures::{Future, Canceled, Complete, Oneshot, Async, Poll};
use futures::executor::{self, Unpark, Spawn};
use ::{Result, Error};
use std::mem;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use error::RequestPanicked;
use super::request::RequestHead;
/// A handle representing a pending resu... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/response.rs | src/net/response.rs | //! Types concerning the responses from REST calls.
pub use hyper::client::Response;
use std::io::{self, Read};
use serialize::{Deserialize, Deserializer};
use ::Result;
/// A trait describing types which can be converted from raw response bodies.
///
/// Implemented for `T: Deserialize + Send + 'static`.
///
/// ... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/mod.rs | src/net/mod.rs | //! Anterofit's HTTP client framework, built on Hyper.
//!
//! Works standalone, but designed to be used with the `service!{}` macro.
pub use hyper::method::Method;
pub use hyper::header::Headers;
pub use hyper::header;
pub use self::intercept::{Interceptor, Chain};
pub use self::call::Call;
pub use self::request... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/method.rs | src/net/method.rs | //! Strongly typed HTTP methods and their traits
macro_rules! method (
($(#[$meta:meta])* pub struct $method:ident) => (
$(#[$meta])*
#[derive(Debug)]
pub struct $method;
impl Method for $method {
fn to_hyper(&self) -> ::hyper::method::Method {
::hyper::... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/body.rs | src/net/body.rs | //! Types that can be serialized to bodies of HTTP requests.
use serialize::{Serialize, Serializer};
use mime::{self, Mime};
use serialize::PairMap;
type Multipart = ::multipart::client::lazy::Multipart<'static, 'static>;
type PreparedFields = ::multipart::client::lazy::PreparedFields<'static>;
use url::form_urlen... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/request.rs | src/net/request.rs | //! Types for constructing and issuing HTTP requests.
use hyper::client::{Client, Response, RequestBuilder as NetRequestBuilder};
use hyper::header::{Headers, Header, HeaderFormat, ContentType};
use hyper::method::Method as HyperMethod;
use url::Url;
use url::form_urlencoded::Serializer as FormUrlEncoded;
use url::pe... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/net/intercept.rs | src/net/intercept.rs | //! Types for modifying outgoing requests on-the-fly, e.g. to add headers or query parameters.
use hyper::header::{Header, HeaderFormat};
use super::RequestHead;
use std::borrow::Cow;
use std::fmt;
use std::sync::Arc;
impl fmt::Debug for Interceptor {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/executor/threaded.rs | src/executor/threaded.rs | //! Executors using background threads
use std::thread::{self, Builder};
use super::{Executor, Receiver};
/// An executor which uses multiple threads to complete jobs.
#[derive(Debug)]
pub struct MultiThread {
threads: usize,
}
impl MultiThread {
/// Create a new multithreaded executor using the given threa... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/src/executor/mod.rs | src/executor/mod.rs | //! Types which can take a boxed closure and execute it, preferably in the background.
#![cfg_attr(feature="clippy", allow(boxed_local))]
pub mod threaded;
pub use mpmc::{Receiver, RecvIter, RecvIntoIter};
/// The default executor which should be suitable for most use-cases.
pub type DefaultExecutor = threaded::Sin... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/examples/post_service.rs | examples/post_service.rs | // This example assumes the `serde` and `serde-json` features.
//
// If you are using the `rustc-serialize` feature, use `RustcDecodable` and `RustcEncodable`
// instead of `Deserialize` and `Serialize`, respectively.
#[macro_use] extern crate anterofit;
#[macro_use] extern crate serde_derive;
// The minimum imports ... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/service-attr/src/lib.rs | service-attr/src/lib.rs | #![feature(proc_macro)]
extern crate syn;
#[macro_use] extern crate quote;
extern crate proc_macro;
use proc_macro::TokenStream;
use quote::{Tokens, ToTokens};
use syn::*;
use std::iter::Peekable;
#[proc_macro_attribute]
pub fn service(args: TokenStream, input: TokenStream) -> TokenStream {
let item = parse_ite... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
abonander/anterofit | https://github.com/abonander/anterofit/blob/19fb87314b4e72a2454fd4724732a04dbac62ef3/service-attr/examples/post_service.rs | service-attr/examples/post_service.rs | // This example assumes the `serde` and `serde-json` features.
//
// If you are using the `rustc-serialize` feature, use `RustcDecodable` and `RustcEncodable`
// instead of `Deserialize` and `Serialize`, respectively.
#![feature(proc_macro)]
#[macro_use] extern crate anterofit;
extern crate anterofit_service_attr;
#... | rust | Apache-2.0 | 19fb87314b4e72a2454fd4724732a04dbac62ef3 | 2026-01-04T20:18:25.482930Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/file_group_item.rs | fclones-gui/src/file_group_item.rs | use adw::glib;
use adw::glib::ObjectExt;
use adw::subclass::prelude::*;
use std::cell::{Ref, RefCell};
use std::collections::BTreeSet;
use std::ops::Deref;
use crate::file_group_item::imp::Selection;
use fclones::{FileHash, FileLen, PartitionedFileGroup};
use crate::file_item::FileItem;
mod imp {
use std::cell::... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/app.rs | fclones-gui/src/app.rs | use adw::gtk::{MessageDialog, MessageType};
use adw::prelude::{DialogExt, WidgetExt};
use std::convert::identity;
use std::path::PathBuf;
use gtk::{CssProvider, StyleContext};
use relm4::gtk::prelude::GtkWindowExt;
use relm4::gtk::{gdk, ButtonsType};
use relm4::Component;
use relm4::ComponentController;
use relm4::Wor... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/file_item.rs | fclones-gui/src/file_item.rs | use std::cell::{Cell, Ref};
use std::time::SystemTime;
use fclones::PathAndMetadata;
use relm4::gtk::glib;
use relm4::gtk::glib::Object;
use relm4::gtk::prelude::ObjectExt;
use relm4::gtk::subclass::prelude::ObjectSubclassIsExt;
mod imp {
use relm4::gtk::glib::{ParamSpec, Value};
use relm4::gtk::prelude::{Par... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/group_worker.rs | fclones-gui/src/group_worker.rs | use crate::app::AppMsg;
use crate::progress::{LogAdapter, ProgressMsg};
use fclones::config::GroupConfig;
use fclones::PathAndMetadata;
use relm4::{spawn, ComponentSender, Worker};
use std::collections::VecDeque;
use std::time::SystemTime;
pub struct GroupWorker {
group_start_id: usize,
groups: VecDeque<Vec<f... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/progress.rs | fclones-gui/src/progress.rs | use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Arc;
use std::thread;
use std::time::Duration;
use adw::prelude::*;
use relm4::gtk::prelude::GtkWindowExt;
use relm4::{gtk, view, Component, ComponentParts, ComponentSender, RelmWidgetExt, Sender};
use fclones::log::{Log, LogLevel, ProgressBarLength};
use f... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/dir_chooser.rs | fclones-gui/src/dir_chooser.rs | use std::path::PathBuf;
use adw::prelude::*;
use relm4::gtk;
use relm4::gtk::gio;
use relm4::gtk::glib;
/// Displays a FileChooserDialog and lets the user select input directories.
/// If the user accepts the selection, passes the selected path to the given `accept_fn`.
pub fn choose_dir(
window: &impl IsA<gtk::W... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/bytes_entry.rs | fclones-gui/src/bytes_entry.rs | use adw::gtk;
use adw::prelude::*;
use gtk::glib;
const UNLIMITED_STR: &str = "Unlimited";
/** A text field with a slider allowing to enter bytes value. */
pub struct BytesRow {
row: adw::ActionRow,
entry: gtk::EditableLabel,
default: String,
}
impl BytesRow {
pub fn new(title: &str, subtitle: &str,... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/dedupe_worker.rs | fclones-gui/src/dedupe_worker.rs | use std::cmp;
use std::collections::HashMap;
use std::sync::Mutex;
use rayon::iter::ParallelBridge;
use rayon::iter::ParallelIterator;
use relm4::{spawn, ComponentSender, Worker};
use fclones::log::{Log, ProgressBarLength};
use fclones::{DedupeOp, PartitionedFileGroup};
use crate::app::AppMsg;
use crate::progress::{... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/main.rs | fclones-gui/src/main.rs | use std::env;
use relm4::RelmApp;
mod app;
mod bytes_entry;
mod dedupe_worker;
mod dir_chooser;
mod duplicates;
mod file_group_item;
mod file_item;
mod group_worker;
mod input;
mod progress;
fn main() {
adw::init().unwrap();
let relm = RelmApp::new("io.github.pkolaczk.Fclones");
relm.run::<app::AppModel>... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/duplicates.rs | fclones-gui/src/duplicates.rs | use std::cell::{Cell, RefCell};
use std::collections::BTreeSet;
use std::ops::Deref;
use std::path::PathBuf;
use std::rc::Rc;
use std::sync::Arc;
use fclones::{sort_by_priority, FileLen};
use fclones::{DedupeOp, FileSubGroup};
use fclones::{PartitionedFileGroup, Path};
use adw::gio::{ListStore, SimpleAction};
use adw... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | true |
pkolaczk/fclones-gui | https://github.com/pkolaczk/fclones-gui/blob/f70e70ea43ea4c6858780307df112922ab550332/fclones-gui/src/input.rs | fclones-gui/src/input.rs | use relm4::gtk;
use relm4::RelmWidgetExt;
use std::cell::Cell;
use std::cell::RefCell;
use std::path::PathBuf;
use std::rc::Rc;
use adw::prelude::*;
use gtk::gio;
use gtk::glib;
use crate::app::AppMsg;
use crate::bytes_entry;
use crate::bytes_entry::*;
use crate::dir_chooser::choose_dir;
pub struct InputPageModel {
... | rust | MIT | f70e70ea43ea4c6858780307df112922ab550332 | 2026-01-04T20:18:25.948130Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/build.rs | webapp/build.rs | use std::fs;
use std::process::Command;
fn main() {
// ensure that the directory exists which needs to be embedded in our binary
let directory_path = "./frontend/build/web";
if fs::create_dir_all(directory_path).is_err() {
std::process::exit(1);
}
let output = Command::new("git")
.... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/session.rs | webapp/src/session.rs | use axum::async_trait;
use axum_login::tower_sessions::session::Id;
use axum_login::tower_sessions::session::Record;
use axum_login::tower_sessions::session_store;
use axum_login::tower_sessions::ExpiredDeletion;
use axum_login::tower_sessions::SessionStore;
use parking_lot::RwLock;
use std::collections::HashMap;
use s... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/logger.rs | webapp/src/logger.rs | use anyhow::Context;
use anyhow::Result;
use time::macros::format_description;
use tracing::metadata::LevelFilter;
use tracing_subscriber::filter::Directive;
use tracing_subscriber::fmt::time::UtcTime;
use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use tracing_subscriber:... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/cli.rs | webapp/src/cli.rs | use anyhow::ensure;
use anyhow::Result;
use clap::Parser;
use sha2::digest::FixedOutput;
use sha2::Digest;
use sha2::Sha256;
use std::env::current_dir;
use std::path::PathBuf;
use std::str::FromStr;
#[derive(Parser)]
pub struct Opts {
#[clap(
long,
default_value = "02dd6abec97f9a748bf76ad502b004ce0... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/api.rs | webapp/src/api.rs | use crate::AppState;
use anyhow::anyhow;
use anyhow::Context;
use anyhow::Result;
use axum::extract::Path;
use axum::extract::Query;
use axum::extract::State;
use axum::http::StatusCode;
use axum::response::IntoResponse;
use axum::response::Response;
use axum::routing::get;
use axum::routing::post;
use axum::Json;
use ... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | true |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/auth.rs | webapp/src/auth.rs | use axum::async_trait;
use axum::routing::get;
use axum::routing::post;
use axum::Router;
use axum_login::AuthUser;
use axum_login::AuthnBackend;
use axum_login::UserId;
use serde::Deserialize;
use sha2::digest::FixedOutput;
use sha2::Digest;
use sha2::Sha256;
use std::error::Error;
use std::fmt::Display;
use std::fmt:... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/subscribers.rs | webapp/src/subscribers.rs | use native::event::api::WalletInfo;
use native::event::subscriber::Subscriber;
use native::event::EventInternal;
use native::event::EventType;
use parking_lot::Mutex;
use rust_decimal::Decimal;
use std::sync::Arc;
use tokio::sync::watch;
pub struct Senders {
wallet_info: watch::Sender<Option<WalletInfo>>,
ask_... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/webapp/src/main.rs | webapp/src/main.rs | mod api;
mod auth;
mod cli;
mod logger;
mod session;
mod subscribers;
use crate::api::version;
use crate::auth::Backend;
use crate::cli::Opts;
use crate::session::InMemorySessionStore;
use crate::subscribers::AppSubscribers;
use anyhow::Context;
use anyhow::Result;
use axum::http::header;
use axum::http::Request;
use ... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/lib.rs | mobile/native/src/lib.rs | // These modules need to be define at the top so that FRB doesn't try to import from them.
pub mod api;
pub mod calculations;
pub mod channel_trade_constraints;
pub mod commons;
pub mod config;
pub mod db;
pub mod dlc;
pub mod event;
pub mod health;
pub mod logger;
pub mod schema;
pub mod state;
pub mod trade;
pub mod ... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/names.rs | mobile/native/src/names.rs | pub fn get_new_name() -> String {
let names = petname::Petnames::default();
let input = names.generate_one(2, " ");
return uppercase_first_characters(input.as_str(), ' ');
}
fn uppercase_first_characters(input: &str, separator: char) -> String {
let mut parts = input.splitn(2, separator);
if let (S... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/cipher.rs | mobile/native/src/cipher.rs | use aes_gcm_siv::AeadInPlace;
use aes_gcm_siv::Aes256GcmSiv;
use aes_gcm_siv::KeyInit;
use aes_gcm_siv::Nonce;
use anyhow::anyhow;
use anyhow::Result;
use bitcoin::secp256k1::ecdsa::Signature;
use bitcoin::secp256k1::rand;
use bitcoin::secp256k1::rand::Rng;
use bitcoin::secp256k1::PublicKey;
use bitcoin::secp256k1::Sec... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/logger.rs | mobile/native/src/logger.rs | use anyhow::Context;
use anyhow::Result;
use flutter_rust_bridge::StreamSink;
use std::collections::BTreeMap;
use std::sync::Arc;
use std::sync::Once;
use tracing_log::LogTracer;
use tracing_subscriber::filter::Directive;
use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::fmt::time;
use tracing_subscr... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/emergency_kit.rs | mobile/native/src/emergency_kit.rs | use crate::calculations::calculate_liquidation_price;
use crate::config;
use crate::db;
use crate::db::connection;
use crate::dlc;
use crate::event;
use crate::event::EventInternal;
use crate::get_maintenance_margin_rate;
use crate::state::get_node;
use crate::trade::position::Position;
use crate::trade::position::Posi... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/report_error.rs | mobile/native/src/report_error.rs | use crate::commons::reqwest_client;
use crate::config;
use crate::state::get_node;
use crate::state::get_or_create_tokio_runtime;
use reqwest::Url;
pub fn report_error_to_coordinator<E: ToString>(error: &E) {
let version = env!("CARGO_PKG_VERSION").to_string();
let client = reqwest_client();
let pk = get_... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/state.rs | mobile/native/src/state.rs | use crate::config::ConfigInternal;
use crate::dlc::node::Node;
use crate::logger::LogEntry;
use crate::storage::TenTenOneNodeStorage;
use anyhow::Result;
use flutter_rust_bridge::StreamSink;
use parking_lot::RwLock;
use state::Storage;
use std::sync::Arc;
use tokio::runtime::Runtime;
use tokio::sync::broadcast::Sender;... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/watcher.rs | mobile/native/src/watcher.rs | use crate::event::subscriber::Subscriber;
use crate::event::EventInternal;
use crate::event::EventType;
use crate::state;
use anyhow::Result;
use bitcoin::Address;
use bitcoin::Amount;
use std::time::Duration;
use tokio::sync::broadcast::Sender;
#[derive(Clone)]
pub struct InvoiceWatcher {
pub sender: Sender<Strin... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/destination.rs | mobile/native/src/destination.rs | use crate::api::Destination;
use anyhow::anyhow;
use anyhow::ensure;
use anyhow::Context;
use anyhow::Result;
use bitcoin::address::NetworkUnchecked;
use bitcoin::Address;
use bitcoin::Amount;
use bitcoin::Network;
use std::str::FromStr;
pub fn decode_destination(destination: String) -> Result<Destination> {
let n... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/storage.rs | mobile/native/src/storage.rs | use crate::backup::RemoteBackupClient;
use crate::backup::DB_BACKUP_KEY;
use crate::backup::DB_BACKUP_NAME;
use crate::backup::DLC_BACKUP_KEY;
use crate::cipher::AesCipher;
use crate::db;
use anyhow::Result;
use bitcoin::secp256k1::SecretKey;
use bitcoin::Network;
use std::fs;
use std::path::Path;
use std::path::PathBu... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/orderbook.rs | mobile/native/src/orderbook.rs | use crate::config;
use crate::dlc;
use crate::event;
use crate::event::BackgroundTask;
use crate::event::EventInternal;
use crate::event::TaskStatus;
use crate::health::ServiceStatus;
use crate::state;
use crate::trade::funding_fee_event;
use crate::trade::funding_fee_event::FundingFeeEvent;
use crate::trade::order;
us... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/hodl_invoice.rs | mobile/native/src/hodl_invoice.rs | use crate::commons::reqwest_client;
use crate::config;
use crate::dlc::get_node_key;
use crate::dlc::get_node_pubkey;
use anyhow::Result;
use bitcoin::Amount;
use reqwest::Url;
use xxi_node::commons;
#[derive(Clone)]
pub struct HodlInvoice {
pub payment_request: String,
pub pre_image: String,
pub r_hash: S... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/api.rs | mobile/native/src/api.rs | use crate::calculations;
use crate::channel_trade_constraints;
use crate::channel_trade_constraints::TradeConstraints;
use crate::commons::api::Price;
use crate::config;
use crate::config::api::Config;
use crate::config::api::Directories;
use crate::config::get_network;
use crate::db;
use crate::destination;
use crate:... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/schema.rs | mobile/native/src/schema.rs | // @generated automatically by Diesel CLI.
diesel::table! {
answered_polls (id) {
id -> Integer,
poll_id -> Integer,
timestamp -> BigInt,
}
}
diesel::table! {
channels (user_channel_id) {
user_channel_id -> Text,
channel_id -> Nullable<Text>,
inbound -> BigI... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/polls.rs | mobile/native/src/polls.rs | use crate::commons::reqwest_client;
use crate::config;
use crate::db;
use anyhow::Result;
use bitcoin::secp256k1::PublicKey;
use reqwest::Url;
use xxi_node::commons::Answer;
use xxi_node::commons::Choice;
use xxi_node::commons::Poll;
use xxi_node::commons::PollAnswers;
pub(crate) async fn get_new_polls() -> Result<Vec... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/backup.rs | mobile/native/src/backup.rs | use crate::cipher::AesCipher;
use crate::config;
use crate::db;
use crate::event::subscriber::Subscriber;
use crate::event::EventInternal;
use crate::event::EventType;
use anyhow::bail;
use anyhow::ensure;
use anyhow::Result;
use futures::future::RemoteHandle;
use futures::FutureExt;
use reqwest::Client;
use reqwest::S... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
get10101/10101 | https://github.com/get10101/10101/blob/3ae135090528d64fbe2702aa03e1e3953cd57e2f/mobile/native/src/health.rs | mobile/native/src/health.rs | use crate::config;
use crate::event;
use crate::event::EventInternal;
use anyhow::Context;
use anyhow::Result;
use futures::future::RemoteHandle;
use futures::FutureExt;
use reqwest::StatusCode;
use std::time::Duration;
use tokio::runtime::Runtime;
use tokio::sync::watch;
/// Services which status is monitored
#[deriv... | rust | MIT | 3ae135090528d64fbe2702aa03e1e3953cd57e2f | 2026-01-04T20:18:11.134572Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.