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
Charlie-XIAO/tauri-plugin-desktop-underlay
https://github.com/Charlie-XIAO/tauri-plugin-desktop-underlay/blob/d5200ed0a70ecec83dd707087bbbcda2c7abeef3/examples/desktop-clock/src-tauri/build.rs
examples/desktop-clock/src-tauri/build.rs
fn main() { tauri_build::build() }
rust
MIT
d5200ed0a70ecec83dd707087bbbcda2c7abeef3
2026-01-04T20:21:17.039147Z
false
Charlie-XIAO/tauri-plugin-desktop-underlay
https://github.com/Charlie-XIAO/tauri-plugin-desktop-underlay/blob/d5200ed0a70ecec83dd707087bbbcda2c7abeef3/examples/desktop-clock/src-tauri/src/main.rs
examples/desktop-clock/src-tauri/src/main.rs
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] use tauri::{generate_context, Builder, Manager}; use tauri_plugin_desktop_underlay::DesktopUnderlayExt; fn main() { Builder::default() .setup(|app| { let clock = app.get_webview_window("clock").unwrap(); clock.set_d...
rust
MIT
d5200ed0a70ecec83dd707087bbbcda2c7abeef3
2026-01-04T20:21:17.039147Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/util.rs
src/util.rs
//! Utility functions and extension traits use crate::types::*; /// Extension trait for combined bit shift and mask pub trait ShiftMask: Sized { /// Output type of shift operation type MaskedOutput; /// Apply a right shift to a value, and return both the result and the /// bytes that were shifted out fn shift_m...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/main.rs
src/main.rs
#![doc = env!("CARGO_PKG_DESCRIPTION")] #![warn(missing_docs)] #![warn(clippy::missing_docs_in_private_items)] #[cfg(feature = "jemalloc-auto")] extern crate minedmap_default_alloc; mod core; mod io; mod util; mod world; use minedmap_nbt as nbt; use minedmap_resource as resource; use minedmap_types as types; use an...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/sign.rs
src/world/sign.rs
//! Processing of sign text use std::fmt::Display; use bincode::{Decode, Encode}; use minedmap_resource::Color; use serde::Serialize; use super::{ de, text_value::{FormattedText, FormattedTextList, TextValue}, }; /// Version-independent reference to (front or back) sign text #[derive(Debug, Default)] pub struct R...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/text_value.rs
src/world/text_value.rs
//! Newtype and helper methods for handling Minecraft text values use std::{collections::VecDeque, fmt::Display}; use bincode::{Decode, Encode}; use minedmap_resource::Color; use serde::{Deserialize, Serialize}; /// A span of formatted text /// /// A [TextValue] consists of a tree of [FormattedText] nodes (canonical...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/layer.rs
src/world/layer.rs
//! Functions to search the "top" layer of a chunk use std::num::NonZeroU16; use anyhow::{Context, Result}; use bincode::{Decode, Encode}; use indexmap::IndexSet; use super::chunk::{Chunk, SectionIterItem}; use crate::{ resource::{Biome, BlockColor, BlockFlag}, types::*, }; /// Height (Y coordinate) of a block #[...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/block_entity.rs
src/world/block_entity.rs
//! Processing of block entity data use bincode::{Decode, Encode}; use minedmap_resource::{BlockFlag, BlockType}; use serde::Serialize; use super::{ de, sign::{BlockEntitySignExt, SignText}, }; /// Kind of sign block #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Encode, Decode, Serialize)] #[serde(rename_all = "...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/mod.rs
src/world/mod.rs
//! Data structures describing Minecraft save data pub mod block_entity; pub mod chunk; pub mod de; pub mod layer; pub mod section; pub mod sign; pub mod text_value;
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/section.rs
src/world/section.rs
//! Higher-level interfaces to section data //! //! The data types in this module attempt to provide interfaces abstracting //! over different data versions as much as possible. use std::fmt::Debug; use anyhow::{Context, Result, bail}; use num_integer::div_rem; use tracing::debug; use super::de; use crate::{ resour...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/chunk.rs
src/world/chunk.rs
//! Higher-level interfaces to chunk data //! //! The data types in this module attempt to provide interfaces abstracting //! over different data versions as much as possible. use std::{ collections::{BTreeMap, btree_map}, iter::{self, FusedIterator}, }; use anyhow::{Context, Result, bail}; use super::{block_entit...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/world/de.rs
src/world/de.rs
//! Data structures used to deserialize Minecraft save data use serde::Deserialize; use super::text_value::TextValue; /// Element of the `palette` list of 1.18+ [block states](BlockStatesV1_18) #[derive(Debug, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct BlockStatePaletteEntry { /// Block type ID p...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/region_group.rs
src/core/region_group.rs
//! The generic [RegionGroup] data structure use std::{future::Future, iter}; use anyhow::Result; use futures_util::future::OptionFuture; /// A generic array of 3x3 elements /// /// A RegionGroup is used to store information about a 3x3 neighborhood of /// regions. /// /// The center element is always populated, whi...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/entity_collector.rs
src/core/entity_collector.rs
//! The [EntityCollector] use std::path::Path; use anyhow::{Context, Result}; use tracing::{info, warn}; use super::{common::*, tile_collector::TileCollector, tile_merger::TileMerger}; use crate::io::{fs, storage}; /// Generates mipmap tiles from full-resolution tile images pub struct EntityCollector<'a> { /// Com...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/metadata_writer.rs
src/core/metadata_writer.rs
//! The [MetadataWriter] and related types use anyhow::{Context, Result}; use regex::Regex; use serde::Serialize; use crate::{ core::common::*, io::{fs, storage}, world::{ block_entity::{self, BlockEntity, BlockEntityData}, de, sign, }, }; /// Minimum and maximum X and Z tile coordinates for a mipmap level #...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/tile_collector.rs
src/core/tile_collector.rs
//! A trait for recursively processing tiles //! //! Used for mipmap generation and collecting entity data use std::sync::mpsc; use anyhow::Result; use rayon::prelude::*; use super::common::*; /// Helper to determine if no further mipmap levels are needed /// /// If all tile coordinates are -1 or 0, further mipmap ...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/tile_merger.rs
src/core/tile_merger.rs
//! Mipmap-style merging of tiles use std::{ fs::File, io::BufWriter, path::{Path, PathBuf}, time::SystemTime, }; use anyhow::Result; use tracing::warn; use super::common::*; use crate::io::fs; /// [TileMerger::merge_tiles] return #[derive(Debug, Clone, Copy)] pub enum Stat { /// None of the input files were f...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/mod.rs
src/core/mod.rs
//! Core functions of the MinedMap CLI mod common; mod entity_collector; mod metadata_writer; mod region_group; mod region_processor; mod tile_collector; mod tile_merger; mod tile_mipmapper; mod tile_renderer; use std::{ path::PathBuf, sync::mpsc::{self, Receiver}, thread, time::Duration, }; use anyhow::{Context...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/tile_mipmapper.rs
src/core/tile_mipmapper.rs
//! The [TileMipmapper] use std::{marker::PhantomData, ops::Add}; use anyhow::{Context, Result}; use tracing::{debug, info, warn}; use super::{ common::*, tile_collector::TileCollector, tile_merger::{self, TileMerger}, }; use crate::{io::fs, types::*}; /// Counters for the number of processed and total tiles ///...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/tile_renderer.rs
src/core/tile_renderer.rs
//! The [TileRenderer] and related types and functions use std::{ num::NonZeroUsize, path::PathBuf, sync::{Arc, Mutex}, time::SystemTime, }; use anyhow::{Context, Result}; use lru::LruCache; use rayon::prelude::*; use tokio::sync::OnceCell; use tracing::{debug, info}; use super::{common::*, region_group::RegionG...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/common.rs
src/core/common.rs
//! Common data types and functions used by multiple generation steps use std::{ collections::{BTreeMap, BTreeSet}, fmt::Debug, hash::Hash, path::{Path, PathBuf}, }; use anyhow::{Context, Result}; use bincode::{Decode, Encode}; use clap::ValueEnum; use regex::{Regex, RegexSet}; use serde::Serialize; use crate::{...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/core/region_processor.rs
src/core/region_processor.rs
//! The [RegionProcessor] and related functions use std::{ffi::OsStr, path::PathBuf, sync::mpsc, time::SystemTime}; use anyhow::{Context, Result}; use enum_map::{Enum, EnumMap}; use indexmap::IndexSet; use minedmap_resource::Biome; use rayon::prelude::*; use tracing::{debug, info, warn}; use super::common::*; use cr...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/io/fs.rs
src/io/fs.rs
//! Helpers and common functions for filesystem access use std::{ fs::{self, File}, io::{BufReader, BufWriter, Read, Write}, path::{Path, PathBuf}, time::SystemTime, }; use anyhow::{Context, Ok, Result}; use serde::{Deserialize, Serialize}; /// A file metadata version number /// /// Deserialized metadata with no...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/io/storage.rs
src/io/storage.rs
//! Functions for serializing and deserializing MinedMap data structures efficiently //! //! Data is serialized using Bincode and compressed using zstd. use std::{ fs::File, io::{Read, Write}, path::Path, time::SystemTime, }; use anyhow::{Context, Result}; use bincode::{Decode, Encode}; use super::fs; /// Binco...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/src/io/mod.rs
src/io/mod.rs
//! Input/output functions pub mod fs; pub mod storage;
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/resource/src/lib.rs
crates/resource/src/lib.rs
#![doc = env!("CARGO_PKG_DESCRIPTION")] #![warn(missing_docs)] #![warn(clippy::missing_docs_in_private_items)] mod biomes; mod block_color; mod block_types; mod legacy_biomes; mod legacy_block_types; use std::collections::HashMap; use bincode::{BorrowDecode, Decode, Encode}; use enumflags2::{BitFlags, bitflags}; //...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/resource/src/block_color.rs
crates/resource/src/block_color.rs
//! Functions for computations of block colors use super::{Biome, BlockColor, Color, Colorf}; /// Converts an u8 RGB color to a float vector fn color_vec_unscaled(color: Color) -> Colorf { Colorf::from_array(color.0.map(f32::from)) } /// Converts an u8 RGB color to a float vector, scaling the components to 0.0..1.0...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/resource/src/block_types.rs
crates/resource/src/block_types.rs
//! Block type information //! //! This file is generated using resource/generate.py, do not edit use enumflags2::make_bitflags; use super::*; /// List if known block types and their properties pub const BLOCK_TYPES: &[(&str, ConstBlockType)] = &[ ( "acacia_button", ConstBlockType { block_color: BlockColor {...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
true
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/resource/src/biomes.rs
crates/resource/src/biomes.rs
//! Biome data //! //! This file is generated using resource/biomes.py, do not edit use super::*; use BiomeGrassColorModifier::*; /// List if known biomes and their properties pub const BIOMES: &[(&str, Biome)] = &[ ( "badlands", Biome::new(200, 0) .foliage([158, 129, 77]) .grass([144, 129, 77]), ), ("ba...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/resource/src/legacy_block_types.rs
crates/resource/src/legacy_block_types.rs
//! Mapping of old numeric block type and damage/subtype IDs to new string IDs /// Helper for block types that don't use the damage/subtype data const fn simple(id: &str) -> [&str; 16] { [ id, id, id, id, id, id, id, id, id, id, id, id, id, id, id, id, ] } /// Default block type for unassigned numeric IDs const D...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/resource/src/legacy_biomes.rs
crates/resource/src/legacy_biomes.rs
//! Manually maintained biome data (aliases and legacy biome IDs) /// Biome ID aliases /// /// Some biomes have been renamed or merged in recent Minecraft versions. /// Maintain a list of aliases to support chunks saved by older versions. pub const BIOME_ALIASES: &[(&str, &str)] = &[ // Biomes fix ("beaches", "beach...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/types/src/lib.rs
crates/types/src/lib.rs
#![doc = env!("CARGO_PKG_DESCRIPTION")] #![warn(missing_docs)] #![warn(clippy::missing_docs_in_private_items)] use std::{ fmt::Debug, iter::FusedIterator, ops::{Index, IndexMut}, }; use bincode::{Decode, Encode}; use itertools::iproduct; /// Const generic AXIS arguments for coordinate types pub mod axis { /// Th...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/nbt/src/lib.rs
crates/nbt/src/lib.rs
#![doc = env!("CARGO_PKG_DESCRIPTION")] #![warn(missing_docs)] #![warn(clippy::missing_docs_in_private_items)] pub mod data; pub mod region;
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/nbt/src/region.rs
crates/nbt/src/region.rs
//! Functions for reading and deserializing region data use std::{ fs::File, io::{SeekFrom, prelude::*}, path::Path, }; use anyhow::{Context, Result, bail}; use flate2::read::ZlibDecoder; use serde::de::DeserializeOwned; use minedmap_types::*; /// Data block size of region data files /// /// After one header blo...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/nbt/src/data.rs
crates/nbt/src/data.rs
//! Functions for reading and deserializing compressed NBT data use std::{fs::File, io::prelude::*, path::Path}; use anyhow::{Context, Result}; use flate2::read::GzDecoder; use serde::de::DeserializeOwned; /// Reads compressed NBT data from a reader and deserializes to a given data structure pub fn from_reader<R, T>...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/nbt/examples/nbtdump.rs
crates/nbt/examples/nbtdump.rs
//! Dumps data from a NBT data file in a human-readable format #![warn(missing_docs)] #![warn(clippy::missing_docs_in_private_items)] use std::path::PathBuf; use anyhow::Result; use clap::Parser; /// Dump a Minecraft NBT data file in a human-readable format #[derive(Debug, Parser)] #[command(version)] struct Args {...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/nbt/examples/regiondump.rs
crates/nbt/examples/regiondump.rs
//! Dumps data from a region data file in a human-readable format #![warn(missing_docs)] #![warn(clippy::missing_docs_in_private_items)] use std::path::PathBuf; use anyhow::Result; use clap::Parser; /// Dump a Minecraft NBT region file in a human-readable format #[derive(Debug, Parser)] #[command(version)] struct A...
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
neocturne/MinedMap
https://github.com/neocturne/MinedMap/blob/e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2/crates/default-alloc/src/lib.rs
crates/default-alloc/src/lib.rs
#[cfg(any(target_env = "musl", feature = "jemalloc"))] #[global_allocator] static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
rust
MIT
e20b6f9c09d80ccb102d1d9c2f13bc5a38a5e5c2
2026-01-04T20:21:57.104151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/wrappers.rs
src/wrappers.rs
use futures_core::stream::TryStream; use futures_sink::Sink; pub(crate) struct ClientRequest<T, I> where T: Sink<I> + TryStream, { pub(crate) req: I, pub(crate) span: tracing::Span, pub(crate) res: tokio::sync::oneshot::Sender<ClientResponse<T::Ok>>, } pub(crate) struct ClientResponse<T> { pub(cra...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/lib.rs
src/lib.rs
//! This crate provides utilities for using protocols that follow certain common patterns on //! top of [Tokio](https://tokio.rs) and [Tower](https://github.com/tower-rs/tower). //! //! # Protocols //! //! At a high level, a protocol is a mechanism that lets you take a bunch of requests and turn them //! into responses...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/error.rs
src/error.rs
use futures_core::stream::TryStream; use futures_sink::Sink; use std::{error, fmt}; /// An error that occurred while servicing a request. #[non_exhaustive] pub enum Error<T, I> where T: Sink<I> + TryStream, { /// The underlying transport failed to send a request. BrokenTransportSend(<T as Sink<I>>::Error),...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/mediator.rs
src/mediator.rs
use crossbeam::atomic::AtomicCell; use futures_util::task; use std::fmt; use std::sync::Arc; use std::task::{Context, Poll}; #[derive(Debug)] enum CellValue<T> { /// The sender has left a value. Some(T), /// If the receiver sees this, the sender has disconnected. /// If the sender sees this, the recei...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/multiplex/client.rs
src/multiplex/client.rs
use crate::mediator; use crate::mediator::TrySendError; use crate::wrappers::*; use crate::Error; use futures_core::{ready, stream::TryStream}; use futures_sink::Sink; use pin_project::pin_project; use std::collections::VecDeque; use std::fmt; use std::future::Future; use std::marker::PhantomData; use std::pin::Pin; us...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/multiplex/mod.rs
src/multiplex/mod.rs
//! In a multiplexed protocol, the server responds to client requests in the order they complete. //! Request IDs ([`TagStore::Tag`]) are used to match up responses with the request that triggered //! them. This allows the server to process requests out-of-order, and eliminates the //! application-level head-of-line bl...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/multiplex/server.rs
src/multiplex/server.rs
use futures_core::{ready, stream::TryStream}; use futures_sink::Sink; use futures_util::stream::FuturesUnordered; use pin_project::pin_project; use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; use std::{error, fmt}; use tower_service::Service; /// This type provides an implementation of a To...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/pipeline/client.rs
src/pipeline/client.rs
use crate::mediator; use crate::wrappers::*; use crate::Error; use futures_core::{ready, stream::TryStream}; use futures_sink::Sink; use pin_project::pin_project; use std::collections::VecDeque; use std::fmt; use std::future::Future; use std::marker::PhantomData; use std::pin::Pin; use std::sync::{atomic, Arc}; use std...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/pipeline/mod.rs
src/pipeline/mod.rs
//! In a pipelined protocol, the server responds to client requests in the order they were sent. //! Many requests can be in flight at the same time, but no request sees a response until all //! previous requests have been satisfied. Pipelined protocols can experience head-of-line //! blocking wherein a slow-to-process...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/src/pipeline/server.rs
src/pipeline/server.rs
use futures_core::{ready, stream::TryStream}; use futures_sink::Sink; use futures_util::stream::FuturesOrdered; use pin_project::pin_project; use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; use std::{error, fmt}; use tower_service::Service; /// This type provides an implementation of a Towe...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/tests/lib.rs
tests/lib.rs
#[macro_use] extern crate serde_derive; use futures_util::future::poll_fn; use std::task::{Context, Poll}; use tower_service::Service; async fn ready<S: Service<Request>, Request>(svc: &mut S) -> Result<(), S::Error> { poll_fn(|cx| svc.poll_ready(cx)).await } #[derive(Serialize, Deserialize)] pub struct Request ...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/tests/multiplex/mod.rs
tests/multiplex/mod.rs
use crate::{ready, unwrap, EchoService, PanicError, Request, Response}; use async_bincode::AsyncBincodeStream; use futures_util::pin_mut; use slab::Slab; use std::pin::Pin; use tokio::net::{TcpListener, TcpStream}; use tokio_tower::multiplex::{ client::VecDequePendingStore, Client, MultiplexTransport, Server, TagSt...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/tests/pipeline/client.rs
tests/pipeline/client.rs
use crate::{ready, unwrap, PanicError, Request, Response}; use async_bincode::{AsyncBincodeReader, AsyncBincodeStream, AsyncBincodeWriter}; use futures_util::{sink::SinkExt, stream::StreamExt}; use tokio::net::{TcpListener, TcpStream}; use tokio_tower::pipeline::Client; use tower_service::Service; #[tokio::test] async...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
tower-rs/tokio-tower
https://github.com/tower-rs/tokio-tower/blob/a364571343275473a268e9616b9c94203c9e9f14/tests/pipeline/mod.rs
tests/pipeline/mod.rs
use crate::{ready, unwrap, EchoService, PanicError, Request, Response}; use async_bincode::AsyncBincodeStream; use futures_util::pin_mut; use tokio::net::{TcpListener, TcpStream}; use tokio_tower::pipeline::{Client, Server}; use tower_service::Service; use tower_test::mock; mod client; #[tokio::test] async fn integra...
rust
MIT
a364571343275473a268e9616b9c94203c9e9f14
2026-01-04T20:22:11.595151Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/build.rs
libmaestro/build.rs
use std::io::Result; fn main() -> Result<()> { prost_build::compile_protos(&["proto/pw.rpc.packet.proto"], &["proto/"])?; prost_build::compile_protos(&["proto/maestro_pw.proto"], &["proto/"])?; Ok(()) }
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/lib.rs
libmaestro/src/lib.rs
//! Library for the Maestro protocol used to change settings (ANC, equalizer, //! etc.) on the Google Pixel Buds Pro. Might support other Pixel Buds, might //! not. use uuid::{uuid, Uuid}; /// UUID under which the Maestro protocol is advertised. /// /// Defined as `25e97ff7-24ce-4c4c-8951-f764a708f7b5`. pub const UUI...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/service/settings.rs
libmaestro/src/service/settings.rs
use num_enum::{IntoPrimitive, FromPrimitive}; use crate::protocol::types; #[repr(i32)] #[derive(Debug, Clone, Copy, PartialEq, Eq, IntoPrimitive, FromPrimitive)] pub enum SettingId { AutoOtaEnable = 1, OhdEnable = 2, OobeIsFinished = 3, GestureEnable = 4, DiagnosticsEnable = 5, OobeMode = 6, ...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/service/mod.rs
libmaestro/src/service/mod.rs
pub mod settings; mod impls; pub use impls::{MaestroService, MultipointService, DosimeterService};
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/service/impls/maestro.rs
libmaestro/src/service/impls/maestro.rs
use crate::protocol::types::{ self, read_setting_msg, settings_rsp, write_setting_msg, HardwareInfo, OobeActionRsp, ReadSettingMsg, RuntimeInfo, SettingsRsp, SoftwareInfo, WriteSettingMsg, }; use crate::pwrpc::client::{ClientHandle, ServerStreamRpc, StreamResponse, UnaryRpc}; use crate::pwrpc::Error; use crate:...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/service/impls/multipoint.rs
libmaestro/src/service/impls/multipoint.rs
use crate::protocol::types::QuietModeStatusEvent; use crate::pwrpc::client::{ClientHandle, ServerStreamRpc, StreamResponse}; use crate::pwrpc::Error; #[derive(Debug, Clone)] pub struct MultipointService { client: ClientHandle, channel_id: u32, rpc_sub_quiet_mode_status: ServerStreamRpc<(), QuietModeStatu...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/service/impls/dosimeter.rs
libmaestro/src/service/impls/dosimeter.rs
use crate::protocol::types::{ DosimeterSummary, DosimeterLiveDbMsg, }; use crate::pwrpc::client::{ClientHandle, ServerStreamRpc, StreamResponse, UnaryRpc}; use crate::pwrpc::Error; #[derive(Debug, Clone)] pub struct DosimeterService { client: ClientHandle, channel_id: u32, rpc_fetch_daily_summaries: ...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/service/impls/mod.rs
libmaestro/src/service/impls/mod.rs
mod dosimeter; pub use self::dosimeter::DosimeterService; mod maestro; pub use self::maestro::MaestroService; mod multipoint; pub use self::multipoint::MultipointService;
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/pwrpc/id.rs
libmaestro/src/pwrpc/id.rs
pub type Hash = u32; #[derive(Debug, Clone, PartialEq, Eq)] pub struct Id { name: String, } impl Id { pub fn new(id: impl Into<String>) -> Self { Self { name: id.into() } } pub fn name(&self) -> &str { &self.name } pub fn hash(&self) -> Hash { hash::hash_65599(&self....
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/pwrpc/status.rs
libmaestro/src/pwrpc/status.rs
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Status { Ok = 0, Cancelled = 1, Unknown = 2, InvalidArgument = 3, DeadlineExceeded = 4, NotFound = 5, AlreadyExists = 6, PermissionDenied = 7, ResourceExhausted = 8, FailedPrecondition = 9, Aborted = 10, OutOfRan...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/pwrpc/client.rs
libmaestro/src/pwrpc/client.rs
use std::pin::Pin; use std::task::Poll; use futures::{Sink, SinkExt, Stream, StreamExt}; use futures::channel::mpsc; use futures::stream::{SplitSink, SplitStream, FusedStream}; use prost::Message; use super::id::Path; use super::status::{Status, Error}; use super::types::{RpcType, RpcPacket, PacketType}; #[derive(...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/pwrpc/types.rs
libmaestro/src/pwrpc/types.rs
#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum RpcType { Unary, ServerStream, ClientStream, BidirectionalStream, } impl RpcType { pub fn has_server_stream(&self) -> bool { match *self { RpcType::ServerStream | RpcType::BidirectionalStream => true, RpcType::Una...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/pwrpc/utils.rs
libmaestro/src/pwrpc/utils.rs
//! Miscellaneous utilities and helpers. use bytes::{Buf, BufMut}; /// An encoded protobuf message. /// /// This type represents an encoded protobuf message. Decoding and encoding are /// essentially no-ops, reading and writing to/from the internal buffer. It is /// a drop-in replacement for any valid (and invalid) p...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/pwrpc/mod.rs
libmaestro/src/pwrpc/mod.rs
pub mod client; pub mod id; pub mod types; pub mod utils; mod status; pub use status::Error; pub use status::Status;
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/consts.rs
libmaestro/src/hdlc/consts.rs
//! Flag bytes and bit masks used in the HDLC encoding. pub mod flags { pub const FRAME: u8 = 0x7E; pub const ESCAPE: u8 = 0x7D; } pub mod escape { pub const MASK: u8 = 0x20; }
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/encoder.rs
libmaestro/src/hdlc/encoder.rs
use bytes::{BufMut, BytesMut}; use super::{consts, crc::Crc32, varint, Frame}; struct ByteEscape<B: BufMut> { buf: B, } impl<B: BufMut> ByteEscape<B> { fn new(buf: B) -> Self { Self { buf } } fn put_u8(&mut self, byte: u8) { match byte { consts::flags::ESCAPE | consts::f...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/codec.rs
libmaestro/src/hdlc/codec.rs
use super::{decoder, encoder, Frame}; use bytes::BytesMut; use tokio::io::{AsyncWrite, AsyncRead}; use tokio_util::codec::Framed; #[derive(Debug)] pub enum DecoderError { Io(std::io::Error), Decoder(decoder::Error), } impl From<std::io::Error> for DecoderError { fn from(value: std::io::Error) -> Self {...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/decoder.rs
libmaestro/src/hdlc/decoder.rs
use bytes::{Buf, BytesMut}; use super::consts; use super::crc; use super::varint; use super::Frame; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Error { UnexpectedData, UnexpectedEndOfFrame, InvalidChecksum, InvalidEncoding, InvalidFrame, InvalidAddress, BufferOverflow, } impl F...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/mod.rs
libmaestro/src/hdlc/mod.rs
//! High-level Data Link Control (HDLC) support library. pub mod codec; pub mod consts; pub mod crc; pub mod decoder; pub mod encoder; pub mod varint; pub use codec::Codec; use bytes::BytesMut; #[derive(Debug, Clone, PartialEq, Eq)] pub struct Frame { pub address: u32, pub control: u8, pub data: Box<[u...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/crc.rs
libmaestro/src/hdlc/crc.rs
//! 32-bit CRC implementation. #[derive(Debug)] pub struct Crc32 { state: u32, } impl Crc32 { pub fn new() -> Self { Self::with_state(0xFFFFFFFF) } pub fn with_state(state: u32) -> Self { Self { state } } pub fn reset(&mut self) { self.state = 0xFFFFFFFF; } p...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/hdlc/varint.rs
libmaestro/src/hdlc/varint.rs
//! Support for variable length integer encoding as used in the HDLC frame encoding. use arrayvec::ArrayVec; pub fn decode<'a, S: IntoIterator<Item = &'a u8>>(src: S) -> Result<(u32, usize), DecodeError> { let mut address = 0; for (i, b) in src.into_iter().copied().enumerate() { address |= ((b >> 1)...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/protocol/codec.rs
libmaestro/src/protocol/codec.rs
use bytes::BytesMut; use prost::Message; use tokio::io::{AsyncRead, AsyncWrite}; use tokio_util::codec::{Decoder, Framed, Encoder}; use crate::pwrpc::types::RpcPacket; use crate::hdlc; use super::addr; pub struct Codec { hdlc: hdlc::Codec, } impl Codec { pub fn new() -> Self { Self { ...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/protocol/utils.rs
libmaestro/src/protocol/utils.rs
use crate::pwrpc::Error; use crate::pwrpc::client::{Client, Request, UnaryResponse, ClientHandle}; use crate::pwrpc::id::PathRef; use crate::pwrpc::types::RpcPacket; use super::addr; use super::addr::Peer; use super::types::SoftwareInfo; pub async fn resolve_channel<S, E>(client: &mut Client<S>) -> Result<u32, Error...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/protocol/mod.rs
libmaestro/src/protocol/mod.rs
pub mod addr; pub mod codec; pub mod utils; pub mod types { include!(concat!(env!("OUT_DIR"), "/maestro_pw.rs")); }
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/src/protocol/addr.rs
libmaestro/src/protocol/addr.rs
use num_enum::{FromPrimitive, IntoPrimitive}; #[repr(u8)] #[derive(Debug, Clone, Copy, PartialEq, Eq, FromPrimitive, IntoPrimitive)] pub enum Peer { Unknown = 0, Host = 1, Case = 2, LeftBtCore = 3, RightBtCore = 4, LeftSensorHub = 5, RightSensorHub = 6, LeftSpiBridge = 7, RightSpiB...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/examples/maestro_get_battery.rs
libmaestro/examples/maestro_get_battery.rs
//! Simple example for reading battery info via the Maestro service. //! //! Usage: //! cargo run --example maestro_get_battery -- <bluetooth-device-address> mod common; use std::str::FromStr; use anyhow::bail; use bluer::{Address, Session}; use futures::StreamExt; use maestro::protocol::codec::Codec; use maestro...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/examples/maestro_listen.rs
libmaestro/examples/maestro_listen.rs
//! Simple example for listening to Maestro messages sent via the RFCOMM channel. //! //! Usage: //! cargo run --example maestro_listen -- <bluetooth-device-address> mod common; use std::str::FromStr; use bluer::{Address, Session}; use futures::StreamExt; use maestro::protocol::codec::Codec; use maestro::protocol...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/examples/maestro_read_settings.rs
libmaestro/examples/maestro_read_settings.rs
//! Simple example for reading settings on the Pixel Buds Pro via the Maestro service. //! //! Usage: //! cargo run --example maestro_read_settings -- <bluetooth-device-address> mod common; use std::str::FromStr; use anyhow::bail; use bluer::{Address, Session}; use maestro::protocol::codec::Codec; use maestro::pr...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/examples/maestro_write_settings.rs
libmaestro/examples/maestro_write_settings.rs
//! Simple example for changing settings on the Pixel Buds Pro via the Maestro service. //! //! Sets active noise cancelling (ANC) state. 1: off, 2: active, 3: aware, 4: adaptive. //! //! Usage: //! cargo run --example maestro_write_settings -- <bluetooth-device-address> <anc-state> mod common; use std::str::FromSt...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libmaestro/examples/common/mod.rs
libmaestro/examples/common/mod.rs
use std::time::Duration; use anyhow::Result; use bluer::{Address, Device, Session}; use bluer::rfcomm::{ProfileHandle, Role, ReqError, Stream, Profile}; use futures::StreamExt; use maestro::pwrpc::Error; use maestro::pwrpc::client::Client; use maestro::pwrpc::types::RpcPacket; pub async fn run_client<S, E>(mut cl...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/cli/build.rs
cli/build.rs
use std::env; use clap::CommandFactory; use clap_complete::shells; #[allow(dead_code)] #[path = "src/cli.rs"] mod cli; use cli::*; fn main() { let outdir = env::var_os("CARGO_TARGET_DIR") .or_else(|| env::var_os("OUT_DIR")) .unwrap(); let mut cmd = Args::command(); clap_complete::genera...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/cli/src/bt.rs
cli/src/bt.rs
use std::time::Duration; use anyhow::Result; use bluer::{Adapter, Address, Device, Session}; use bluer::rfcomm::{ProfileHandle, Role, ReqError, Stream, Profile}; use futures::StreamExt; const PIXEL_BUDS_CLASS: u32 = 0x240404; const PIXEL_BUDS2_CLASS: u32 = 0x244404; pub async fn find_maestro_device(adapter: &Ada...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/cli/src/cli.rs
cli/src/cli.rs
use bluer::Address; use clap::{Parser, Subcommand, ValueEnum}; use maestro::service::settings; /// Control Google Pixel Buds Pro from the command line #[derive(Debug, Parser)] #[command(author, version, about, long_about = None)] pub struct Args { /// Device to use (search for compatible device if unspecified) ...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/cli/src/main.rs
cli/src/main.rs
mod bt; mod cli; use anyhow::Result; use clap::{Parser, CommandFactory}; use futures::{Future, StreamExt}; use maestro::protocol::{utils, addr}; use maestro::pwrpc::client::{Client, ClientHandle}; use maestro::protocol::codec::Codec; use maestro::service::MaestroService; use maestro::service::settings::{self, Setting...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/src/lib.rs
libgfps/src/lib.rs
//! Library for the Google Fast Pair Service protocol (GFPS). Focussed on //! communication via the dedicated GFPS RFCOMM channel. //! //! See <https://developers.google.com/nearby/fast-pair> for the specification. pub mod msg;
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/src/msg/codec.rs
libgfps/src/msg/codec.rs
use super::Message; use bytes::{Buf, BytesMut, BufMut}; use tokio::io::{AsyncRead, AsyncWrite}; use tokio_util::codec::{Decoder, Framed, Encoder}; const MAX_FRAME_SIZE: u16 = 4096; pub struct Codec {} impl Codec { pub fn new() -> Self { Self {} } pub fn wrap<T>(self, io: T) -> Framed<T, Code...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/src/msg/types.rs
libgfps/src/msg/types.rs
//! RFCOMM events and event-related enums. use std::fmt::Display; use num_enum::{IntoPrimitive, FromPrimitive}; use smallvec::SmallVec; #[derive(Debug, Clone, PartialEq, Eq)] pub struct Message { pub group: u8, pub code: u8, pub data: SmallVec<[u8; 8]>, } #[non_exhaustive] #[repr(u8)] #[derive(Debug,...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/src/msg/mod.rs
libgfps/src/msg/mod.rs
//! Types for GFPS Message Stream via RFCOMM. use uuid::{uuid, Uuid}; /// UUID under which the GFPS Message Stream is advertised. /// /// Defined as `df21fe2c-2515-4fdb-8886-f12c4d67927c`. pub const UUID: Uuid = uuid!("df21fe2c-2515-4fdb-8886-f12c4d67927c"); mod codec; pub use codec::Codec; mod types; pub use types...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/examples/gfps_listen.rs
libgfps/examples/gfps_listen.rs
//! Simple example for listening to GFPS messages sent via the RFCOMM channel. //! //! Usage: //! cargo run --example gfps_listen -- <bluetooth-device-address> use std::str::FromStr; use bluer::{Address, Session, Device}; use bluer::rfcomm::{Profile, ReqError, Role, ProfileHandle}; use futures::StreamExt; use gfp...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/examples/ring.rs
libgfps/examples/ring.rs
//! Simple example for "ringing" the buds to locate them. //! //! WARNING: DO NOT RUN THIS EXAMPLE WITH THE BUDS IN YOUR EAR! YOU HAVE BEEN WARNED. //! //! Usage: //! cargo run --example ring -- <bluetooth-device-address> use std::str::FromStr; use bluer::{Address, Session, Device}; use bluer::rfcomm::{Profile, Rol...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
qzed/pbpctrl
https://github.com/qzed/pbpctrl/blob/2620367a41f92135059f637d92a2e4f427abb44e/libgfps/examples/gfps_get_battery.rs
libgfps/examples/gfps_get_battery.rs
//! Simple example for receiving battery info via the GFPS RFCOMM channel. //! //! Usage: //! cargo run --example gfps_get_battery -- <bluetooth-device-address> use std::str::FromStr; use bluer::{Address, Session, Device}; use bluer::rfcomm::{Profile, ReqError, Role, ProfileHandle}; use futures::StreamExt; use gf...
rust
Apache-2.0
2620367a41f92135059f637d92a2e4f427abb44e
2026-01-04T20:22:12.408666Z
false
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/lib.rs
src/lib.rs
pub mod variants; pub use variants::*; pub fn add_to_fonts(fonts: &mut egui::FontDefinitions, variant: Variant) { fonts .font_data .insert("phosphor".into(), variant.font_data().into()); if let Some(font_keys) = fonts.families.get_mut(&egui::FontFamily::Proportional) { font_keys.insert...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
false
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/variants/light.rs
src/variants/light.rs
#![allow(unused)] pub const ACORN: &str = "\u{EB9A}"; pub const ADDRESS_BOOK: &str = "\u{E6F8}"; pub const ADDRESS_BOOK_TABS: &str = "\u{EE4E}"; pub const AIR_TRAFFIC_CONTROL: &str = "\u{ECD8}"; pub const AIRPLANE: &str = "\u{E002}"; pub const AIRPLANE_IN_FLIGHT: &str = "\u{E4FE}"; pub const AIRPLANE_LANDING: &str = "\...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
true
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/variants/fill.rs
src/variants/fill.rs
#![allow(unused)] pub const ACORN: &str = "\u{EB9A}"; pub const ADDRESS_BOOK: &str = "\u{E6F8}"; pub const ADDRESS_BOOK_TABS: &str = "\u{EE4E}"; pub const AIR_TRAFFIC_CONTROL: &str = "\u{ECD8}"; pub const AIRPLANE: &str = "\u{E002}"; pub const AIRPLANE_IN_FLIGHT: &str = "\u{E4FE}"; pub const AIRPLANE_LANDING: &str = "\...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
true
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/variants/regular.rs
src/variants/regular.rs
#![allow(unused)] pub const ACORN: &str = "\u{EB9A}"; pub const ADDRESS_BOOK: &str = "\u{E6F8}"; pub const ADDRESS_BOOK_TABS: &str = "\u{EE4E}"; pub const AIR_TRAFFIC_CONTROL: &str = "\u{ECD8}"; pub const AIRPLANE: &str = "\u{E002}"; pub const AIRPLANE_IN_FLIGHT: &str = "\u{E4FE}"; pub const AIRPLANE_LANDING: &str = "\...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
true
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/variants/bold.rs
src/variants/bold.rs
#![allow(unused)] pub const ACORN: &str = "\u{EB9A}"; pub const ADDRESS_BOOK: &str = "\u{E6F8}"; pub const ADDRESS_BOOK_TABS: &str = "\u{EE4E}"; pub const AIR_TRAFFIC_CONTROL: &str = "\u{ECD8}"; pub const AIRPLANE: &str = "\u{E002}"; pub const AIRPLANE_IN_FLIGHT: &str = "\u{E4FE}"; pub const AIRPLANE_LANDING: &str = "\...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
true
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/variants/mod.rs
src/variants/mod.rs
#[cfg(feature = "bold")] pub mod bold; #[cfg(feature = "fill")] pub mod fill; #[cfg(feature = "light")] pub mod light; #[cfg(feature = "regular")] pub mod regular; #[cfg(feature = "thin")] pub mod thin; #[cfg(not(any( feature = "thin", feature = "light", feature = "regular", feature = "bold", featu...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
false
amPerl/egui-phosphor
https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/src/variants/thin.rs
src/variants/thin.rs
#![allow(unused)] pub const ACORN: &str = "\u{EB9A}"; pub const ADDRESS_BOOK: &str = "\u{E6F8}"; pub const ADDRESS_BOOK_TABS: &str = "\u{EE4E}"; pub const AIR_TRAFFIC_CONTROL: &str = "\u{ECD8}"; pub const AIRPLANE: &str = "\u{E002}"; pub const AIRPLANE_IN_FLIGHT: &str = "\u{E4FE}"; pub const AIRPLANE_LANDING: &str = "\...
rust
Apache-2.0
c33b60c40f703ffa3d40d252f1bc911cf531581d
2026-01-04T20:22:14.235772Z
true