text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
//! Pickle serialization use std::io; use std::collections::BTreeSet; use serde::ser; use serde::ser::Serialize; use byteorder::{LittleEndian, BigEndian, WriteBytesExt}; use num_bigint::BigInt; use num_traits::Signed; use super::consts::*; use super::error::{Error, Result}; use super::value::{Value, HashableValue}; ...
the_stack
// We want to keep the names here #![allow(clippy::module_name_repetitions)] use std::collections::HashSet; use super::{ super::raw::{IdentRaw, ImutExprRaw, ScriptRaw}, ArgsExprs, CreationalWith, DefinitionalArgs, DefinitionalArgsWith, WithExprs, }; use super::{ error_generic, error_no_locals, BaseExpr, G...
the_stack
// GLSL is mostly a superset of C but it also removes some parts of it this is a list of relevant // aspects for this backend. // // The most notable change is the introduction of the version preprocessor directive that must // always be the first line of a glsl file and is written as // `#version number profile` // `n...
the_stack
use crate::debugloc::{DebugLoc, HasDebugLoc}; use crate::module::{Comdat, DLLStorageClass, Linkage, Visibility}; use crate::types::{TypeRef, Typed, Types}; use crate::{BasicBlock, ConstantRef, Name}; /// See [LLVM 12 docs on Functions](https://releases.llvm.org/13.0.0/docs/LangRef.html#functions) #[derive(PartialEq, C...
the_stack
//! # File sharing example //! //! Basic file sharing application with peers either providing or locating and //! getting files by name. //! //! While obviously showcasing how to build a basic file sharing application, //! the actual goal of this example is **to show how to integrate rust-libp2p //! into a larger appli...
the_stack
use std::char; use std::str::{self,FromStr}; use std::cmp::Ordering; use std::hash::{Hash,Hasher}; use std::collections::hash_map::DefaultHasher; #[allow(deprecated,unused)] use std::ascii::AsciiExt; use std::iter::FromIterator; extern crate encode_unicode; use encode_unicode::*; #[test] fn equal_defaults() { ass...
the_stack
use crate::graphics::{GraphicsDevice, GraphicsExt}; use crate::histogram::{HistogramKind, HistogramMap}; use crate::util::percent_of; use crate::zprocess::*; use futures::StreamExt; use heim::host; use heim::net; use heim::net::Address; use heim::units::frequency::megahertz; use heim::units::time; use std::collections...
the_stack
// This file was auto-generated from spec/tests/yaml/swiftnav/sbp/observation/test_msgEphemerisDepB.yaml by generate.py. Do not modify by hand! use crate::*; #[test] fn test_auto_check_sbp_observation_msg_ephemeris_dep_b() { { let mut payload = Cursor::new(vec![ 85, 70, 0, 195, 4, 176, 0, 0, 0...
the_stack
use crate::architecture::Endian; use crate::error::*; use crate::il; use crate::RC; use std::collections::HashMap; use crate::memory::backing; use crate::memory::value::Value; use crate::memory::MemoryPermissions; /// The size of the copy-on-write pages. pub const PAGE_SIZE: usize = 1024; pub const PAGE_MASK: u64 = !...
the_stack
use crate::bytecode_encoder::encode_v1::encode_symbol; use crate::compiler::instruction::{InstructionDebug, RawAstLocation}; use crate::compiler::{ self, BindRules, Symbol, SymbolTable, SymbolicInstruction, SymbolicInstructionInfo, }; use crate::debugger::device_specification::{DeviceSpecification, Property}; use c...
the_stack
use crate::app::ExternalMsg; use crate::app::HelpMenuLine; use crate::app::NodeFilter; use crate::app::NodeSorter; use crate::app::NodeSorterApplicable; use crate::ui::Border; use crate::ui::Constraint; use crate::ui::Layout; use crate::ui::Style; use indexmap::IndexSet; use serde::{Deserialize, Serialize}; use std::co...
the_stack
use slog::Logger; use specs; use specs::{Entities, LazyUpdate, Read, ReadStorage, Write, WriteStorage}; use crate::pk; use crate::pk::camera::DefaultCamera; use crate::pk::cell_dweller::{ActiveCellDweller, CellDweller}; use crate::pk::globe::Globe; use crate::pk::net::{ Destination, EntityIds, NetMarker, NetworkPe...
the_stack
#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u16)] // To facilitate use with transmute() in CommandReturn #[rustfmt::skip] pub enum ErrorCode { Fail = 1, Busy = 2, Already = 3, Off = 4, Reserve = 5, Invalid = 6, Size = 7, Cancel = 8, NoMem = 9, NoSupport = 10, NoDevic...
the_stack
use crate::{ArchivedDynMetadata, RegisteredImpl, IMPL_REGISTRY}; use bytecheck::CheckBytes; #[cfg(feature = "vtable_cache")] use core::sync::atomic::Ordering; use core::{ alloc::Layout, any::{Any, TypeId}, convert::Infallible, fmt, marker::PhantomData, ptr, }; use rkyv::{ from_archived, ...
the_stack
//! rutabaga_core: Cross-platform, Rust-based, Wayland and Vulkan centric GPU virtualization. use std::collections::BTreeMap as Map; use std::sync::Arc; use base::{ExternalMapping, SafeDescriptor}; use data_model::VolatileSlice; use crate::cross_domain::CrossDomain; #[cfg(feature = "gfxstream")] use crate::gfxstrea...
the_stack
use { crate::input_handler::InputHandler, crate::{consumer_controls, input_device}, anyhow::{Context, Error}, async_trait::async_trait, fidl_fuchsia_input_report as fidl_input_report, fidl_fuchsia_ui_input as fidl_ui_input, fidl_fuchsia_ui_policy as fidl_ui_policy, fuchsia_syslog::fx_log_err...
the_stack
use std::cell::UnsafeCell; use std::fs::File; use std::hint::spin_loop; use std::marker::{PhantomData, Sync}; use std::mem::size_of; use std::path::Path; use std::slice; use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering}; use anyhow::Result; use byte_slice_cast::{AsSliceOf, FromByteSlice}; use log::{info, warn}...
the_stack
use super::*; use crate::code::{self, Statement}; use syn::export::ToTokens; use syn::{self, Block, File, Item, Stmt}; /// Parses a line of input as a command. /// Returns either a `Command` value or an `InputError` value. pub fn parse_command(line: &str) -> InputResult { InputResult::Command( if line.star...
the_stack
use super::fp::FP; use super::ecp::ECP; use super::fp2::FP2; use super::ecp8::ECP8; use super::fp8::FP8; use super::fp16::FP16; use super::fp48; use super::fp48::FP48; use super::big::BIG; use super::ecp; use super::rom; use types::{SignOfX, SexticTwist}; #[allow(non_snake_case)] fn linedbl(A: &mut ECP8, qx: &FP, qy: ...
the_stack
use super::coincident_tokens::CoincidentTokenIndex; use super::token_conflicts::TokenConflictMap; use crate::generate::dedup::split_state_id_groups; use crate::generate::grammars::{LexicalGrammar, SyntaxGrammar}; use crate::generate::nfa::NfaCursor; use crate::generate::rules::{Symbol, TokenSet}; use crate::generate::t...
the_stack
use std::{ convert::{TryFrom as _, TryInto as _}, fmt, marker::PhantomData, }; use indexmap::IndexMap; use serde::{ de::{self, Deserializer, IntoDeserializer as _}, ser::{SerializeMap as _, Serializer}, serde_if_integer128, Deserialize, Serialize, }; use crate::{ ast::InputValue, execu...
the_stack
use crate::lang::errors::{error, CrushResult, CrushErrorType}; use crate::lang::execution_context::{CompileContext, JobContext}; use crate::lang::data::scope::Scope; use crate::lang::{argument::ArgumentDefinition, argument::ArgumentVecCompiler, value::Value}; use crate::lang::command::Command; use crate::lang::executio...
the_stack
use common::{Diagnostic, DiagnosticsResult, Location, NamedItem, WithLocation}; mod requireable_field; use super::FeatureFlags; use fnv::FnvHashMap; use graphql_ir::{ associated_data_impl, Directive, Field, FragmentDefinition, InlineFragment, LinkedField, OperationDefinition, Program, ScalarField, Selection, T...
the_stack
use std::ascii::AsciiExt; use valico::json_dsl; use std::collections; use jsonway::{self}; use json::{self, JsonValue, ToJson}; use framework::{self, Nesting}; use server::mime; use server::header; use server::method; #[allow(dead_code)] /// The transfer protocol for the operation. Values MUST be from the list: "http...
the_stack
use bitvec::prelude::*; use byteorder::{LittleEndian, WriteBytesExt}; use bytes::BufMut; use saturating::Saturating as S; use crate::{ io::ParseBuf, misc::raw::{int::*, RawConst, RawFlags}, proto::{MyDeserialize, MySerialize}, }; pub use self::{ anonymous_gtid_event::AnonymousGtidEvent, begin_load...
the_stack
use crate::{ account_config::{ AdminTransactionEvent, BaseUrlRotationEvent, BurnEvent, CancelBurnEvent, ComplianceKeyRotationEvent, CreateAccountEvent, MintEvent, NewBlockEvent, NewEpochEvent, PreburnEvent, ReceivedMintEvent, ReceivedPaymentEvent, SentPaymentEvent, ToXDXExchangeRateU...
the_stack
use crate::Context; use crate::Options; use crate::TextBuffer; use nalgebra::Point2; #[test] fn line_length() { let raw = "Hello world"; let buffer = TextBuffer::from_str(Options::default(), Context::default(), raw); assert_eq!(buffer.total_lines(), 1); assert_eq!(buffer.line_width(0), Some(11)...
the_stack
use anyhow::Result; use dprint_core::plugins::wasm::{self}; use crate::environment::Environment; use crate::plugins::read_info_file; pub fn get_init_config_file_text(environment: &impl Environment) -> Result<String> { let info = match read_info_file(environment) { Ok(info) => { // ok to only check wasm he...
the_stack
use std::io; use tezos_messages::p2p::binary_message::CONTENT_LENGTH_FIELD_BYTES; use crate::paused_loops::{PausedLoop, PausedLoopsAddAction}; use crate::service::{MioService, Service}; use crate::{Action, ActionWithMeta, Store}; use super::binary_message::read::PeerBinaryMessageReadState; use super::binary_message::...
the_stack
extern crate rand; extern crate timely; extern crate differential_dataflow; use std::time::Instant; use rand::{Rng, SeedableRng, StdRng}; use timely::dataflow::*; use differential_dataflow::input::Input; use differential_dataflow::Collection; use differential_dataflow::operators::*; use differential_dataflow::opera...
the_stack
use audio::Audio; #[cfg(feature = "3d-audio")] use audio::{Ambisonic, AmbisonicBuilder}; use imgui::Ui; use input::Input; use renderer::{Draw, Renderer}; #[cfg(feature = "nphysics")] use types::PhysicsType; use types::{Camera, RenderItem, TextItem}; #[cfg(feature = "nphysics")] use nalgebra::Translation3; #[cfg(featur...
the_stack
use std::collections::HashMap; use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, Mutex, }; use std::thread; use super::common::{generate_id, UniqueId}; use super::sync::{BlockingQueue, Queue}; /** `Actor` defines concepts of `Actor`: Send/Receive Messages, States, Methods. # Arguments * `Msg` - The gene...
the_stack
//! Keywords =========================================================== // https://doc.rust-lang.org/std/index.html#keywords // https://doc.rust-lang.org/reference/keywords.html as async await break const continue crate dyn else enum extern fn for if impl in let loop match mod move mut pub ref return static struct tr...
the_stack
mod test { use crate::RoaringBitmap; use proptest::prelude::*; // // Tests algebraic set properties in terms of RoaringBitmaps. // Follows wikipedia article regarding ordering and heading // // https://en.wikipedia.org/wiki/Algebra_of_sets // // Notes: // // * Although a un...
the_stack
use super::patch::{eq, nl}; use failure::{Error, Fail}; use pest::iterators::Pair; use pest::Parser; use pest_derive::Parser; use proc_macro2::Literal; use proc_macro2::TokenStream; use quote::quote; use proc_macro2::{Ident, Span}; pub fn ident_from_str(s: &str) -> Ident { syn::Ident::new(s, Span::call_site()) } ...
the_stack
use crate::prelude::*; use alloc::vec::Vec; use core::alloc::Allocator; use fallible_collections::vec::FallibleVec; use kpi::process::{FrameId, ProcessInfo}; use kpi::MemType; use node_replication::Dispatch; use crate::arch::process::PROCESS_TABLE; use crate::arch::Module; use crate::error::KError; use crate::memory...
the_stack
// Coding conventions #![recursion_limit = "256"] #![deny(dead_code, missing_docs, warnings)] //! Library implementing LNPBP-14 standard: Bech32 encoding for //! client-side-validated data. //! //! Types that need to have `data1...` and `z1...` bech 32 implementation //! according to LNPBP-14 must implement [`ToBech32...
the_stack
use crate::api::{NiDkgCspClient, NodePublicKeyData}; use crate::secret_key_store::SecretKeyStore; use crate::types::conversions::key_id_from_csp_pub_coeffs; use crate::types::{CspPublicCoefficients, CspSecretKey}; use crate::Csp; use ic_crypto_internal_threshold_sig_bls12381::api::ni_dkg_errors; use ic_crypto_internal_...
the_stack
use cranelift_codegen_meta as meta; use std::env; use std::io::Read; use std::process; use std::time::Instant; fn main() { let start_time = Instant::now(); let out_dir = env::var("OUT_DIR").expect("The OUT_DIR environment variable must be set"); let target_triple = env::var("TARGET").expect("The TARGET e...
the_stack
use super::{Change, Input, Operation, Output}; use cardano::{ address::ExtendedAddr, tx::{TxInWitness, TxOut, TxWitness, TxoPointer}, }; use cardano::{ fee::LinearFee, txbuild::{self, TxBuilder, TxFinalized}, txutils::OutputPolicy, }; use std::{error, fmt}; #[derive(Debug)] pub enum Error { ///...
the_stack
//! Key management for [Exonum] nodes. //! //! This crate provides tools for storing and loading encrypted keys for a node. //! //! [Exonum]: https://exonum.com/ //! //! # Examples //! //! ``` //! use exonum_keys::{generate_keys, read_keys_from_file}; //! use tempfile::TempDir; //! //! # fn main() -> anyhow::Result<()>...
the_stack
use k210_hal::pac; #[derive(Copy, Clone)] pub enum function { JTAG_TCLK = 0, /* JTAG Test Clock */ JTAG_TDI = 1, /* JTAG Test Data In */ JTAG_TMS = 2, /* JTAG Test Mode Select */ JTAG_TDO = 3, /* JTAG Test Data Out */ SPI0_D0 = 4, /* SPI0 Data 0 */ SPI0_D...
the_stack
use { anyhow::{format_err, Error}, argh::FromArgs, fidl_fuchsia_bluetooth_bredr as bredr, fuchsia_zircon as zx, serde::{self, Deserialize}, std::{collections::HashSet, fs::File, io::Read}, thiserror::Error, }; use crate::sources::AudioSourceType; pub const DEFAULT_CONFIG_FILE_PATH: &str = "/co...
the_stack
use std::os::raw::*; use super::xlib::{Display, Region, Visual, XRectangle}; use super::xrender::{XGlyphInfo, XRenderColor}; // // external types // // freetype pub enum FT_FaceRec {} pub type FT_UInt = c_uint; // fontconfig pub type FcChar32 = c_uint; pub enum FcCharSet {} pub enum FcPattern {} #[repr(C)] pub enu...
the_stack
#![no_std] #![feature(panic_info_message, asm, allocator_api, alloc_error_handler, alloc_prelude, const_raw_ptr_to_usize_cast)] #[macro_use] extern crate alloc; // This is experimental and requires alloc_prelude as a feature use alloc::prelude::v1::*; // ////////...
the_stack
use std::sync::Arc; use bitvec::prelude::BitVec; use smallvec::smallvec; use super::super::{ColumnIteratorImpl, ColumnSeekPosition, SecondaryIteratorImpl}; use super::DiskRowset; use crate::array::{Array, ArrayImpl}; use crate::binder::BoundExpr; use crate::storage::secondary::DeleteVector; use crate::storage::{Packe...
the_stack
use im::HashMap; use moniker::{Binder, FreeVar}; use num_bigint::BigInt; use num_traits::ToPrimitive; use std::fmt; use std::rc::Rc; use crate::semantics::InternalError; use crate::syntax::core::{self, Literal, RcTerm, RcType, RcValue, Term, Value}; use crate::syntax::translation::ResugarEnv; use crate::syntax::{Float...
the_stack
use astro_lexer::Token; use std::{collections::HashMap, fmt::Debug}; use crate::{errors::ParserError, kinds::ErrorKind, macros, utils::get_func_addr}; /************************* CACHE DATA *************************/ /// TODO: Use hash-brown crate for hash maps. /// This keeps the parser data for reuse. #[derive(Debu...
the_stack
use crate::*; use core::sync::atomic::AtomicU64; use core::sync::atomic::Ordering; /// An `AtomicDuration` is an atomic equivalent of [`Instant`]. /// /// # Examples /// /// ``` /// use rustcommon_time::{AtomicInstant, Duration}; /// use core::sync::atomic::Ordering; /// /// let now = AtomicInstant::now(); /// std::t...
the_stack
extern crate cargo; extern crate filebuffer; extern crate quote; extern crate syn; #[macro_use] extern crate lazy_static; extern crate regex; #[macro_use] extern crate serde_json; #[macro_use] extern crate serde_derive; extern crate ini; use cargo::core::resolver::Resolve; use cargo::core::Package; use cargo::core::Wo...
the_stack
use std::mem; use std::ops::DerefMut; use std::path::Path; use std::sync::Mutex; use diesel::prelude::*; use rocket::request::{Form, FromForm}; use rocket::response::{status::NotFound, Flash, NamedFile, Redirect}; use rocket::{Request, State}; use rocket_contrib::serve::StaticFiles; use rocket_contrib::templates::Te...
the_stack
use std::fmt; use chumsky::{prelude::*, Stream}; use crate::ast::{Aggregate, Clause, Fact, Import, Literal, Program, Rule, Value}; /// A range of character positions in a parser input. pub type Span = std::ops::Range<usize>; /// A token emitted from the initial lexical analysis phase. #[derive(Clone, Debug, Partial...
the_stack
use crate::error::Error; use crate::transaction::{Base64, DeepHashItem, Tag, ToItems}; use avro_rs::Schema; use bytes::BufMut; use serde::{Deserialize, Serialize}; use std::io::Write; /// Returns [`avro_rs::Schema`] for [`DataItem`] [`Tag`]s. pub fn get_tags_schema() -> Schema { let schema = r#" { ...
the_stack
use fxhash::{FxHashMap, FxHashSet}; use std::collections::hash_map::Entry; use std::sync::Arc; use tracing::*; use crate::cluster::topology::{KeyspaceMetadata, Node, NodeState}; use crate::cluster::{ClusterMetadata, ConnectionManager, NodeInfo}; use crate::load_balancing::NodeDistanceEvaluator; use crate::transport::C...
the_stack
use std::fmt; use std::collections::hash_map::Entry; use std::collections::{HashMap}; use std::io::Cursor; use std::net::SocketAddr; use std::ops::Deref; use std::sync::{Arc, Weak}; use std::time::Duration; use futures::{self, Future as FutureTrait}; use futures::future::{Shared}; use futures::sync::oneshot::{channel,...
the_stack
use fantoch::hash_map::{Entry, HashMap}; use fantoch::id::ProcessId; use fantoch::HashSet; type Ballot = u64; type Slot = u64; // The first component is the ballot in which the value (the second component) // was accepted. type Accepted<V> = (Ballot, V); type AcceptedSlots<V> = HashMap<Slot, Accepted<V>>; type Accept...
the_stack
use crate::feynman_state::memoization::FeynmanMemory; use crate::iterators::{ par_sum_from_iterator, precision_get_index, precision_num_indices, sum_for_op_cols, PrecisionUnitaryOp, }; use crate::measurement_ops::{measure_prob_fn, MeasuredCondition}; use crate::pipeline::{InitialState, Representation}; use crat...
the_stack
pub mod dosstring; use crate::dosstring::DosString; use serde_derive::{Serialize, Deserialize}; use num_derive::FromPrimitive; #[allow(unused_imports)] use num::FromPrimitive; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; // See: http://www.shikadi.net/moddingwiki/ZZT_Format #[derive(Debug, Clone, Par...
the_stack
use minidump::Module; use std::collections::HashMap; pub use symbols_shim::*; pub trait SymbolProvider { fn fill_symbol( &self, module: &dyn Module, frame: &mut dyn FrameSymbolizer, ) -> Result<(), FillSymbolError>; fn walk_frame(&self, module: &dyn Module, walker: &mut dyn FrameWal...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![rustfmt::skip] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allo...
the_stack
//! Winternitz One Time Signature scheme. //! https://eprint.iacr.org/2011/191.pdf. extern crate alloc; use crate::{ hashes::ternary::{Sponge, HASH_LENGTH}, keys::ternary::wots::WotsSecurityLevel, signatures::ternary::{ PrivateKey, PublicKey, RecoverableSignature, Signature, MESSAGE_FRAGMENT_LENGT...
the_stack
pub mod json; pub mod prometheus; pub mod qemu; pub mod riemann; pub mod stdout; pub mod utils; pub mod warpten; use crate::sensors::{utils::current_system_time_since_epoch, RecordGenerator, Topology}; use chrono::Utc; use clap::ArgMatches; use docker_sync::{container::Container, Docker}; use k8s_sync::kubernetes::Kube...
the_stack
use std::prelude::v1::{Box, Vec}; use std::vec::IntoIter; use super::H256; use blake3::Hash; use parity_scale_codec::{Decode, Encode, EncodeLike, Error, Input, Output}; /// Hash of leaf node with empty slice `hash_leaf(&[])` const EMPTY_HASH: H256 = [ 45, 58, 222, 223, 241, 27, 97, 241, 76, 136, 110, 53, 175, 160...
the_stack
#![allow(bare_trait_objects)] use crate::transaction::PaymentTransaction; use crate::view_changes::*; use crate::*; use failure::{Error, Fail}; use stegos_crypto::bulletproofs::BulletProof; use stegos_crypto::hash::Hash; use stegos_crypto::pbc; use stegos_crypto::scc::{Fr, Pt, PublicKey, SchnorrSig}; use stegos_serial...
the_stack
use crate::{ counter::Counter, random, recovery::{ bandwidth, bandwidth::Bandwidth, bbr::probe_bw::CyclePhase, CongestionController, RttEstimator, }, time::Timestamp, }; use core::{ cmp::{max, min}, convert::TryInto, }; use num_rational::Ratio; use num_traits::One; mod conge...
the_stack
use std::mem::size_of; use uni_gl::*; use super::ShaderProgram; use engine::asset::{Asset, AssetResult, AssetSystem, FileFuture, LoadableAsset, Resource}; use engine::core::Aabb; use engine::render::mesh::MeshBound; use engine::render::shader_program::ShaderAttrib; use math::*; use std::cell::Cell; use std...
the_stack
use std::collections::BTreeMap; use std::{cmp, str}; use std::convert::{TryFrom}; use std::fmt::Write; use std::io::prelude::*; use std::io::SeekFrom; use std::io; use syscall::{ Error, EACCES, EBADF, EINVAL, EISDIR, ENOENT, EOVERFLOW, Result, Io, SchemeBlockMut, Stat, MODE_DIR, MODE_FILE, O_DIRECTORY, O_S...
the_stack
use std::convert::Infallible; use std::sync::Arc; use arc_swap::ArcSwap; use hyper::server::Builder; use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Request, Response}; use log::{debug, trace}; use serde::{Deserialize, Serialize}; use spirit::fragment::driver::SilentOnceDriver; use spirit::prelude...
the_stack
use dprint_cli_core::types::ErrBox; use super::helpers; use super::manifest::get_manifest_file_path; use super::setup::get_plugin_file; use super::setup::get_shim_paths; use super::setup::setup_plugin; use super::setup::PluginFile; use super::BinaryIdentifier; use super::BinaryManifestItem; use super::GlobalBinaryLoca...
the_stack
use super::{PaginationRequest, PaginationResponse}; use crate::chain::manager::SenseiChainManager; use crate::database::SenseiDatabase; use crate::error::Error as SenseiError; use crate::events::SenseiEvent; use crate::network_graph::SenseiNetworkGraph; use crate::{config::SenseiConfig, hex_utils, node::LightningNode, ...
the_stack
use super::api::frame::*; use super::api::*; use super::def::*; use super::df::*; use super::ipred::*; use super::itdq::*; use super::mc::*; use super::picman::*; use super::recon::*; use super::tbl::*; use super::tracer::*; use super::util::*; use std::cell::RefCell; use std::rc::Rc; mod bsr; mod eco; mod sbac; use...
the_stack
use crate::docker::DockerError::CredentialsError; use futures::stream::StreamExt; use log::{debug, error, info}; use serde_json::value::Value; use shiplift::RegistryAuth; use shiplift::{BuildOptions, Docker, PullOptions}; use std::env; use std::fs::File; use std::io::Write; use std::path::Path; use tempfile::NamedTempF...
the_stack
use serde::Serialize; use std::{borrow::Cow, collections::HashMap}; use validator::{ validate_length, Validate, ValidationError, ValidationErrors, ValidationErrorsKind, }; #[derive(Debug, Validate)] struct Root<'a> { #[validate(length(min = 1))] value: String, #[validate] a: &'a A, } #[derive(Deb...
the_stack
use crate::{ pollers::{ gateway::{RetryConfig, ServerGatewayApis}, Result, RETRYABLE_ERROR_CODES, }, protosext::WorkflowTaskCompletion, task_token::TaskToken, }; use backoff::{backoff::Backoff, ExponentialBackoff}; use futures_retry::{ErrorHandler, FutureRetry, RetryPolicy}; use std::{fm...
the_stack
use syn::{spanned::Spanned, FnArg, ImplItem, ItemImpl, Pat, PatIdent, Signature, Type}; use proc_macro2::TokenStream as TokenStream2; use quote::{quote, ToTokens}; use std::boxed::Box; #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] pub enum RpcMode { Disabled, Remote, RemoteSync, Master...
the_stack
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] use std::any::Any; use std::collections::VecDeque; use std::fmt; use std::io::{self, Read, Seek, SeekFrom, Write}; use std::mem; use std::panic; use std::pin::Pin; use std::slice; use std::sync::atomic::{self, AtomicBool, AtomicUsize, Ordering}; u...
the_stack
use std::collections::HashMap; use std::convert::TryFrom; use std::num::NonZeroU16; use std::ops::DerefMut; use std::sync::{Arc, Once}; use anyhow::{format_err, Context as _, Error}; use fidl::encoding::Decodable; use fidl_fuchsia_net as fidl_net; use fidl_fuchsia_net_icmp as fidl_icmp; use fidl_fuchsia_net_stack::{se...
the_stack
// This file was auto-generated from spec/tests/yaml/swiftnav/sbp/observation/test_MsgObs.yaml by generate.py. Do not modify by hand! use crate::*; #[test] fn test_auto_check_sbp_observation_msg_obs() { { let mut payload = Cursor::new(vec![ 85, 74, 0, 129, 240, 249, 152, 202, 226, 25, 0, 0, 0,...
the_stack
use serde; use bincode; use crate::ipc; use libc::intptr_t; use std::cell::{Cell, RefCell}; use std::cmp::PartialEq; use std::default::Default; use std::env; use std::error::Error as StdError; use std::ffi::CString; use std::fmt; use std::io; use std::marker::{Send, Sync, PhantomData}; use std::mem; use std::ops::{Der...
the_stack
use std::sync::Arc; use std::time::{Duration, Instant}; use slog::{debug, error, info, warn, Logger}; use tezedge_actor_system::actors::*; use crypto::hash::BlockHash; use monitoring::{Monitor, WebsocketHandler}; use networking::network_channel::NetworkChannel; use rpc::RpcServer; use shell::chain_feeder::ApplyBlock;...
the_stack
extern crate alloc; use crate::alloc::string::ToString; use alloc::rc::Rc; use alloc::string::String; use core::cell::RefCell; use browser_rs::renderer::dom::*; use browser_rs::renderer::html_token::*; use liumlib::*; fn print_node(node: Option<Rc<RefCell<Node>>>, depth: usize) { match node { Some(n) => ...
the_stack
use crate::gles2::reflection::{UniformIndex, UniformReflectionData}; use crate::gles2::{ProgramId, RafxDeviceContextGles2, RafxSamplerGles2}; use crate::{ RafxDescriptorIndex, RafxPipelineType, RafxResourceType, RafxResult, RafxRootSignatureDef, MAX_DESCRIPTOR_SET_LAYOUTS, }; use fnv::FnvHashMap; use std::ffi::...
the_stack
use gettextrs::gettext; use gst::{tags, StreamType, Tag, TagList, TagMergeMode}; use lazy_static::lazy_static; use log::warn; use std::{ collections::{HashMap, HashSet}, path::{Path, PathBuf}, sync::Arc, }; use super::{Duration, Format, MediaContent}; pub fn default_chapter_title() -> String { gettex...
the_stack
use crate::{cache::Vitals, check::items::Items, config::AppCfg, mgmt::management::NodeMode}; use anyhow::Error; use cli::diem_client::DiemClient; use diem_config::config::{NodeConfig, RocksdbConfig}; use diemdb::DiemDB; use std::path::PathBuf; use std::{process::Command, str}; use sysinfo::SystemExt; use sysinfo::{Proc...
the_stack
extern crate rustfft; extern crate test; use paste::paste; use rustfft::num_complex::Complex; use rustfft::num_traits::Zero; use rustfft::Fft; use std::sync::Arc; use test::Bencher; // Make fft using planner fn bench_planned_32(b: &mut Bencher, len: usize) { let mut planner = rustfft::FftPlannerSse::new().unwrap(...
the_stack
use core::ops::RangeInclusive; /// Mapping from characters to glyph indices. pub trait GlyphMapping { /// Maps a character to a glyph index. /// /// If `c` isn't included in the font the index of a suitable replacement glyph is returned. fn index(&self, c: char) -> usize; } impl<F> GlyphMapping for F ...
the_stack
use futures::future::BoxFuture; use futures::FutureExt; use futures::TryFutureExt; use moka::sync::Cache; use std::hash::Hash; use std::marker::PhantomData; use std::sync::Arc; use std::task::Poll; use tokio::sync::RwLock; use tower::{BoxError, Layer, Service}; type Sentinel<Value> = Arc<RwLock<Option<Value>>>; /// [...
the_stack
use { anyhow::{Context, Result}, fuchsia_syslog::fx_log_err, intl_model as model, libc, rust_icu_common as ucommon, rust_icu_sys as usys, rust_icu_uloc as uloc, std::collections::BTreeMap, std::convert::From, std::convert::TryFrom, std::ffi, std::fs, std::io, std::mem, st...
the_stack
use spirv_std::glam::{const_vec4, vec2, vec4, Vec2, Vec3, Vec4}; // Note: This cfg is incorrect on its surface, it really should be "are we compiling with std", but // we tie #[no_std] above to the same condition, so it's fine. #[cfg(target_arch = "spirv")] use {shared::*, spirv_std::num_traits::Float}; pub struct In...
the_stack
use ines::Ines; use mos6502_assembler::{Addr, Block, LabelRelativeOffset, LabelRelativeOffsetOwned}; use mos6502_model::{interrupt_vector, Address}; pub const PRG_START: Address = 0xC000; pub const INTERRUPT_VECTOR_START_PC_OFFSET: Address = interrupt_vector::START_LO - PRG_START; pub const INTERRUPT_VECTOR_NMI_OFFSET...
the_stack
use std::vec::IntoIter; use anyhow::{Context, Result}; use stark_hash::StarkHash; use web3::types::U256; use crate::{ core::{ClassHash, ContractAddress, StorageAddress, StorageValue}, ethereum::state_update::{ContractUpdate, DeployedContract, StateUpdate, StorageUpdate}, }; /// Utility to parse StarkNet memo...
the_stack
#[allow(missing_docs)] // documentation missing in model #[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct RegisterScalableTargetOutput {} impl std::fmt::Debug for RegisterScalableTargetOutput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut formatt...
the_stack
use serde_json::Value; use valico::json_dsl; use valico::json_dsl::errors; use valico::json_schema; use valico::json_schema::errors as schema_errors; use self::helpers::{ assert_error, assert_error_with_scope, assert_str_eq, assert_str_eq_with_scope, }; mod helpers; #[test] fn is_process_empty_builder() { le...
the_stack
use std::collections::BTreeMap; use url::form_urlencoded; pub use crate::env_info::*; const GA_PROPERTY_KEY: &str = "tid"; const GA_CLIENT_KEY: &str = "cid"; // TODO(fxb/71579): match zxdb by changing category and action for analytics commands // const GA_EVENT_CATEGORY_ANALYTICS: &str = "analytics"; // const GA_EV...
the_stack
use crate::hlist::*; use crate::indices::*; use ::std::fmt; use ::std::marker::PhantomData; /// A trait that converts from a type to a labelled generic representation. /// /// `LabelledGeneric`s allow us to have completely type-safe, /// boilerplate free conversions between different structs. /// /// For the most part...
the_stack
#[allow(unused_imports)] use crate::{ app::LdtkEntity, components::{GridCoords, IntGridCell}, }; use crate::ldtk::*; use bevy::prelude::*; use bevy_ecs_tilemap::prelude::*; use std::{collections::HashMap, hash::Hash}; /// The `int_grid_csv` field of a [LayerInstance] is a 1-dimensional [Vec<i32>]. /// This f...
the_stack
mod add_env; pub(crate) mod sync; use crate::{def::*, send_err, send_ok, CFG, PROXY, SOCK_MID}; use add_env::add_env; use async_std::{net::SocketAddr, task}; use lazy_static::lazy_static; use myutil::{err::*, *}; use nix::sys::socket::SockAddr; use parking_lot::RwLock; use serde::Deserialize; use serde::Serialize; use...
the_stack
// https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial...
the_stack
use super::heartbeat_rpc::*; use super::raft::*; use super::*; use crate::membership::client::Member as ClientMember; use crate::raft::state_machine::callback::server::{notify as cb_notify, SMCallback}; use crate::raft::state_machine::StateMachineCtl; use crate::raft::{LogEntry, RaftMsg, RaftService, Service as raft_sv...
the_stack
use super::{ModSum, ModSumBuilder}; use crate::checksum::CheckReverserError; use crate::endian::{bytes_to_int, wordspec_combos, WordSpec}; use crate::factor::{divisors_range, gcd}; use crate::utils::unresult_iter; use std::iter::Iterator; /// Find the parameters of a modsum algorithm. /// /// `spec` contains the known ...
the_stack