text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use {
crate::{
error::Error,
extent::Extent,
format::ExtentClusterHeader,
options::ExtractorOptions,
properties::{DataKind, ExtentKind},
utils::{RangeOps, ReadAndSeek},
},
interval_tree::interval_tree::IntervalTree,
std::io::{Read, Write},
};
/// Returns ... | the_stack |
use crate::bba::bbafile::*;
use crate::bba::idstring::*;
use crate::bels::*;
use std::convert::TryInto;
use std::io::Result;
pub struct BBAStructs<'a> {
pub out: &'a mut BBAWriter<'a>,
}
// *MUST* update this here and in nextpnr whenever making changes
pub const BBA_VERSION: u32 = 11;
// Wire flags
pub const WI... | the_stack |
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateTableStorageOptimizerOutput {
/// <p>A response indicating the success of failure of the operation.</p>
pub result: std::option::Option<std::string::String>,
}
impl Updat... | the_stack |
use crate::{
draw_target::{DrawTarget, DrawTargetExt},
geometry::{Dimensions, Point, Size},
pixelcolor::PixelColor,
primitives::{
common::{Scanline, StrokeOffset, ThickSegmentIter},
polyline::{self, scanline_iterator::ScanlineIterator, Polyline},
styled::{StyledDimensions, Styled... | the_stack |
use super::address;
use super::compression;
use super::htree;
use super::oplog;
use super::protocol::*;
use super::repository;
use super::xid::*;
use std::convert::TryInto;
pub struct ServerConfig {
pub repo_path: std::path::PathBuf,
pub allow_init: bool,
pub allow_gc: bool,
pub allow_get: bool,
pu... | the_stack |
use std::collections::{BTreeMap, HashMap, VecDeque};
use std::convert::TryFrom;
use std::path::PathBuf;
use std::sync::Arc;
use snafu::ResultExt;
use libeir_diagnostics::*;
use libeir_util_parse::{ErrorReceiver, ErrorReceiverTee, Source};
use crate::evaluator;
use crate::lexer::Lexer;
use crate::lexer::{symbols, Del... | the_stack |
use std::collections::HashMap;
use proc_macro2::{Ident, Span};
use quote::quote_spanned;
use syn::parse::{Parse, ParseStream};
use syn::parse_quote;
use syn::punctuated::Punctuated;
use syn::spanned::Spanned;
use syn::token;
use syn::AttributeArgs;
use syn::{Error, Result};
use syn::{Expr, ExprLit};
use syn::{Lit, L... | the_stack |
use proc_macro2::{Ident, Span, TokenStream};
use quote::quote;
use serde::Deserialize;
use serde_tokenstream::from_tokenstream;
use std::fmt::Formatter;
use std::sync::atomic::{AtomicBool, Ordering};
use syn::Error;
use syn::{spanned::Spanned, FnArg, ItemFn, Pat, PatIdent, PatType, ReturnType, Signature, Type};
#[deri... | the_stack |
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
mod panic_message;
... | the_stack |
use clap::ArgMatches;
use config::Config;
use printer::Printer;
use device::Device;
use std::process::Command;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::env;
use tempfile;
use Result;
use blackmagic::blackmagic_scan;
pub fn debugger(debugger_type: &str) -> Option<Box<Control>> {
match debugge... | the_stack |
use crate::info::info_table;
use info::print_graph;
use prettytable::{cell, row, Table};
use protobuf::{self, Message};
use std::collections::HashMap;
use structopt::StructOpt;
use wonnx::onnx::ModelProto;
use wonnx::utils::{OutputTensor, Shape};
use wonnx_preprocessing::text::{get_lines, EncodedText};
use wonnx_prepro... | the_stack |
#[cfg(feature = "direct")]
use std::fs::read_to_string;
use std::fs::{read, write, File, OpenOptions};
use std::os::unix::fs::FileExt;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use std::thread;
use anyhow::{anyhow, bail, Context, Result};
#[cfg(feature = "direct")]
use base::warn;
use base::{error, Tube};
us... | the_stack |
// Copyright (C) 2020-2021 Bit.Country.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless... | the_stack |
use crate::{
data_notification::{
DataClientRequest, DataPayload, EpochEndingLedgerInfosRequest, PendingClientResponse,
},
data_stream::{DataStream, DataStreamListener},
streaming_client::{GetAllEpochEndingLedgerInfosRequest, StreamRequest},
tests::utils::{
create_epoch_ending_client... | the_stack |
mod prelude;
// This module contains the definition of `ToPool`.
mod pool;
// This module contains the common read-write (+serde) utilities.
pub mod rw;
// This module contains the definition of `ChannelSender` and `ChannelReceiver`.
pub mod chan;
// This module contains the implementaion on client-side and server-... | the_stack |
use std::{thread, time::Duration};
use kvproto::{
disk_usage::DiskUsage,
kvrpcpb::{DiskFullOpt, Op},
metapb::Region,
raft_cmdpb::*,
};
use raft::eraftpb::MessageType;
use raftstore::store::msg::*;
use test_raftstore::*;
use tikv_util::{config::ReadableDuration, time::Instant};
fn assert_disk_full(resp... | the_stack |
use crate::cassandra::data_type::ConstDataType;
use crate::cassandra::error::*;
use crate::cassandra::inet::Inet;
use crate::cassandra::iterator::MapIterator;
use crate::cassandra::iterator::SetIterator;
use crate::cassandra::iterator::UserTypeIterator;
use crate::cassandra::util::Protected;
use crate::cassandra::uuid:... | the_stack |
use indexmap::IndexMap;
use crate::transflow::element_define::{ElementDefine, EventListener};
use crate::transflow::flow::{Flow, Mapping};
use crate::transflow::Transflow;
/// Javascript Transflow Code generate
pub struct JsFlowCodegen {}
impl JsFlowCodegen {
/// generate from typescript interface
///
//... | the_stack |
extern crate tango;
extern crate tempdir;
extern crate test;
extern crate walkdir;
use tango::timestamp::{Timestamp, Timestamped};
use tempdir::TempDir;
use walkdir::{WalkDir};
use std::cell::RefCell;
use std::convert;
use std::env;
use std::error::Error;
use std::fmt;
use std::fs::{self, File};
use std::io::{self,... | the_stack |
//! Stored program manipulation.
use crate::console::{read_line, Console};
use crate::storage::Storage;
use async_trait::async_trait;
use endbasic_core::ast::{ArgSep, Expr, Value, VarType};
use endbasic_core::exec::Machine;
use endbasic_core::syms::{
CallError, CallableMetadata, CallableMetadataBuilder, Command, C... | the_stack |
extern crate simdeez;
#[cfg(test)]
mod tests {
use simdeez::avx2::*;
use simdeez::scalar::*;
use simdeez::sse2::*;
use simdeez::sse41::*;
use simdeez::*;
use std::f32::*;
use std::f64::*;
use std::*;
// Macro for checking if f32/f64 are equal to within a delta
macro_rules! ... | the_stack |
use crate::{
application, connection, crypto::CryptoError, endpoint, frame::ConnectionClose, transport,
};
use core::{convert::TryInto, fmt, panic, time::Duration};
/// Errors that a connection can encounter.
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
#[non_exhaustive]
pub enum Error {
/// The connection was... | the_stack |
use {
crate::show::{ShowEntry, ShowValue},
addr::TargetAddr,
anyhow::{anyhow, bail, Result},
ffx_core::ffx_plugin,
ffx_target_show_args as args,
fidl_fuchsia_buildinfo::ProviderProxy,
fidl_fuchsia_developer_bridge::{DaemonProxy, TargetAddrInfo},
fidl_fuchsia_developer_remotecontrol::Remo... | the_stack |
use std::borrow::Cow;
use std::sync::{Mutex, RwLock, RwLockReadGuard};
use std::any::{Any, TypeId};
use std::result::Result as StdResult;
use std::string::String as StdString;
use std::usize;
use base::metadata::{Metadata, MetadataEnv};
use base::symbol::{Name, Symbol, SymbolRef};
use base::types::{Alias, AliasData, A... | the_stack |
extern crate glfw;
use self::glfw::{Context, Key, Action};
extern crate gl;
use self::gl::types::*;
use std::ptr;
use std::mem;
use std::os::raw::c_void;
use std::path::Path;
use std::ffi::CStr;
use image;
use image::GenericImage;
use image::DynamicImage::*;
use common::process_events;
use shader::Shader;
use camer... | the_stack |
use std::collections::BTreeMap;
use std::fs::{self, File};
use std::io::Write;
use std::net::SocketAddr;
use std::net::TcpStream;
use std::os::unix::fs::PermissionsExt;
use std::path::PathBuf;
use std::process::{Command, Stdio};
use std::str::FromStr;
use std::sync::Arc;
use std::time::Duration;
use anyhow::{Context, ... | the_stack |
use super::{Deserialize, Serialize};
use std::str::FromStr;
use thiserror::Error;
pub mod deps;
pub mod expr;
pub mod pull;
pub mod push;
pub mod serde;
pub mod state;
pub use self::deps::{Deps, WithCrateDeps};
pub use self::expr::{Expr, NewExprError};
pub use self::pull::{Pull, WithPullEval};
pub use self::push::{Pu... | the_stack |
use core::{
num::NonZeroU16,
sync::atomic::{self, Ordering},
};
use pac::{uSDHC2, SRC};
mod card;
mod cmd;
use core::{fmt, time::Duration};
use crate::{
memlog, memlog_flush_and_reset,
storage::{Block, ManagedBlockDevice, BLOCK_SIZE},
time::{self, Instant},
util,
};
use cmd::Command;
fn def... | the_stack |
use std::{path::Path, time::Duration};
use criterion::{
criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion, Throughput,
};
use tempfile::TempDir;
use casper_engine_test_support::{
internal::{
DeployItemBuilder, ExecuteRequestBuilder, LmdbWasmTestBuilder, DEFAULT_ACCOUNT_... | the_stack |
use crate::{
errors::AtomicResult, resources::PropVals, urls, values::SubResource, Resource, Storelike,
Value,
};
pub const JSON_AD_MIME: &str = "application/ad+json";
pub fn parse_json_array(string: &str) -> AtomicResult<Vec<String>> {
let vector: Vec<String> = serde_json::from_str(string)?;
Ok(vecto... | the_stack |
use conch_parser::ast::CompoundCommandKind::*;
use conch_parser::ast::PipeableCommand::*;
use conch_parser::ast::*;
use conch_parser::parse::ParseError::*;
use conch_parser::token::Token;
use std::rc::Rc;
mod parse_support;
use crate::parse_support::*;
#[test]
fn test_function_declaration_valid() {
let correct =... | the_stack |
//! Building blocks for creating blockchains powered by the Exonum framework.
pub use self::{
api_sender::{ApiSender, SendError},
block::{
AdditionalHeaders, Block, BlockHeaderKey, BlockProof, CallProof, Epoch, IndexProof,
ProofError, ProposerId, SkipFlag,
},
builder::BlockchainBuilder,... | the_stack |
use std::fmt::{self, Display, Write};
use crate::visit::{
EdgeRef, GraphProp, IntoEdgeReferences, IntoNodeReferences, NodeIndexable, NodeRef,
};
/// `Dot` implements output to graphviz .dot format for a graph.
///
/// Formatting and options are rather simple, this is mostly intended
/// for debugging. Exact outpu... | the_stack |
use rlua::{self, Context, UserData, UserDataMethods};
use sulis_core::resource::ResourceSet;
use sulis_core::util::ExtInt;
use crate::animation::particle_generator::{Dist, DistParam, DistParam2D, GeneratorModel, Param};
use crate::animation::{self, Anim};
use crate::script::{CallbackData, Result};
use crate::GameStat... | the_stack |
use crate::http_token_utils::HttpToken;
use crate::metrics::{ClassificationMetricsSettings, LoggingSettings, TierMetricsSettings};
use crate::request_analyzer::{HttpRequestData, RequestAnalysisResult};
use std::hash::Hash;
use std::slice;
pub mod http_token_utils;
mod metrics;
mod raw_request_parser;
pub mod request_a... | the_stack |
use std::iter::Peekable;
use std::slice::Iter;
use memory::MemSize;
use super::scope::{ScopeStack, TypeId, ArraySize};
/// Possible types for function arguments
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum FuncArgType {
/// A single value of the specified type
Arg(TypeId),
/// A single value that is ... | the_stack |
use crate::help_function::split_file_name;
use crate::rules::*;
use chrono::NaiveDateTime;
use humansize::{file_size_opts as options, FileSize};
use std::cmp::min;
use std::path::Path;
// enum CustomTypes {
// Creation,
// }
pub fn rule_custom(data_to_change: &str, rule: &SingleRule, rule_number: u64, file_data: ... | the_stack |
mod app;
mod clientmanager;
mod corrector;
mod definitions;
mod simconfig;
mod sync;
mod syncdefs;
mod update;
mod util;
mod varreader;
use app::{App, AppMessage, ConnectionMethod};
use clientmanager::ClientManager;
use definitions::{Definitions, ProgramAction, SyncPermission};
use log::{error, info, warn};
use simcon... | the_stack |
use crossbeam_channel::{select, Receiver, Sender};
use log::{error, info, warn};
use std::collections::HashMap;
use std::ops::Add;
use std::thread;
use std::time::{Duration, Instant};
use uuid::Uuid;
use crate::backend::events::BackendEvents;
use crate::client_events::{ClientEvents, YourColorEvent};
use crate::idle_st... | the_stack |
extern crate winapi;
extern crate kernel32;
extern crate libc;
extern crate widestring;
extern crate serde;
extern crate serde_json;
#[allow(unused_imports)]
use log::*;
use winapi::*;
#[allow(unused_imports)]
use std::env;
use std::ops;
use std::str;
use std::path::PathBuf;
use std::ffi::{OsStr, CStr, CString};
use... | the_stack |
#![allow(non_camel_case_types)]
//! This module implements the dynamically loaded client library API used by a crosvm plugin,
//! defined in `crosvm.h`. It implements the client half of the plugin protocol, which is defined in
//! the `protos::plugin` module.
//!
//! To implement the `crosvm.h` C API, each function an... | the_stack |
//! System call numbers for x86-64 FreeBSD.
pub const SYSCALL: usize = 0;
pub const EXIT: usize = 1;
pub const FORK: usize = 2;
pub const READ: usize = 3;
pub const WRITE: usize = 4;
pub const OPEN: usize = 5;
pub const CLOSE: usize = 6;
pub const WAIT4: usize = 7;
pub const LINK: usize = 9;
pub const UNLINK: usize = ... | the_stack |
use crate::{id_from_def_id, id_from_hir_id, SaveContext};
use rls_data::{SigElement, Signature};
use rustc_ast::Mutability;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir_pretty::id_to_string;
use rustc_hir_pretty::{bounds_to_string, path_segment_to_string, path_to_string, ty_to_string};
use ... | the_stack |
use core::ops::{Index, IndexMut};
use core::sync::atomic::{AtomicUsize, Ordering};
use kernel::hil;
use kernel::hil::gpio;
use kernel::utilities::cells::OptionalCell;
use kernel::utilities::registers::interfaces::{Readable, Writeable};
use kernel::utilities::registers::{ReadOnly, ReadWrite, WriteOnly};
use kernel::util... | the_stack |
use crate::render_output::hdr_backbuffer::HdrBackbuffer;
use crate::render_output::screen::Screen;
use crate::wgpu_utils::pipelines::*;
use crate::{
simulation::HybridFluid,
wgpu_utils::{
self,
binding_builder::{BindGroupBuilder, BindGroupLayoutBuilder, BindGroupLayoutWithDesc},
binding_... | the_stack |
//!
//! Cryptographic Functions
//!
use sgx_types::marker::ContiguousMemory;
use sgx_types::*;
use std::cell::{Cell, RefCell};
use std::mem;
use std::ops::{DerefMut, Drop};
use std::ptr;
///
/// The rsgx_sha256_msg function performs a standard SHA256 hash over the input data buffer.
///
/// # Description
///
/// The r... | the_stack |
// (Re-)generated by schema tool
// >>>> DO NOT CHANGE THIS FILE! <<<<
// Change the json schema instead
#![allow(dead_code)]
use std::ptr;
use wasmlib::*;
use crate::consts::*;
use crate::params::*;
use crate::results::*;
pub struct CallOnChainCall {
pub func: ScFunc,
pub params: MutableCallOnChainParams,
pub ... | the_stack |
use std::pin::Pin;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::{Duration, Instant};
use futures::task::{Context, Poll};
use futures::{Future, FutureExt, StreamExt};
use parking_lot::RwLock;
use tokio::sync::broadcast::{channel as broadcast, Sender as BroadcastSender};
use tokio::t... | the_stack |
use crate::error::MessageError;
use byteorder::{ByteOrder, LittleEndian};
use diagnostics_data::Timestamp;
use diagnostics_log_encoding::{Severity as StreamSeverity, Value, ValueUnknown};
use fidl_fuchsia_logger::{LogLevelFilter, LogMessage, MAX_DATAGRAM_LEN_BYTES};
use fidl_fuchsia_sys_internal::SourceIdentity;
use fu... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConfigurationOverrides {
/// <p>The configurations for the application running by the job run. </p>
pub application_configuration: std::option::Option<std::vec::Vec<crate::model::Configuration>>,
/// <p>The configurations for mon... | the_stack |
use scoped_arena::Scope;
use std::panic::panic_any;
use std::sync::Arc;
use crate::alloc::SliceVec;
use crate::core::{Const, EntryInfo, Prim, Term, UIntStyle};
use crate::env::{EnvLen, GlobalVar, SharedEnv, SliceEnv};
use crate::StringId;
/// Atomically reference counted values. We use reference counting to increase
... | the_stack |
use crate::*;
use crate::Tag;
use core::marker::PhantomData;
pub use Eax as EaxOnline;
/// Marker trait denoting whether the EAX stream is used for encryption/decryption.
pub trait CipherOp {}
/// Marker struct for EAX stream used in encryption mode.
pub struct Encrypt;
impl CipherOp for Encrypt {}
/// Marker struct... | the_stack |
use query_engine_tests::*;
#[test_suite(schema(schema))]
mod order_by_aggr {
use indoc::indoc;
use query_engine_tests::{match_connector_result, run_query};
fn schema() -> String {
let schema = indoc! {
r#"model User {
#id(id, Int, @id)
name String
... | the_stack |
use super::{Address, Entry, Event, Message, Response, Scan, Status};
use crate::error::{Error, Result};
use log::{debug, error};
use std::collections::{BTreeMap, HashMap, HashSet};
use tokio::sync::mpsc;
use tokio_stream::wrappers::UnboundedReceiverStream;
use tokio_stream::StreamExt as _;
/// A Raft-managed state ma... | the_stack |
#[cfg(feature = "dashboard")]
use crate::plugins::Dashboard;
use crate::{
config::NodeConfig,
constants::{BEE_GIT_COMMIT, BEE_VERSION},
node::{BeeNode, Error},
plugins::{self, Mqtt, VersionChecker},
storage::StorageBackend,
};
use bee_runtime::{
event::Bus,
node::{Node, NodeBuilder, NodeIn... | the_stack |
use alloc::alloc::{Allocator, Global, Layout};
use alloc::vec;
use core::mem::{self, MaybeUninit};
use core::ptr;
use crate::hash::HashMap;
use crate::link::{Kind, Link};
use crate::rc::RcInnerPtr;
use crate::Rc;
unsafe impl<#[may_dangle] T> Drop for Rc<T> {
/// Drops the [`Rc`].
///
/// This will decreme... | the_stack |
use std::error::Error;
use std::collections::HashMap;
use std::thread::sleep;
use std::time::Duration;
use regex::Regex;
use chrono::NaiveDate;
use reqwest::StatusCode;
use reqwest::blocking::{Client, Response};
use serde_json::Value;
use serde::{Serialize, Deserialize};
use crate::tagger::{MusicPlatform, Track, TrackM... | the_stack |
//! Interface between Mempool and Network layers.
use crate::{
counters,
logging::{LogEntry, LogEvent, LogSchema},
shared_mempool::{
tasks,
types::{
notify_subscribers, BatchId, PeerSyncState, SharedMempool, SharedMempoolNotification,
},
},
};
use aptos_config::{
... | the_stack |
//! HttpResponder implementations
use {
crate::serve::HttpResponder,
futures::{
channel::{mpsc, oneshot},
future::{pending, ready, BoxFuture, Shared},
prelude::*,
},
hyper::{Body, Request, Response, StatusCode},
parking_lot::Mutex,
std::{
collections::HashSet,
... | the_stack |
use prometrics::metrics::MetricBuilder;
use std::collections::VecDeque;
use std::io::Write;
use std::ops::Range;
use super::options::JournalRegionOptions;
use super::record::{JournalEntry, JournalRecord, EMBEDDED_DATA_OFFSET};
use super::ring_buffer::JournalRingBuffer;
use super::{JournalHeader, JournalHeaderRegion};
... | the_stack |
extern crate proc_macro;
mod decode;
mod encode;
mod ffi;
mod rc;
use crate::rc::Rc;
use std::char;
use std::cmp::Ordering;
use std::collections::HashSet;
use std::fmt::{self, Debug, Display};
use std::hash::{Hash, Hasher};
use std::iter::FromIterator;
use std::marker::PhantomData;
use std::mem;
use std::ops::RangeBo... | the_stack |
mod pp;
use crate::{serde_ext, Error, ErrorType};
pub use pp::*;
use serde_ext::ser;
use std::io::Write;
use std::result::Result;
use std::str;
use value_trait::generator::BaseGenerator;
macro_rules! iomap {
($e:expr) => {
($e).map_err(|err| Error::generic(ErrorType::Io(err)))
};
}
/// Write a value t... | the_stack |
use crate::base::ast::{
self, walk_mut_expr, Expr, IdentEnv, MutVisitor, SpannedExpr, SpannedIdent,
};
use crate::base::error::Errors;
use crate::base::fnv::FnvMap;
use crate::base::pos::{self, BytePos, Spanned};
use std::cmp::Ordering;
use std::error::Error as StdError;
use std::fmt;
use std::hash::Hash;
use std::... | the_stack |
extern crate env_logger;
extern crate hyper;
extern crate router;
extern crate rust_playpen;
extern crate rustc_serialize;
extern crate staticfile;
extern crate unicase;
use std::env;
use std::fmt;
use std::io::Read;
use std::path::Path;
use std::process::Command;
use std::sync::Arc;
use hyper::header;
use iron::head... | the_stack |
use super::json::{get_bool_from_js, get_number_from_js, JsContent, JsParamValue};
#[derive(Debug, Clone, Copy)]
pub enum VerticalAlign {
Top,
Middle,
Bottom,
}
#[derive(Debug, Clone, Copy)]
pub enum HorizontalAlign {
Left,
Center,
Right,
}
impl HorizontalAlign {
pub fn from_content(conten... | the_stack |
use super::*;
use crate::diagnostics::*;
use crate::patterns::{PatTyStack, Pattern};
use crate::terms::*;
use std::collections::HashSet;
/// Return true if `existing` covers `new`, i.e. if new is a useful pattern
/// then `overlap` will return `false`
fn overlap(existing: &Pattern, new: &Pattern) -> bool {
use Pat... | the_stack |
#[cfg(feature = "igd")]
use super::igd::{forward_port, IgdError};
use super::wire_msg::WireMsg;
use super::{
config::{Config, InternalConfig, RetryConfig, SERVER_NAME},
connection::Connection,
connection_deduplicator::{ConnectionDeduplicator, DedupHandle},
connection_handle::{
listen_for_incomin... | the_stack |
macro_rules! from_splitmix {
($seed:expr) => {{
let mut rng = crate::xoroshiro::SplitMix64::seed_from_u64($seed);
Self::from_rng(&mut rng).unwrap()
}};
}
/// Apply the ** scrambler used by some RNGs from the xoshiro family.
macro_rules! starstar_u64 {
($x:expr) => {
$x.wrapping_mul(... | the_stack |
//! Top-level [Cucumber] executor.
//!
//! [Cucumber]: https://cucumber.io
use std::{
borrow::Cow,
fmt::{Debug, Formatter},
marker::PhantomData,
mem,
path::Path,
};
use futures::{future::LocalBoxFuture, StreamExt as _};
use regex::Regex;
use crate::{
cli, event, parser, runner, step, tag::Ext... | the_stack |
extern crate clap;
extern crate time;
extern crate clog;
extern crate semver;
#[cfg(feature = "color")]
extern crate ansi_term;
use clap::{App, Arg, ArgGroup, ArgMatches};
use clog::{LinkStyle, Clog};
use clog::fmt::ChangelogFormat;
#[macro_use]
mod macros;
mod error;
mod fmt;
use error::CliError;
pub type CliResu... | the_stack |
#[macro_use]
pub mod utils;
pub use self::utils::{
gen_config, get_event_sender, rand_peer_id_and_enc_sk, test_service, timebomb,
};
use crate::common::{CrustUser, PeerInfo};
use crate::main::{Config, Event, Service};
use crate::PeerId;
use hamcrest2::prelude::*;
use mio;
use rand;
use safe_crypto::{gen_encrypt_k... | the_stack |
use crate::WebRTCDataChannelState;
use crate::WebRTCPriorityType;
use glib::object::ObjectExt;
use glib::object::ObjectType as ObjectType_;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::ToValue;
use std::boxed::Box as Box_;
use std::mem::transm... | the_stack |
use super::helper::Float;
use super::sweep_event::{ResultTransition, SweepEvent};
use geo_types::Coordinate;
use std::collections::HashSet;
use std::rc::Rc;
fn order_events<F>(sorted_events: &[Rc<SweepEvent<F>>]) -> Vec<Rc<SweepEvent<F>>>
where
F: Float,
{
let mut result_events: Vec<Rc<SweepEvent<F>>> = Vec::n... | the_stack |
use std::fmt::Debug;
use common_arrow::arrow::compute::comparison;
use common_arrow::arrow::compute::comparison::Simd8;
use common_exception::ErrorCode;
use common_exception::Result;
use num::Num;
use num::NumCast;
use crate::prelude::*;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Operator {
/// ... | the_stack |
//! Contains thin wrappers over the NOSEngine SPI API.
//!
//! # Examples
//!
//! ```norun
//! # extern crate nosengine_rust;
//! # use nosengine_rust::ffi::spi::*;
//! # use std::ffi::CString;
//! # use std::slice;
//! let connection = CString::new("tcp://localhost:12001").unwrap();
//! let bus = CString::new("spi10")... | the_stack |
/// A `Cursor` indicates a position within a sequence of `T`s. The position can be anywhere within
/// the sequence, including before the first item and after the last.
///
/// # Marks
///
/// In addition to moving through and manipulating the sequence, `Cursor`s also permit marking the
/// current position so it can... | the_stack |
pub mod builder;
pub mod clipmap;
pub mod indexer;
pub mod lod_view;
pub mod sampling;
pub mod storage;
pub use builder::*;
pub use clipmap::*;
pub use indexer::*;
pub use lod_view::*;
pub use sampling::*;
pub use storage::*;
use crate::{
bitset::*,
dev_prelude::{Array, ForEach, GetMutUnchecked, GetRefUncheck... | the_stack |
use crate::{
ctx_desc::TypeContextDescriptor,
metadata::{
EnumMetadata, MetadataKind, MetadataResponse, MetatypeMetadata, StructMetadata,
TupleMetadata,
},
};
use std::{
fmt,
os::raw::{c_uint, c_void},
};
use swift_sys::metadata::{
EnumValueWitnessTable, Metadata as RawMetadata, ... | the_stack |
//! Internal utilities.
use std::{str, char, mem};
use std::marker::PhantomData;
use std::convert::Into;
use std::default::Default;
use types;
/// Unchecked conversion to `char`.
pub fn as_char(ch: u32) -> char {
debug_assert!(char::from_u32(ch).is_some());
unsafe { mem::transmute(ch) }
}
/// External iterat... | the_stack |
use crate::codegen::arch::machine::register::*;
use crate::codegen::common::machine::inst_def::*;
#[allow(non_upper_case_globals)]
mod inst {
use super::*;
// TODO: need macro to describe the followings
lazy_static! {
pub static ref MOVSDrm64: TargetInstDef = {
TargetInstDef::new("movs... | the_stack |
use crate::aggregators::{CertificatesAggregator, VotesAggregator};
use crate::error::{DagError, DagResult};
use crate::messages::{Certificate, Header, Vote};
use crate::primary::{PrimaryMessage, Round};
use crate::synchronizer::Synchronizer;
use async_recursion::async_recursion;
use bytes::Bytes;
use config::Committee;... | the_stack |
use std::borrow::Cow;
use std::collections::HashMap;
use super::{
expr_to_str, gather_deducible_fields, get_ns_name_prefix, parse, serialize, special_cases,
struct_type, switch, to_rust_type_name, to_rust_variable_name, CaseInfo, DeducibleField,
Derives, FieldContainer, NamespaceGenerator, Output, PerModul... | the_stack |
use actix_files::NamedFile;
use actix_web::{
client::HttpError,
delete,
dev::{BodyEncoding, MessageBody, Payload, Service, ServiceRequest, ServiceResponse},
error::{BlockingError, ErrorForbidden, ErrorInternalServerError, ErrorUnauthorized},
get,
http::{ContentEncoding, StatusCode},
post, put,
web::{self, Data,... | the_stack |
use std::cell::Cell;
use std::mem;
use std::ops::{Deref, DerefMut};
use std::ptr;
use libc::c_uint;
use ffi;
use ffi2;
use supercow::{Supercow, NonSyncSupercow};
use env::{self, Environment, Stat};
use dbi::{db, Database};
use error::{Error, Result};
use mdb_vals::*;
use traits::*;
use cursor::{self, Cursor, StaleCur... | the_stack |
#[macro_use]
extern crate num_derive;
#[macro_use]
extern crate strum_macros;
use config::{rule::Rule, workspace_setting::WorkspaceSetting, Config};
use crate::config::rule::Action as RuleAction;
use crossbeam_channel::select;
use direction::Direction;
use display::Display;
use event::Event;
use event::EventChannel;
u... | the_stack |
* Ownership
* =========
*
* The `Thread` struct is owned by the thread itself (the pointer stored within TLS)
* however, it points to a shared block that contains information needed by both the
* thread itself, and the "owner" of the thread (e.g process, or controlling driver).
*/
use prelude::*;
use lib... | the_stack |
//! This module contains the top level AT command library methods. It contains a
//! trait for serialization and deserialization, which is implemented by the high level
//! generated Command and Response types by composing together the parsing and
//! unparsing methods for the low level ASTs with the the generated met... | the_stack |
//! Python values, and serialization instances for them.
use std::fmt;
use std::cmp::Ordering;
use std::collections::{BTreeMap, BTreeSet};
use num_bigint::BigInt;
use num_traits::{Signed, ToPrimitive};
pub use crate::value_impls::{to_value, from_value};
use crate::error::{Error, ErrorCode};
/// Represents all primi... | the_stack |
use std::fmt;
use std::io;
use std::mem;
use std::path::Path;
use std::ptr::null_mut;
use lazy_static::lazy_static;
use libc::c_void;
use winapi::shared::dxgi::*;
use winapi::shared::dxgiformat::*;
use winapi::shared::dxgitype::*;
use winapi::shared::windef::{HWND, RECT};
use winapi::shared::winerror::S_OK;
use winapi... | the_stack |
use beserial::Deserialize;
use hash::{Blake2bHasher, Hasher, Sha256Hasher};
use keys::Address;
use primitives::account::{AccountType, AnyHash, HashAlgorithm, ProofType};
use primitives::coin::Coin;
use crate::{SignatureProof, Transaction, TransactionError, TransactionFlags};
pub trait AccountTransactionVerification: ... | the_stack |
use std::fmt;
use bunt::{
write, writeln, print, println, eprint, eprintln,
termcolor::Buffer,
};
fn buf() -> Buffer {
Buffer::ansi()
}
fn raw_str(buf: &Buffer) -> &str {
std::str::from_utf8(buf.as_slice()).expect("test produced non-UTF8 string")
}
// Helper macro that checks the output of a `write!`... | the_stack |
//! Autoscaling APIs
//!
//! The [autoscaling feature](https://www.elastic.co/guide/en/elasticsearch/reference/master/xpack-autoscaling.html)
//! enables an operator to configure tiers of nodes that self-monitor whether or not they need to scale based on an
//! operator-defined policy.
#![allow(unused_imports)]
use cr... | the_stack |
use crate::errors::{DelgError, DelgResult};
use amcl_wrapper::extension_field_gt::GT;
use amcl_wrapper::field_elem::{FieldElement, FieldElementVector};
use amcl_wrapper::group_elem::{GroupElement, GroupElementVector};
use amcl_wrapper::group_elem_g1::{G1LookupTable, G1Vector, G1};
use amcl_wrapper::group_elem_g2::{G2Ve... | the_stack |
use contracts::debug_ensures;
use once_cell::sync::OnceCell;
use std::cell::RefCell;
use std::sync::Arc;
use crate::lang::core::{Constant, Env, EnvSize, Globals, Term, TermData, VarLevel};
/// Values in the core language.
#[derive(Clone, Debug)]
pub enum Value {
/// A computation that is stuck on a [head value][H... | the_stack |
use std::marker::PhantomData;
use std::iter::FromIterator;
use std::ops::{
Range,
RangeFrom,
RangeFull,
RangeTo,
};
use std::cmp::max;
use types::{Input, ParseResult};
use primitives::{Primitives, IntoInner};
/// Trait for applying a parser multiple times based on a range.
pub trait BoundedRange {
... | the_stack |
use hdk::{
error::{
ZomeApiResult,
ZomeApiError
},
holochain_core_types::{
link::LinkMatch,
entry::Entry
},
holochain_persistence_api::{
cas::content::Address
},
holochain_json_api::{
json::JsonString
},
api::DNA_ADDRESS
};
use std::co... | the_stack |
use super::{PAGE_SIZE, ENTRY_COUNT};
use super::lands::{USERLAND_START_TABLE, USERLAND_END_TABLE, KERNELLAND_START_TABLE, KERNELLAND_END_TABLE, DIRECTORY_RECURSIVE_ADDRESS};
use super::entry::{I386Entry, I386EntryFlags};
use super::super::super::hierarchical_table::{HierarchicalTable, SmartHierarchicalTable,
... | the_stack |
use qt_widgets::QLabel;
use qt_widgets::QLineEdit;
use qt_widgets::QListView;
use qt_widgets::QTabWidget;
use qt_widgets::QTextEdit;
use qt_gui::QPixmap;
use qt_gui::QStandardItem;
use qt_gui::QStandardItemModel;
use qt_core::CaseSensitivity;
use qt_core::QBox;
use qt_core::QByteArray;
use qt_core::q_item_selection_m... | the_stack |
use crate::model_instance;
use crate::parser;
use crate::vwmap;
use std::error::Error;
use std::io::Error as IOError;
use std::io::ErrorKind;
use std::collections::HashMap;
use std::mem::replace;
use std::cell::Cell;
use fasthash::murmur3;
use serde::{Serialize,Deserialize};
use crate::feature_transform_executor;
pu... | the_stack |
use util::byte_code::ByteCode;
const ACPI_NAME_SEG_MAX: u8 = 4;
/// This trait is used for converting AML Data structure to byte stream.
pub trait AmlBuilder {
/// Transfer this struct to byte stream.
fn aml_bytes(&self) -> Vec<u8>;
}
/// This trait is used for adding children to AML Data structure that repr... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.