text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use crate::{ profile::Profile, BbsCredential, BlsPublicKey, BlsSecretKey, Credential, CredentialAttribute, CredentialAttributeType, CredentialError, CredentialFragment1, CredentialFragment2, CredentialHolder, CredentialIssuer, CredentialOffer, CredentialPresentation, CredentialRequest, CredentialSchema,...
the_stack
use core::cmp::Ordering; use crate::constraint::Constraint; use crate::proxy::Proxy; use crate::{Float, Nan, Primitive, ToCanonicalBits}; /// Equivalence relation for floating-point primitives. /// /// `FloatEq` agrees with the total ordering provided by `FloatOrd`. See the /// module documentation for more. Importan...
the_stack
const WORD_SIZE: usize = 4; // Word(u32) size in bytes const AES_BLOCK_LEN: usize = 16; // Block Size (bytes) const AES_NB: usize = AES_BLOCK_LEN / WORD_SIZE; // 4, Block Size (Nb words) const AES128_KEY_LEN: usize = 16; // Key Length (bytes) const AES192_KEY_LEN: usize = 24; const AES256_KEY_LEN: usize = 32; const...
the_stack
use std::fmt::{self, Debug}; use std::io::{ErrorKind, Read, Write}; use std::path::{Path, PathBuf}; use log::warn; use super::file_armor::FileArmor; use super::sector::SectorMgr; use crate::base::crypto::{Crypto, Key}; use crate::base::utils; use crate::base::vio; use crate::error::{Error, Result}; use crate::trans::...
the_stack
use super::super::kernel::waiter::*; use super::super::kernel::waiter::qlock::*; use super::super::fs::attr::*; use super::super::fs::file::*; use super::super::task::*; use super::super::qlib::common::*; use super::super::qlib::linux_def::*; use super::super::syscalls::syscalls::*; // Splice moves data to this file, ...
the_stack
//! Parsing and analysis utilities for SPIR-V shader binaries. //! //! This can be used to inspect and validate a SPIR-V module at runtime. The `Spirv` type does some //! validation, but you should not assume that code that is read successfully is valid. //! //! For more information about SPIR-V modules, instructions a...
the_stack
//! All the rules required for a cryptocurrency to have reach consensus across //! the whole network are complex and hard to completely isolate. Some can be //! simple parameters (like block reward), others complex algorithms (like //! Merkle sum trees or reorg rules). However, as long as they're simple //! enough, con...
the_stack
//! benchmarking for bigint //! should be started with: //! ```bash //! rustup run cargo bench //! ``` use criterion::{criterion_group, criterion_main}; use uint::{construct_uint, uint_full_mul_reg}; construct_uint! { pub struct U256(4); } construct_uint! { pub struct U512(8); } impl U256 { #[inline(always)] pu...
the_stack
use crate::dynamics::RigidBodyHandle; use crate::geometry::{ColliderHandle, Contact, ContactManifold}; use crate::math::{Point, Real, Vector}; use parry::query::ContactManifoldsWorkspace; bitflags::bitflags! { #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] /// Flags affecting the beha...
the_stack
use super::index::{VertexIndex, VertexRef}; use crate::protocol::common::graph::Dependency; use fantoch::command::Command; use fantoch::config::Config; use fantoch::id::{Dot, ProcessId, ShardId}; use fantoch::singleton; use fantoch::time::SysTime; use fantoch::HashSet; use fantoch::{debug, trace}; use std::cmp; use std...
the_stack
use std::error::Error; use std::fmt::{self, Debug}; use std::io::{self, Read, Write}; #[cfg(feature = "tokio")] use tokio::io::{AsyncRead, AsyncReadExt}; use crate::control::fixed_header::FixedHeaderError; use crate::control::variable_header::VariableHeaderError; use crate::control::ControlType; use crate::control::F...
the_stack
use once_cell::unsync::OnceCell; use std::mem; use std::ptr; use std::rc::Rc; use webview2::Controller; use winapi::{ shared::minwindef::*, shared::windef::*, um::libloaderapi::*, um::winbase::MulDiv, um::wingdi::*, um::winuser::*, }; fn set_dpi_aware() { unsafe { // Windows 10. let user32 ...
the_stack
extern crate libc; #[cfg(target_os = "redox")] extern crate syscall; extern crate atty; use atty::Stream; use std::collections::HashMap; use std::ffi::OsString; use std::env::args_os; use std::str::from_utf8; static NAME: &str = "test"; // TODO: decide how to handle non-UTF8 input for all the utils // Definitely do...
the_stack
use crate::error::Diagnostic; use crate::util::{ iter_use_idents, pyclass_ident_and_attrs, text_signature, AttributeExt, ClassItemMeta, ContentItem, ContentItemInner, ErrorVec, ItemMeta, ItemNursery, SimpleItemMeta, ALL_ALLOWED_NAMES, }; use proc_macro2::TokenStream; use quote::{quote, quote_spanned, ToToke...
the_stack
use genco::fmt; use genco::prelude::*; use genco::tokens::{Item::*, ItemStr::*}; #[test] fn test_token_gen() { let tokens: rust::Tokens = quote! { foo bar baz #(ref tokens => quote_in! { *tokens => hello }) out? }; assert_eq! { vec![ Literal(...
the_stack
use crate::http::tshark_http; use crate::http2::tshark_http2; use crate::pgsql::tshark_pgsql; use chrono::NaiveDateTime; use quick_xml::events::attributes::Attributes; use quick_xml::events::Event; use std::borrow::Cow; use std::fmt::Debug; use std::io::BufRead; use std::net::IpAddr; use std::path::PathBuf; use std::st...
the_stack
use sketches_ddsketch::{Config, DDSketch}; /// A quantile sketch with relative-error guarantees. /// /// Based on [DDSketch][ddsketch], `Summary` provides quantiles over an arbitrary distribution of /// floating-point numbers, including for negative numbers, using a space-efficient sketch that /// provides relative-er...
the_stack
use crate::{kmem::{kfree, kmalloc}, page::{zalloc, PAGE_SIZE}, virtio, virtio::{Descriptor, MmioOffsets, Queue, StatusField, VIRTIO_RING_SIZE}}; use core::mem::size_of; #[repr(C)] pub struct Geometry { cylinders: u16, heads: u8, sectors: u8, } #[repr(C)] pub struct Topolog...
the_stack
use core::fmt; use core::fmt::{Display, Formatter}; use bech32::{ToBase32, u5, WriteBase32, Base32Len}; use crate::prelude::*; use super::{Invoice, Sha256, TaggedField, ExpiryTime, MinFinalCltvExpiry, Fallback, PayeePubKey, InvoiceSignature, PositiveTimestamp, PrivateRoute, Description, RawTaggedField, Currency, RawH...
the_stack
#[cfg(feature = "diesel")] pub(in crate) mod diesel; mod error; use crate::paging::Paging; #[cfg(feature = "diesel")] pub use self::diesel::{DieselConnectionPurchaseOrderStore, DieselPurchaseOrderStore}; pub use error::{PurchaseOrderBuilderError, PurchaseOrderStoreError}; /// Represents a list of Grid Purchase Order...
the_stack
use crate::hay::SHERLOCK; use crate::util::{sort_lines, Dir, TestCommand}; // See: https://github.com/BurntSushi/ripgrep/issues/16 rgtest!(r16, |dir: Dir, mut cmd: TestCommand| { dir.create_dir(".git"); dir.create(".gitignore", "ghi/"); dir.create_dir("ghi"); dir.create_dir("def/ghi"); dir.create("...
the_stack
use crate::x86::F32x4; #[cfg(target_pointer_width = "32")] use std::arch::x86; #[cfg(target_pointer_width = "64")] use std::arch::x86_64 as x86; impl F32x4 { #[inline] pub fn xxxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 0)) } } #[inline] pub fn yxxx(self) -> F3...
the_stack
//! Provides borrowed implementations of [`SymbolToken`], [`Element`] and its dependents. //! //! Specifically, all implementations are tied to some particular lifetime, generally linked //! to a parser implementation of some sort or some context from which the borrow can occur. //! For simple values, the values are in...
the_stack
use std::collections::HashMap; use bitcoin::{Block, OutPoint, Script, Transaction, TxOut}; use rand::thread_rng; use account::{KeyDerivation, MasterAccount}; use proved::ProvedTransaction; #[derive(Clone, Debug, Eq, PartialEq)] /// a coin is defined by the spendable output /// the key derivation that allows to spend...
the_stack
use std::net::SocketAddr; use std::path::PathBuf; use clap::Clap; use tracing::{info, warn}; use bindle::{ invoice::signature::{KeyRing, SignatureRole}, provider, search, server::{server, TlsConfig}, signature::SecretKeyFile, SecretKeyEntry, }; enum AuthType { /// Use Oidc with the given Clie...
the_stack
use super::blocks::{ AuthoritySetChange, BlockHeaderWithChanges, HeaderToSync, RuntimeHasher, StorageProof, }; use alloc::collections::VecDeque; use alloc::string::String; use alloc::vec::Vec; use chain::Hash; use derive_more::Display; use parity_scale_codec::Encode; type Storage = phala_trie_storage::TrieStorage...
the_stack
#![allow(unused_parens)] #[allow(non_camel_case_types)] pub type fiat_p448_u1 = u8; pub type fiat_p448_i1 = i8; pub type fiat_p448_u2 = u8; pub type fiat_p448_i2 = i8; /* The type fiat_p448_loose_field_element is a field element with loose bounds. */ /* Bounds: [[0x0 ~> 0x30000000], [0x0 ~> 0x30000000], [0x0 ~> 0x300...
the_stack
use crate::helpers::{parse_block_hash, parse_chain_id, RpcServiceError, MAIN_CHAIN_ID}; use crate::result_option_to_json_response; use crate::server::{HasSingleValue, Params, Query, RpcServiceEnvironment}; use crate::services::{context, dev_services}; use crate::{empty, make_json_response, required_param, result_to_jso...
the_stack
use super::verify; use crate::{ cmd::{forge::build::CoreBuildArgs, Cmd, RetryArgs}, compile, opts::{forge::ContractInfo, EthereumOpts, WalletType}, utils::{get_http_provider, parse_ether_value, parse_u256}, }; use clap::{Parser, ValueHint}; use ethers::{ abi::{Abi, Constructor, Token}, prelude::...
the_stack
use std::net::{TcpListener, TcpStream}; use std::collections::HashMap; use std::io; use std::fmt::Debug; use serde; use amy::{Registrar, Notification, Event}; use errors::*; use msg::Msg; use envelope::Envelope; use node::Node; use timer_wheel::TimerWheel; use pid::Pid; use correlation_id::CorrelationId; use serialize:...
the_stack
use std::cell::{Cell, RefCell}; use std::rc::Rc; use std::fmt; use std::cmp::Ordering; use ast::{Loc, Node, Id}; use environment::Environment; use object::RubyObject; use typed_arena::Arena; use util::Or; use itertools::Itertools; use std::ops::Deref; use std::iter::{self, FromIterator}; use std::collections::HashMap; ...
the_stack
use crate::{ errors::*, outcome_array::OutcomeArray, scheduler::{Scheduler, SchedulerTask, TaskGuard, TxnIndex, Version}, task::{ExecutionStatus, ExecutorTask, Transaction, TransactionOutput}, txn_last_input_output::{ReadDescriptor, TxnLastInputOutput}, }; use anyhow::{bail, Result as AResult}; use ...
the_stack
use std::error::Error; use std::sync::{ atomic::{AtomicBool, Ordering}, mpsc, mpsc::RecvTimeoutError, Arc, Condvar, Mutex, }; use std::time::Duration; #[cfg(feature = "for_futures")] use super::common::shared_thread_pool; #[cfg(feature = "for_futures")] use crate::futures::task::SpawnExt; #[cfg(feature...
the_stack
use proc_macro2::{Ident, Span}; use std::{error::Error, fs, io::Write}; use syn; use inflector::Inflector; const COMMENT_PREFIX: &str = "= \" "; const COMMENT_SUFFIX: &str = "\""; const OPTION_PREFIX: &str = "Option < "; const OPTION_SUFFIX: &str = " >"; const VEC_PREFIX: &str = "Vec < "; const VEC_SUFFIX: &str = "...
the_stack
use std::future::{ready, Future}; use std::{fmt, num::NonZeroU16, rc::Rc}; use ntex::util::{ByteString, Bytes, Either, Ready}; use super::shared::{Ack, AckType, MqttShared}; use super::{codec, error::ProtocolError, error::SendPacketError}; pub struct MqttSink(Rc<MqttShared>); impl Clone for MqttSink { fn clone(...
the_stack
use primal_bit::BitVec; use std::{iter, cmp}; /// Stores information about primes up to some limit. /// /// This uses at least `limit / 16 + O(1)` bytes of storage. #[derive(Debug)] pub struct Primes { // This only stores odd numbers, since even numbers are mostly // non-prime. // // This indicates whi...
the_stack
use rand::{self, Rng}; use tetra::audio::Sound; use tetra::graphics::scaling::{ScalingMode, ScreenScaler}; use tetra::graphics::text::{Font, Text, VectorFontBuilder}; use tetra::graphics::{self, Color, DrawParams, Texture}; use tetra::input::{self, Key}; use tetra::math::Vec2; use tetra::window; use tetra::{Context, Co...
the_stack
use std::ops::Deref; use super::map::ToHex; use super::EventWriter; use crate::model::{BlockRecord, Era, EventData, TransactionRecord, TxInputRecord, TxOutputRecord}; use crate::{model::EventContext, Error}; use pallas::crypto::hash::Hash; use pallas::ledger::primitives::byron::MainBlock; use pallas::ledger::primitiv...
the_stack
use rustling::*; use rustling_ontology_values::dimension::*; use rustling_ontology_values::helpers; use rustling_ontology_moment::{Weekday, Grain}; pub fn rules_datetime(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> { // Basic b.rule_2("intersect", datetime_check!(|datetime: &DatetimeV...
the_stack
extern crate odbc; extern crate odbc_safe; use odbc::*; use odbc_safe::AutocommitOn; #[test] fn list_tables() { let env = create_environment_v3().unwrap(); let ds = env.connect("TestDataSource", "", "").unwrap(); // scope is required (for now) to close statement before disconnecting { let sta...
the_stack
use std::collections::{HashMap, HashSet}; use std::io::Write; use std::path::PathBuf; use comfy_table::{Attribute, Cell, CellAlignment, ContentArrangement, Table}; use serde::{Deserialize, Serialize}; use crate::config::Config; use crate::error::Fallacy; use crate::state::State; use crate::utils::{as_filename, make_u...
the_stack
use crate::libc::{self, c_double, clock_t}; use std::{ cell::Cell, panic, ptr::NonNull, rc::{Rc, Weak}, time::Duration }; use crate::wayland_sys::server::signal::wl_signal_add; use crate::wayland_sys::server::WAYLAND_SERVER_HANDLE; use wlroots_sys::{ timespec, wlr_subsurface, wlr_surface, wlr_s...
the_stack
use raylib::prelude::*; use std::ffi::CString; //------------------------------------------------------------------------------------ // Program main entry point //------------------------------------------------------------------------------------ pub fn run(rl: &mut RaylibHandle, thread: &RaylibThread) -> crate::Samp...
the_stack
use proc_macro2::{Span, TokenStream}; use quote::{quote, ToTokens}; use syn::parse::{Parse, ParseStream}; use syn::punctuated::Punctuated; use syn::token::{Comma, Fn}; use syn::{ parse_quote, parse_quote_spanned, visit_mut, Attribute, Block, FnArg, Generics, Ident, Item, ItemFn, LitStr, ReturnType, Type, Visibi...
the_stack
use crate::*; pub struct Facade { device: ash::Device, // Surface info. Changes with resolution. pub surface_caps: vk::SurfaceCapabilitiesKHR, pub surface_formats: Vec<vk::SurfaceFormatKHR>, // Swapchain pub num_frames: usize, pub swapchain_width: u32, pub swapchain_height: u32, pub...
the_stack
use crate::{ contour::{Contour, ContourData}, Error, Point, half::Half, hull::Hull, indexes::{PointIndex, PointVec, EdgeIndex, HullIndex, EMPTY_EDGE}, predicates::{acute, orient2d, in_circle, centroid, distance2, pseudo_angle}, }; #[derive(Debug)] enum Walk { Inside(EdgeIndex), Done(EdgeInd...
the_stack
use std::{panic, ptr}; use exonum::merkledb::{ access::AccessExt, generic::{ErasedAccess, GenericRawAccess}, indexes::{Entries, Keys, Values}, MapIndex, }; use jni::{ objects::{JClass, JObject, JString}, sys::{jboolean, jbyteArray, jobject}, JNIEnv, }; use crate::{ handle::{self, Handl...
the_stack
use std::cmp::Ordering; use std::collections::BinaryHeap; use smallvec::{smallvec, SmallVec}; use rle::{AppendRle, SplitableSpan}; use crate::list::{Frontier, OpLog, Time}; use crate::list::frontier::frontier_is_sorted; use crate::list::history::History; use crate::list::history_tools::Flag::{OnlyA, OnlyB, Shared}; us...
the_stack
//! Mint auditor GRPC service implementation. use crate::{Error, MintAuditorDb}; use grpcio::{RpcContext, RpcStatus, RpcStatusCode, Service, UnarySink}; use mc_common::logger::Logger; use mc_mint_auditor_api::{ empty::Empty, mint_auditor::{ Counters, GetBlockAuditDataRequest, GetBlockAuditDataResponse,...
the_stack
use core::slice; use std::{ffi::c_void, mem::MaybeUninit, ptr}; use com::{ interfaces::iunknown::IUnknown, sys::{FAILED, HRESULT, S_OK}, }; use widestring::U16CString; use crate::{ cil::MAX_LENGTH, ffi::*, profiler::types::{AssemblyMetaData, PublicKey, Version}, }; interfaces! { #[uuid("EE624...
the_stack
use mio::{Evented, Poll, PollOpt, Ready, Token}; use mio::unix::UnixReady; use std::collections::VecDeque; use std::io; use std::io::{Error, ErrorKind}; use stream_traits::{BufferableSender, StreamReceiver, BufStat, RawWriteStat, ReadStat, ShutStat, WriteStat}; use token_map::UniqTok; const MAX_WR...
the_stack
use argparse::SpecialMap; use error::{ErrorKind, Result, ResultExt}; use lookup::*; use shim::move_gcov_files; use utils::{CommandExt, clean_dir, set_executable}; use cov::IntoStringLossy; use serde_json::from_reader; use shell_escape::escape; use tempfile::TempDir; use std::borrow::Cow; use std::collections::HashMap...
the_stack
use crate::data_provider::OnDiskDataProvider; use crate::errors::*; use crate::geometry::{Aabb, Cube}; use crate::octree::{self, to_meta_proto, to_node_proto, ChildIndex, NodeId, OctreeMeta}; use crate::proto; use crate::read_write::{ attempt_increasing_rlimit_to_max, Encoding, NodeIterator, NodeWriter, OpenMode, P...
the_stack
use crate::css::{Color, Value, Stylesheet, RuleType}; use std::collections::HashMap; use std::path::Path; use std::fs::File; use url::Url; use crate::net::{relative_filepath_to_url, load_font_from_net}; use glium_glyph::GlyphBrush; use glium_glyph::glyph_brush::rusttype::{Font,Error}; use glium_glyph::glyph_brush::Font...
the_stack
use std::{fmt, iter::Iterator}; // An `Asterism` is a tree with an arbirary arity at each node, // but all leaves are at the same depth. // This structure arises from parsing under Kleene stars; each star correspons to a level of nodes. // [ ] <- 2 children // [ ...
the_stack
use std::{ffi::CString, mem::MaybeUninit}; use anyhow::{bail, Result}; use gl::types::*; use lazy_static::lazy_static; use serde_yaml::Value; lazy_static! { // slerpys golf coding stuff pub static ref R_NAME: CString = CString::new("R").unwrap(); pub static ref K_NAME: CString = CString::new("K").unwrap()...
the_stack
#![allow(bad_style)] // Needed for the errors, they are given in hex for some reason, but if // LONG is i32 they are negative (which presumably was the intention). #![allow(overflowing_literals)] use std::os::raw::{c_char, c_void}; #[cfg(not(target_os = "macos"))] use std::os::raw::{c_long, c_ulong}; #[cfg(not(target...
the_stack
use crate::astconv::{ AstConv, CreateSubstsForGenericArgsCtxt, ExplicitLateBound, GenericArgCountMismatch, GenericArgCountResult, IsMethodCall, PathSeg, }; use crate::check::callee::{self, DeferredCallResolution}; use crate::check::method::{self, MethodCallee, SelfSource}; use crate::check::{BreakableCtxt, Dive...
the_stack
//! Defines basic comparison kernels for [`PrimitiveArray`]s. //! //! These kernels can leverage SIMD if available on your system. Currently no runtime //! detection is provided, you should enable the specific SIMD intrinsics using //! `RUSTFLAGS="-C target-feature=+avx2"` for example. See the documentation //! [here...
the_stack
//! HAL interface to the TWIM peripheral. //! //! See product specification: //! //! - nRF52832: Section 33 //! - nRF52840: Section 6.31 use core::future::Future; use core::marker::PhantomData; use core::sync::atomic::{compiler_fence, Ordering::SeqCst}; use core::task::Poll; use embassy::interrupt::{Interrupt, Interrup...
the_stack
use { crate::util::MappedVmo, anyhow::{anyhow, Context, Error}, fidl::HandleBased, fidl_fuchsia_hardware_nand::Info as NandInfo, fidl_fuchsia_nand::{BrokerProxy, BrokerRequestData, BrokerRequestDataBytes}, fidl_fuchsia_nand_flashmap::{FlashmapRequest, FlashmapRequestStream}, fuchsia_syslog::...
the_stack
use na::{ DMatrix, DMatrixSlice, DMatrixSliceMut, Matrix2, Matrix2x3, Matrix2x4, Matrix2x6, Matrix3, Matrix3x2, Matrix3x4, Matrix4x2, Matrix6x2, MatrixSlice2, MatrixSlice2x3, MatrixSlice2xX, MatrixSlice3, MatrixSlice3x2, MatrixSliceMut2, MatrixSliceMut2x3, MatrixSliceMut2xX, MatrixSliceMut3, MatrixSlice...
the_stack
mod os; mod webdav; mod content_encoding; use base64; use std::path::Path; use percent_encoding; use walkdir::WalkDir; use std::borrow::Cow; use rfsapi::RawFileData; use std::{cmp, f64, str}; use std::time::SystemTime; use std::collections::HashMap; use time::{self, Duration, Tm}; use iron::{mime, Headers, Url}; use b...
the_stack
use lazy_static::lazy_static; use parking_lot::RwLock; use serde_json::Value; use std::ffi::CStr; use std::fs::{remove_file, File}; use std::io::prelude::*; use std::os::raw::c_char; use std::path::Path; use std::process::Command; /// Link import cgo function #[link(name = "opa")] extern "C" { pub fn makeDecisionG...
the_stack
use cqrs_core::{Aggregate, AggregateEvent, Event}; use serde::Serialize; use std::collections::{HashMap, HashSet}; use std::iter::FromIterator; use crate::interactions::{BodyAnalysisLocation, BodyAnalysisResult, InteractionDiffResult}; use crate::learn_shape::{TrailObservationsResult, TrailValues}; use crate::shapes::...
the_stack
use bitflags::bitflags; use crate::ffi::{ CONST_CS, CONST_DEPRECATED, CONST_NO_FILE_CACHE, CONST_PERSISTENT, IS_ARRAY, IS_CALLABLE, IS_CONSTANT_AST, IS_DOUBLE, IS_FALSE, IS_LONG, IS_MIXED, IS_NULL, IS_OBJECT, IS_PTR, IS_REFERENCE, IS_RESOURCE, IS_STRING, IS_TRUE, IS_TYPE_COLLECTABLE, IS_TYPE_REFCOUNTED, ...
the_stack
use crate::bytes_ext::{BytesExt, BytesMutExt, TryGetError}; use bytes::{Buf, BytesMut}; use feather_anvil::entity::ItemNbt; use feather_entity_metadata::{EntityMetadata, MetaEntry}; use feather_items::{Item, ItemStack}; use feather_util::BlockPosition; use feather_util::Direction; use num_traits::FromPrimitive; use ser...
the_stack
mutable_transmutes, non_camel_case_types, non_snake_case, non_upper_case_globals )] use crate::dpx_cff::Charsets; use crate::dpx_error::{Result, ERR}; use std::rc::Rc; use crate::bridge::DisplayExt; use std::ffi::CString; use crate::{info, warn, SkipBlank}; use super::dpx_dpxfile::dpx_tt_open; use super...
the_stack
use crossbeam_channel::{self, Receiver, Sender}; use std::collections::VecDeque; use std::env; use std::fs::File; use std::io::{self, BufWriter, Write}; /// True if logs are compiled in. pub(super) const LOG_ENABLED: bool = cfg!(any(rayon_rs_log, debug_assertions)); #[derive(Copy, Clone, PartialOrd, Ord, PartialEq, E...
the_stack
use std::collections::HashMap; use std::cell::RefCell; use itertools::diff_with; use symbols; use types::Value; /// A trait defining pattern matching rules for any given pattern of type `T`. trait PatternMatchingRules<'a, T> { /// Return true if the given pattern matches an arbitrary value. fn matches_any(pat...
the_stack
use crate::{Entity, GenerationalId, TreeExt}; use super::tree_iter::TreeIterator; #[derive(Debug, Clone, Copy)] pub enum TreeError { // The entity does not exist in the tree NoEntity, // Parent does not exist in the tree InvalidParent, // Sibling does not exist in the tree InvalidSibling, ...
the_stack
use bevy::{prelude::*, utils::HashSet}; use rand::{prelude::SliceRandom, Rng}; use std::{ env::VarError, io::{self, BufRead, BufReader}, process::Stdio, }; fn main() { App::new() .add_plugins(DefaultPlugins) .add_startup_system(setup_contributor_selection) .add_startup_system(se...
the_stack
use futures::channel::mpsc; use futures::lock::Mutex; use futures::StreamExt; use serde::Serialize; use std::collections::HashMap; use std::ops::DerefMut; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use std::time::{Duration, SystemTime}; use tokio::sync::{RwLock, RwLockReadGuard}; // convenience ...
the_stack
use std::ffi::CString; use crate::{coprocessor::RegionInfoProvider, Error, Result}; use engine_traits::{ CfName, SstPartitioner, SstPartitionerContext, SstPartitionerFactory, SstPartitionerRequest, SstPartitionerResult, CF_DEFAULT, CF_LOCK, CF_RAFT, CF_WRITE, }; use keys::data_end_key; use lazy_static::lazy_st...
the_stack
use block_modes::{block_padding::NoPadding, BlockMode, Cbc}; use futures::{sink, sync::mpsc, try_ready, Async, Future, Poll, Sink, Stream}; use std::slice::IterMut; use std::sync::{Arc, Mutex}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use tokio::{io, spawn}; use tokio_threadpool::blocking; use super::{encryp...
the_stack
pub const INVALID_VALUE: u8 = 255; #[rustfmt::skip] pub const STANDARD_ENCODE: &[u8; 64] = &[ 65, // input 0 (0x0) => 'A' (0x41) 66, // input 1 (0x1) => 'B' (0x42) 67, // input 2 (0x2) => 'C' (0x43) 68, // input 3 (0x3) => 'D' (0x44) 69, // input 4 (0x4) => 'E' (0x45) 70, // input 5 (0x5) => 'F'...
the_stack
#![allow(bad_style, dead_code, unused_variables)] use core::alloc::Layout; use core::ffi::VaList; use core::ptr; use cstr_core::CStr; use klogger::sprint; use libacpica::*; use log::{debug, error, info, trace}; use crate::alloc::alloc; use crate::kcb::Kcb; use crate::memory::vspace::MapAction; use super::kcb::{try_...
the_stack
use crate::array::*; use crate::bit_protocols::*; use crate::ieee::*; use crate::integer::*; use crate::local_functions::*; use crate::slice::*; use core::ops::{Add, Div, Mul, Neg, Sub}; use scale::alloc::*; use scale::*; /* This fixed point arithmetic * * It uses the global statistical security parameter kappa * F...
the_stack
/// Any type pub mod any; pub mod string; pub mod bytes; pub mod numbers; pub mod bool; pub mod geo; pub mod dec; pub mod ulid; pub mod uuid; pub mod option; pub mod date; use core::{fmt::{Debug}}; use alloc::prelude::v1::Box; use crate::{pointer::dec::NP_Dec, schema::{NP_Parsed_Schema, NP_Schema_Addr}}; // use crate...
the_stack
use libsecp256k1::*; use secp256k1_test::{ key, rand::thread_rng, Error as SecpError, Message as SecpMessage, Secp256k1, Signature as SecpSignature, }; #[cfg(feature = "hmac")] mod signatures { use crate::{recover, sign, verify, Message, PublicKey, SecretKey, SharedSecret, Signature}; use secp256k1_tes...
the_stack
use crate::css::{CssStyle, Selector}; use crate::html::{parse_html, HtmlNode}; use crate::util::{Atom, Edge, Id, IdTree, Node}; use std::borrow::Cow; use std::fmt; use std::num::NonZeroU32; use std::ops::{Index, IndexMut}; pub type NodeId = Id<DomNode>; #[repr(u32)] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub en...
the_stack
// For testing purposes, we want to generate valid `Ast`s, // but `ast!` is clunky and makes it *super* easy to leave off `Quote*` and `ExtendEnv` // and actually running the parser is a big dependency (and requires huge string literals). // so we introduce a `u!` macro that looks up forms but infers the internal st...
the_stack
//! Communications API for accessing Buttplug Servers pub mod client_event_loop; mod client_message_sorter; pub mod device; #[cfg(feature = "server")] use crate::server::ButtplugServer; use crate::{ connector::{ButtplugConnector, ButtplugConnectorError, ButtplugConnectorFuture}, core::{ errors::{ButtplugError,...
the_stack
use gloo_file::futures::{read_as_bytes, read_as_text}; use js_sys::TypeError; use roxmltree::Document; use std::{convert::TryInto, path::Path}; use svg2gcode::Settings; use wasm_bindgen::JsCast; use wasm_bindgen_futures::JsFuture; use web_sys::{window, FileList, HtmlElement, Response}; use yew::prelude::*; use yewdux::...
the_stack
use std::clone::Clone; use std::collections::HashMap; use std::default::Default; use std::path::Path; use chrono::{Datelike, Timelike}; use failure::ResultExt; use liquid::model::Value; use liquid::Object; use liquid::ValueView; use regex::Regex; use crate::cobalt_model; use crate::cobalt_model::files; use crate::cob...
the_stack
use std::cmp::max; use std::fmt::{Error, Formatter}; use bytes::buf::BufMutExt; use bytes::BytesMut; use std::cmp::min; use std::fmt::Write; use std::ops::Sub; use tokio::time::{Duration, Instant}; #[derive(Debug, Clone)] pub struct Sample { job_msg_cnt: usize, msg_count: u64, msg_bytes: u64, io_bytes...
the_stack
use core::{ mem, ptr, }; use funty::Integral; use tap::Pipe; use wyz::comu::{ Const, Mut, }; use crate::{ array::BitArray, devel as dvl, domain::{ Domain, PartialElement, }, mem::bits_of, order::{ BitOrder, Lsb0, Msb0, }, slice::BitSlice, store::BitStore, view::BitViewSized, }; #[cfg(feature =...
the_stack
use whitebox_raster::*; use whitebox_common::structures::Array2D; use crate::tools::*; use std::cmp::Ordering; use std::cmp::Ordering::Equal; use std::collections::{BinaryHeap, VecDeque}; use std::env; use std::f64; use std::io::{Error, ErrorKind}; use std::path; use std::sync::mpsc; use std::sync::Arc; use std::thread...
the_stack
use crate::{History, HistoryNavigationQuery}; use super::base::CommandLineSearch; use super::base::SearchDirection; use super::base::SearchFilter; use super::HistoryItem; use super::SearchQuery; use crate::Result; /// Interface of a stateful navigation via [`HistoryNavigationQuery`]. #[derive(Debug)] pub struct Histo...
the_stack
use { crate::colors::ColorScheme, carnelian::{ color::Color, drawing::{FontFace, GlyphMap, TextGrid, TextGridCell}, render::{BlendMode, Context as RenderContext, Fill, FillRule, Layer, Path, Raster, Style}, scene::{facets::Facet, LayerGroup}, Size, ViewAssistantContext, ...
the_stack
use crate::{ buffer::{CellBuffer, Contacts, Span}, fragment, fragment::Arc, fragment::Circle, Cell, Point, Settings, }; use lazy_static::lazy_static; use std::{collections::BTreeMap, collections::HashMap, iter::FromIterator}; #[derive(PartialEq, Debug, Clone, Copy)] /// edge cases of the circle art...
the_stack
compile_error!("Feature 1 and 2 are mutually exclusive and cannot be enabled together"); #[cfg(all(feature = "automata", feature = "finitestate"))] compile_error!("Feature 1 and 2 are mutually exclusive and cannot be enabled together"); #[cfg(all(feature = "finitestate", feature = "contextfree"))] compile_error!("Featu...
the_stack
use std::cell::RefCell; use std::path::PathBuf; use std::sync::Mutex; use jni_sys::{ self, jboolean, jclass, jdouble, jfloat, jint, jmethodID, JNIEnv, jobject, jobjectArray, jsize, jstring, }; use libc::c_char; use crate::{api_tweaks as tweaks, errors, jni_utils, utils}...
the_stack
use integer_encoding::VarInt; /// This is the max required bytes to encode a u64 using the varint encoding scheme. /// It is size 10=ceil(64/7) pub const MAX_ENCODED_SIZE: usize = 10; /// Encode a message, returning the bytes that must be sent before the message. /// A buffer is used to avoid heap allocation. pub fn ...
the_stack
use std::collections::HashMap; use bulletproofs::BulletproofGens; use curve25519_dalek::scalar::Scalar; use serde::{Deserialize, Serialize}; use serde_json::Value as JsonValue; use accounts::{Receiver, ReceiverWitness, XprvDerivation}; use keytree::Xprv; use musig::Multisignature; use blockchain::utreexo; use zkvm::...
the_stack
use std::{ collections::HashMap, fs::{self, File}, io::BufReader, path::Path, }; use error::{bail, ensure, report, Result, ResultExt}; use hash_engine::utils::OutputFormat; use regex::Regex; use serde::{de::DeserializeOwned, Deserialize}; use serde_json::Value; pub type AgentStates = Value; pub type G...
the_stack
use crate::error::{Error, ErrorKind}; use std::fmt; use std::str::{from_utf8, FromStr}; /// Since a status line or header can contain non-utf8 characters the /// backing store is a `Vec<u8>` #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct HeaderLine(Vec<u8>); impl From<String> for HeaderLine { fn from(s:...
the_stack
//! Serializable and deserializable protocol messages. // Nom has lots of unused warnings atm, keep this here for now. use std::io::{self, Write}; use protocol::PeerProtocol; use manager::ManagedMessage; use bytes::Bytes; use byteorder::{WriteBytesExt, BigEndian}; use nom::{IResult, be_u32, be_u8}; // TODO: Propog...
the_stack
use std::{io, iter, slice}; use crate::{ parse::{read, Options, Parser, Position, Result}, Cons, Value, }; /// Combines an S-expression value with location information. /// /// A `Datum` keeps, along with a plain `Value`, information about the text /// location the value was parsed from. For compound values, ...
the_stack
#![deny(warnings)] //! # Rust implementations of class groups and verifyable delay functions //! //! This repo includes three crates //! //! * `classgroup`, which includes a class group implementation, as well as a //! trait for class groups. //! * `vdf`, which includes a Verifyable Delay Function (VDF) trait, as wel...
the_stack