text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use std::intrinsics::unlikely;
use crate::{ErrorInner, Result};
/// A trait to provide sequential read over a memory buffer.
///
/// The memory buffer can be `&[u8]` or `std::io::Cursor<AsRef<[u8]>>`.
pub trait BufferReader {
/// Returns a slice starting at current position.
///
/// The returned slice can... | the_stack |
extern crate conrod_core;
#[macro_use]
extern crate vulkano;
use std::error::Error as StdError;
use std::fmt;
use std::sync::Arc;
use conrod_core::mesh::{self, Mesh};
use conrod_core::text::rt;
use conrod_core::{image, render, Rect, Scalar};
use vulkano::buffer::cpu_pool::CpuBufferPool;
use vulkano::buffer::BufferUs... | the_stack |
#![allow(unused)]
use std::cell::RefCell;
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
use std::fmt;
use std::hash::{Hash, Hasher};
use std::marker::PhantomData;
use std::str;
use std::sync::{Arc, RwLock};
use lazy_static::lazy_static;
use rustc_hash::FxHashMap;
use crate::arena::DroplessArena;
use libeir_d... | the_stack |
use std::rc::Rc;
use std::cell::RefCell;
use std::collections::BinaryHeap;
use std::cmp::Reverse;
use crate::logging::TimelyLogger as Logger;
use crate::logging::TimelyProgressLogger as ProgressLogger;
use crate::scheduling::Schedule;
use crate::scheduling::activate::Activations;
use crate::progress::frontier::{Anti... | the_stack |
use crate::sky::lut::{LookupTable, LookupTableDefinition};
use cgmath::{ElementWise, InnerSpace, Vector2, Vector3, Vector4, VectorSpace, Zero};
// Simulation is done at λ = (680, 550, 440) nm = (red, green, blue).
// See https://hal.inria.fr/inria-00288758/document
// https://media.contentapi.ea.com/content/dam/eacom/... | the_stack |
use std::sync::atomic::Ordering;
use super::*;
impl<'c> Translation<'c> {
fn convert_constant_bool(&self, expr: CExprId) -> Option<bool> {
let val = self.ast_context.resolve_expr(expr).1;
match val {
CExprKind::Literal(_, CLiteral::Integer(0, _)) => Some(false),
CExprKind::L... | the_stack |
use std::any::Any;
use std::cell::RefCell;
use std::collections::HashMap;
use std::path::Path;
use std::rc::Rc;
use sulis_core::config::DisplayMode;
use sulis_core::config::{self, Config, RawClick};
use sulis_core::io::{event::ClickKind, keyboard_event::Key, DisplayConfiguration, InputActionKind};
use sulis_core::ui::... | the_stack |
use std::ffi::CString;
use std::io::prelude::*;
use std::time;
use crate::bufreader::BufReader;
use crate::Compression;
pub static FHCRC: u8 = 1 << 1;
pub static FEXTRA: u8 = 1 << 2;
pub static FNAME: u8 = 1 << 3;
pub static FCOMMENT: u8 = 1 << 4;
pub mod bufread;
pub mod read;
pub mod write;
/// A structure repres... | the_stack |
//! Implements the Yamux multiplexing protocol for libp2p, see also the
//! [specification](https://github.com/hashicorp/yamux/blob/master/spec.md).
use futures::channel::mpsc;
use futures::future::BoxFuture;
use futures::{prelude::*, stream::StreamExt, FutureExt, SinkExt};
use libp2prs_core::identity::{Keypair, Publi... | the_stack |
use super::features2::switch_to_resolver_2;
use cargo_test_support::registry::{Dependency, Package};
use cargo_test_support::{basic_manifest, project};
use std::fmt::Write;
#[cargo_test]
fn virtual_no_default_features() {
// --no-default-features in root of virtual workspace.
Package::new("dep1", "1.0.0").publ... | the_stack |
pub mod cache;
use std::borrow::Cow;
use console::style;
use failure::{format_err, ResultExt};
use indexmap::{indexmap, IndexMap, IndexSet};
use itertools::Either::{self, Left, Right};
use semver::Version;
use semver_constraints::{Constraint, Interval, Range, Relation};
use slog::{debug, info, o, trace, Logger};
pub... | the_stack |
use std::fmt;
use std::iter::FusedIterator;
use std::mem;
use std::ptr::NonNull;
use std::sync::Arc;
use liblumen_core::util::thread_local::ThreadLocalCell;
use crate::borrow::CloneToProcess;
use crate::erts::exception::ArcError;
use crate::erts::process::alloc::TermAlloc;
use crate::erts::process::{AllocResult, Modu... | the_stack |
use std::time::{Duration, Instant};
use rusqlite::{params, Connection};
use tempfile::NamedTempFile;
use super::{InsertConfig, LogEntry, LogEntryBatchGenerator, ReadConfig, ReadState};
use crate::{
logs::{ScanConfig, ScanState},
BenchConfig, SimpleBench,
};
pub struct InsertLogs {
sqlite: Connection,
... | the_stack |
use std::f64;
use std::str::FromStr;
use std::collections::{HashMap};
use dataflow::petgraph::graph::{NodeIndex};
use dataflow::petgraph::algo::toposort;
use dataflow::topology::Topology;
use dataflow::{OperatorId,OperatorInstanceId,OperatorInstances,Epoch,Rate};
/// Converts a dataflow configuration `conf` to a ve... | the_stack |
use crossbeam_channel::{self, Sender, Receiver, select};
use std::time::{Instant, Duration};
use std::collections::{BTreeMap};
/// As a shortcut, it returns the sender and receiver queue as a tuple.
///
/// Equivalent to:
/// ```
/// struct MyEvent; // or usually an enum
///
/// use message_io::events::EventReceiver;... | the_stack |
use std::cmp::Ordering;
use std::fmt;
use base::ast::is_operator_char;
use base::pos::{BytePos, Column, Line, Location, Span, Spanned};
use combine::primitives::{Consumed, Error as CombineError, RangeStream};
use combine::combinator::EnvParser;
use combine::range::{take, take_while};
use combine::*;
use combine::char... | the_stack |
#[macro_export]
macro_rules! assert_impl_one {
($x:ty: $($t:path),+ $(,)?) => {
const _: fn() = || {
// Generic trait that must be implemented for `$x` exactly once.
trait AmbiguousIfMoreThanOne<A> {
// Required for actually being able to reference the trait.
... | the_stack |
use std::intrinsics::assume;
use ll;
use ll::limb::Limb;
use ll::limb_ptr::{Limbs, LimbsMut};
/// Information for converting to/from a given base, B. Stored in a table generated
/// by build.rs
struct Base {
/// Number of digits a limb can hold in a given base. Except if B is a power of 2,
/// in which case i... | the_stack |
use bio::stats::{LogProb, Prob};
use std::f64;
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum AlignmentType {
ForwardAlgorithmNonNumericallyStable,
ForwardAlgorithmNumericallyStable,
ViterbiMaxScoringAlignment,
}
// these parameters describe state transition probabilities for a pair HMM
// there are two k... | the_stack |
// Mod
pub mod explorer;
// Ext
use std::path::PathBuf;
use std::time::SystemTime;
/// ## FsEntry
///
/// FsEntry represents a generic entry in a directory
#[derive(Clone, std::fmt::Debug)]
pub enum FsEntry {
Directory(FsDirectory),
File(FsFile),
}
/// ## FsDirectory
///
/// Directory provides an interface t... | the_stack |
use crate::{anonymonize_lifetimes, anonymonize_lifetimes_in_type_path};
use eyre::eyre as eyre_err;
use proc_macro2::{Ident, Span, TokenStream as TokenStream2};
use quote::{quote, ToTokens, TokenStreamExt};
use std::convert::TryFrom;
use syn::{
parse::{Parse, ParseStream},
Token,
};
#[derive(Debug, Clone)]
pub... | the_stack |
use arret_syntax::span::Span;
use crate::hir::error::{
Error, ErrorKind, ExpectedPolyPurityArg, PolyArgIsNotPure, PolyArgIsNotTy, Result,
};
use crate::hir::ns::{Ident, NsDataIter, NsDatum};
use crate::hir::prim::Prim;
use crate::hir::scope::{Binding, Scope};
use crate::hir::util::{
expect_arg_count, expect_on... | the_stack |
use std::{
collections::{HashMap, VecDeque},
fs::{File, OpenOptions},
io::{Read, Seek, SeekFrom, Write},
path::Path,
sync::Arc,
};
use parking_lot::Mutex;
use super::{FileManager, FileOp, ManagedFile, OpenableFile};
use crate::{
error::Error,
io::{File as _, IntoPathId, ManagedFileOpener, ... | the_stack |
use regex::RegexSet;
use serde::{Deserialize, Serialize};
use serde_json::json;
use std::str::FromStr;
use tokio::fs::File;
use tokio::io::{AsyncWriteExt, BufWriter};
use crate::config::{GooseConfigure, GooseValue};
use crate::goose::GooseDebug;
use crate::metrics::{GooseErrorMetric, GooseRequestMetric, GooseTaskMetri... | the_stack |
/// The integer type we use internally to hold the numbers.
type Integer = i64;
/// Represents an operation our calculator can carry out.
#[derive(Debug, Clone, Copy, PartialEq)]
enum Op {
Add,
Subtract,
}
impl Op {
/// The operation is applied to the given `lhs` and `rhs`. If an overflow
/// occured ... | the_stack |
use crossterm::event::{MouseEvent, MouseEventKind};
use kubectl_view_allocations::GroupBy;
use serde::Serialize;
use crate::{
app::{
key_binding::DEFAULT_KEYBINDING,
models::{KubeResource, Scrollable, ScrollableTxt, StatefulTable},
ActiveBlock, App, Route, RouteId,
},
cmd::IoCmdEvent,
event::Key,
}... | the_stack |
use std::{u32, vec};
use crate::rtmp_server::{eventbus_map, meta_data_map, video_header_map};
use crate::util::spawn_and_log_error;
use smol::channel::Receiver;
use crate::protocol::rtmp::RtmpMessage;
use crate::protocol::h264::Nalu;
use smol::io::AsyncWriteExt;
/// fps = timescale / duration
#[derive(Clone)]
pub stru... | the_stack |
pub use super::{index::Index, range};
use crate::plonk_sponge::FrSponge;
use ark_ec::AffineCurve;
use ark_ff::{Field, One, PrimeField, UniformRand, Zero};
use ark_poly::{
univariate::{DenseOrSparsePolynomial, DensePolynomial},
Evaluations, Polynomial, Radix2EvaluationDomain as D, UVPolynomial,
};
use commitment... | the_stack |
use std::ops::{Deref, DerefMut};
use std::rc::Rc;
use std::cell::RefCell;
use buffer::{Position, GapBuffer};
use unicode_segmentation::UnicodeSegmentation;
/// Read-only wrapper for a `Position`, to allow field level access to a
/// buffer's cursor while simultaneously enforcing bounds-checking when
/// updating its v... | the_stack |
use chrono::{Datelike, Duration, NaiveDate, Weekday};
use std::mem;
use todo_lib::{terr, tfilter};
const NO_CHANGE: &str = "no change";
const DAYS_PER_WEEK: u32 = 7;
const FAR_PAST: i64 = -100 * 365; // far in the past
type HumanResult = Result<NaiveDate, String>;
fn days_in_month(y: i32, m: u32) -> u32 {
match... | the_stack |
use super::*;
use std::collections::HashMap;
use syn::parse::{Parse, ParseStream};
/// A single automock attribute
// This enum is very short-lived, so it's fine not to box it.
#[allow(clippy::large_enum_variant)]
enum Attr {
Mod(ItemMod),
Type(TraitItemType),
}
impl Parse for Attr {
fn parse(input: Parse... | the_stack |
use exonum::{
crypto::Hash,
helpers::{Height, ValidatorId},
merkledb::access::Prefixed,
runtime::{
versioning::Version, CoreError, ErrorMatch, ExecutionError, InstanceId, SnapshotExt,
SUPERVISOR_INSTANCE_ID,
},
};
use exonum_rust_runtime::{DefaultInstance, ServiceFactory};
use exonum... | the_stack |
use moniker::{Binder, Embed, FreeVar, Nest, Scope, Var};
use num_bigint::BigInt;
use std::fmt;
use std::ops::Range;
use std::rc::Rc;
use crate::syntax::pretty::{self, ToDoc};
use crate::syntax::{FloatFormat, IntFormat, Label, Level};
/// A module definition
pub struct Module {
/// The name of the module
pub n... | the_stack |
extern crate clap;
extern crate env_logger;
#[macro_use(lazy_static)]
extern crate lazy_static;
#[macro_use(error, warn)]
extern crate log;
extern crate mdbook;
extern crate pulldown_cmark;
extern crate pulldown_cmark_to_cmark;
extern crate regex;
extern crate serde_json;
use std::fs;
use std::io;
use std::path::{Path... | the_stack |
use crate::*;
impl Cx {
/// Starts the box that has it elements layed out horizontally (as a row)
pub fn begin_row(&mut self, width: Width, height: Height) {
self.begin_typed_box(
CxBoxType::Row,
Layout { direction: Direction::Right, layout_size: LayoutSize { width, height }, ..... | the_stack |
use std::{
collections::{btree_map::Entry, BTreeMap},
pin::Pin,
sync::{
atomic::{AtomicBool, Ordering},
Arc,
},
task::Poll,
};
use futures::{
future,
stream::{BoxStream, SelectAll},
Sink, Stream, StreamExt,
};
use tokio::sync::mpsc;
use tokio_stream::wrappers::UnboundedR... | the_stack |
use std::collections::{BTreeMap, HashMap, HashSet};
use std::fs;
use std::fs::OpenOptions;
use std::io::BufWriter;
use std::io::Write;
use crate::TypeOfProblem::{CrashesLinux, CrashesWindows, NotImplementedLinux};
use crate::{FileData, TypeOfProblem, IGNORE_INVALID};
pub fn create_project_file(
file_data: &FileDa... | the_stack |
use conrod_example_shared::{WIN_H, WIN_W};
use vulkano::image::{AttachmentImage, MipmapsCount};
use vulkano::swapchain::AcquireError;
use conrod_vulkano::Image as VulkanoGuiImage;
use conrod_vulkano::Renderer;
use conrod_winit::WinitWindow;
use std::sync::Arc;
use vulkano::command_buffer::{AutoCommandBufferBuilder, ... | the_stack |
use thiserror::Error;
use pijama_ast::{
analysis::is_fn_def_recursive,
node::{Block, Branch, Expression, Node, Statement},
ty::{Ty as AstTy, TyAnnotation},
};
use pijama_common::{
location::{Located, LocatedError, Location},
BinOp, Local, UnOp,
};
use pijama_ctx::{Context, ContextExt, LocalId, Term... | the_stack |
use container_runtime::PullImageListener;
use opendatafabric::serde::yaml::formats::{datetime_rfc3339, datetime_rfc3339_opt};
use opendatafabric::serde::yaml::generated::*;
use opendatafabric::*;
use ::serde::{Deserialize, Serialize};
use ::serde_with::skip_serializing_none;
use chrono::{DateTime, Utc};
use std::backt... | the_stack |
use crate::{
application::ApplicationKeyChain,
credential::{Credential, Roster},
crypto::{
ciphersuite::CipherSuite,
dh::DhPrivateKey,
ecies::{self, EciesCiphertext},
hash::Digest,
hkdf,
hmac::{self, HmacKey},
rng::CryptoRng,
sig::{SigSecretKey... | the_stack |
use crate::raftpb::raft::{ConfState, Entry, HardState, Snapshot};
use crate::util::limit_size;
use bytes::{Buf, BufMut, Bytes, BytesMut};
use protobuf::Message;
use std::sync::{Arc, RwLock, RwLockReadGuard, RwLockWriteGuard};
use thiserror::Error;
#[derive(Error, Clone, Debug, PartialEq)]
pub enum StorageError {
/... | the_stack |
use std::io::Error;
use std::rc::Rc;
use crate::{prop_state, save_state::PropSaveState, Location, PropState};
use sulis_core::util::{invalid_data_error, Point};
use sulis_module::{area::PropData, prop::Interactive, Area, Module, Prop};
pub struct PropHandler {
area: Rc<Area>,
props: Vec<Option<PropState>>,
... | the_stack |
use std::fmt::Debug;
use super::{
context::ReadContext,
proxy::{StateReadProxy, StateWriteProxy},
state::{ReadState, WriteState},
};
use crate::{
config::{Distribution, Worker, WorkerAllocation},
datastore::{prelude::Result, Error},
simulation::task::handler::worker_pool::SplitConfig,
};
/// T... | the_stack |
extern crate bytes;
use std::cmp::min;
use std::fmt::{self, Debug};
use std::fs;
use std::io::{Cursor, Read, Seek, SeekFrom, Write};
use std::ops::Index;
use std::path::{Path, PathBuf};
use std::sync::{Arc, RwLock};
use std::thread;
use std::time::{SystemTime, UNIX_EPOCH};
use super::controller::imp::Controller;
use ... | the_stack |
use super::*;
decl!(f32x8: f32 => __m256);
impl<S: Simd> Default for f32x8<S> {
#[inline(always)]
fn default() -> Self {
Self::new(unsafe { _mm256_setzero_ps() })
}
}
#[rustfmt::skip]
macro_rules! log_reduce_ps_avx2 {
($value:expr; $op:ident $last:ident) => {unsafe {
let ymm0 = $value;... | the_stack |
use regex::Regex;
use std::error::Error;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::{file, line};
use clap::ArgMatches;
use simple_error::*;
use simplelog::{debug, info, warn};
#[cfg(target_os = "macos")]
use crate::macos::*;
#[cfg(target_os = "windows")]
use crate::windows::*;
#[cfg(target... | the_stack |
use libpaillier::unknown_order::BigNumber;
use serde::{Deserialize, Serialize};
use sha2::digest::*;
use sha3::Shake128;
use tracing::warn;
use zeroize::Zeroize;
use crate::crypto_tools::{
constants::{MODULUS_MAX_SIZE, MODULUS_MIN_SIZE, PAILLIER_KEY_PROOF_TAG},
paillier::{utils::member_of_mul_group, Decryption... | the_stack |
#[cfg(test)]
mod tests {
use crate::mock::{self, new_empty_entry_set, new_entry, new_entry_set, new_test_inner_node, read_message, MockEntry, MocksEnts, new_entry_set2};
use crate::raft::{Raft, StateType, NONE};
use crate::raftpb::raft::MessageType::{
MsgApp, MsgAppResp, MsgHeartbeat, MsgHup, MsgPro... | the_stack |
use std::collections::HashMap;
use std::sync::mpsc::Sender;
use std::io;
use std::time::Duration;
use mio::{Token, Ready, PollOpt};
use mio_extras::timer::{Timer, Builder};
use mio_extras::channel::{Receiver};
use core::{BuildIdHasher, SocketId, EndpointId, DeviceId, ProbeId, session, socket, context, endpoint, devic... | the_stack |
use common_datavalues::prelude::*;
use common_exception::Result;
use common_functions::scalars::InetAtonFunction;
use common_functions::scalars::InetNtoaFunction;
use common_functions::scalars::RunningDifferenceFunction;
use crate::scalars::scalar_function_test::test_scalar_functions;
use crate::scalars::scalar_functi... | the_stack |
use crate::{
errors::ExecError,
graph::{Node, NodeID, Op, OpID},
shape_prop::cached_shapes_inner,
subgraph::{execution_subgraph, SubGraph},
};
use indexmap::{IndexMap, IndexSet};
use lru::LruCache;
use ndarray::{ArcArray, ArrayViewD, ArrayViewMutD, Dimension, IxDyn};
use std::time::Instant;
use std::{
borrow::Borr... | the_stack |
use crate::il;
use crate::translator::aarch64::{
register::{get_register, AArch64Register},
unsupported, UnsupportedError,
};
type Result<T> = std::result::Result<T, UnsupportedError>;
/// Get the scalar for a well-known register.
macro_rules! scalar {
("x30") => {
// the link register
il:... | the_stack |
#[doc(hidden)]
#[macro_export]
macro_rules! dtoa {(
floating_type: $fty:ty,
significand_type: $sigty:ty,
exponent_type: $expty:ty,
$($diyfp_param:ident: $diyfp_value:tt,)*
) => {
diyfp! {
floating_type: $fty,
significand_type: $sigty,
exponent_type: $expty,
$($diyfp_param: $diyfp_value,... | the_stack |
use std::fmt;
use std::ops::{Deref, DerefMut, Index, IndexMut, Range, RangeTo, RangeFrom, RangeFull};
use base::symbol::Symbol;
use Variants;
use gc::GcPtr;
use value::{ClosureData, Value, DataStruct, ExternFunction};
use types::VmIndex;
#[derive(Copy, Clone, Debug, PartialEq)]
pub enum State {
Unknown,
/// ... | the_stack |
use std::path::{Path, PathBuf};
use anyhow::{bail, Result};
use crate::dist::component::package::{INSTALLER_VERSION, VERSION_FILE};
use crate::dist::component::transaction::Transaction;
use crate::dist::prefix::InstallPrefix;
use crate::errors::RustupError;
use crate::utils::utils;
const COMPONENTS_FILE: &str = "com... | the_stack |
use num::{One, Zero};
use std::cmp::Ordering;
use na::dimension::{U15, U8};
use na::{
self, Const, DMatrix, DVector, Matrix2, Matrix2x3, Matrix2x4, Matrix3, Matrix3x2, Matrix3x4,
Matrix4, Matrix4x3, Matrix4x5, Matrix5, Matrix6, OMatrix, RowVector3, RowVector4, RowVector5,
Vector1, Vector2, Vector3, Vector4... | the_stack |
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode};
use frame_support::{
dispatch::{DispatchError, DispatchResult},
traits::{Currency, Randomness, Time, UnfilteredDispatchable},
weights::{GetDispatchInfo, Weight},
RuntimeDebug,
};
use sp_core::Bytes;
use sp_runtime::{
traits::... | the_stack |
use std::process::exit;
use std::collections::HashMap;
type Lines = std::io::Lines<std::io::BufReader<std::fs::File>>;
// svg_generator
use rustviz_lib::data::{
ExternalEvent, Function, MutRef, Owner, Struct,
ResourceAccessPoint, StaticRef, VisualizationData, Visualizable
};
// Requires: Valid file path
// ... | the_stack |
use std::boxed::Box;
use std::collections::{HashMap, HashSet};
use node::{FuncDef, NodeKind};
use id;
use parser::EXTENV;
#[derive(Clone, PartialEq, Eq, Hash)]
pub enum Type {
Unit,
Bool,
Int,
Float,
Char,
Tuple(Vec<Type>),
Array(Box<Type>),
Func(Vec<Type>, Box<Type>), // (param types... | the_stack |
//! Commands for graphical console interaction.
use crate::console::{Console, PixelsXY};
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, CommandResult,
}... | the_stack |
use crate::prelude::*;
use crate::data::color;
use crate::define_style;
use crate::display;
use crate::display::scene::Scene;
use crate::display::shape::*;
use crate::frp;
use crate::gui::style::*;
use crate::Animation;
use crate::DEPRECATED_Animation;
use crate::DEPRECATED_Tween;
// =================
// === Consta... | the_stack |
use either::Either;
use hir::{AssocItem, HasVisibility, Module, ModuleDef, Name, PathResolution, ScopeDef};
use ide_db::{
defs::{Definition, NameRefClass},
search::SearchScope,
};
use stdx::never;
use syntax::{
ast::{self, make},
ted, AstNode, Direction, SyntaxNode, SyntaxToken, T,
};
use crate::{
... | the_stack |
use std::{
collections::{HashMap, HashSet},
fs::read_to_string,
mem::MaybeUninit,
num::IntErrorKind,
path::{Path, PathBuf},
};
use num_traits::Bounded;
use procfs::process::{MountInfo, Process};
// ## Differences between cgroup v1 and v2:
// ### memory subsystem, memory limitation
// v2:
// * pa... | the_stack |
#![allow(non_camel_case_types, dead_code)]
#![allow(missing_docs, missing_debug_implementations, missing_copy_implementations)]
use libc;
use std::fmt;
/* Opaque types */
pub type platform_id = *mut libc::c_void;
pub type device_id = *mut libc::c_void;
pub type context_id ... | the_stack |
use super::{NormError, NormResult};
use crate::collections::{Map, Set};
use crate::grammar::consts::*;
use crate::grammar::parse_tree::*;
use crate::lexer::dfa::{self, DFAConstructionError, Precedence};
use crate::lexer::nfa::NFAConstructionError::*;
use crate::lexer::re;
use string_cache::DefaultAtom as Atom;
#[cfg(... | the_stack |
#![allow(non_snake_case)]
use super::keygen::MultiPartyInfo;
use super::messages::signing::{
Phase3data, Phase5Com1, Phase5Com2, Phase5Decom1, Phase5Decom2, Phase5Edata,
SignBroadcastPhase1, SignDecommitPhase4,
};
use super::signature::phase5::LocalSignature;
use crate::ecdsa::{
is_valid_curve_point, Commit... | the_stack |
// N.B. requires nightly rustdoc to document until intra-doc links are stabilized.
//! Collect information that allows you to build a crate the same way that docs.rs would.
//!
//! This library is intended for use in docs.rs and crater, but might be helpful to others.
//! See <https://docs.rs/about/metadata> for more i... | the_stack |
use std::sync::atomic::{AtomicU16, Ordering};
use std::sync::{Arc, Mutex, Weak};
use address_space::{GuestAddress, Region, RegionOps};
use hypervisor::{MsiVector, KVM_FDS};
use migration::{DeviceStateDesc, FieldDesc, MigrationHook, MigrationManager, StateTransfer};
use util::{byte_code::ByteCode, num_ops::round_up};
... | the_stack |
//! Event handling: events
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
#[allow(unused)]
use super::{GrabMode, Manager, Response, SendEvent}; // for doc-links
use super::{MouseButton, UpdateHandle, VirtualKeyCode};
use crate::geom::{Coord, DVec2, Offset};
use crate::{dir::Direction, WidgetId, Windo... | the_stack |
use std::fmt;
use std::iter::FromIterator;
use std::str::FromStr;
use std::time::Duration;
use util::{self, csv, Seconds};
use HeaderValue;
/// `Cache-Control` header, defined in [RFC7234](https://tools.ietf.org/html/rfc7234#section-5.2)
///
/// The `Cache-Control` header field is used to specify directives for
/// c... | the_stack |
use crate::{error::Error, node::Node, transaction::NewVerifier};
use std::{
convert::TryInto,
str::FromStr,
sync::{Arc, Mutex},
time::Instant,
};
// Libra types
use consensus::consensus_provider::{make_consensus_provider, ConsensusProvider};
use executor::Executor;
use grpc_helpers::ServerHandle;
use ... | the_stack |
use crate::platform::{self, OsIpcChannel, OsIpcReceiver, OsIpcReceiverSet, OsIpcSender};
use crate::platform::{OsIpcOneShotServer, OsIpcSelectionResult, OsIpcSharedMemory, OsOpaqueIpcChannel};
use bincode;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::cell::RefCell;
use std::cmp::min;
use std... | the_stack |
pub(crate) mod metrics;
mod prometheus_server;
use crate::{
log_export::CoreExportLogger,
telemetry::{metrics::SDKAggSelector, prometheus_server::PromServer},
CoreLog,
};
use itertools::Itertools;
use log::LevelFilter;
use once_cell::sync::OnceCell;
use opentelemetry::{
global,
sdk::{metrics::PushC... | the_stack |
mod surface;
pub mod surface_extraction;
#[cfg(test)]
mod tests;
use std::{sync::Arc, time::Instant};
use ash::{vk, Device};
use metrics::timing;
use tracing::warn;
use super::draw::nearby_nodes;
use crate::{
graphics::{Base, Frustum},
loader::{Cleanup, LoadCtx, LoadFuture, Loadable, WorkQueue},
Config,... | the_stack |
#![cfg(any(target_arch = "x86", test, doc))]
#![allow(dead_code)]
pub mod acpi;
#[macro_use]
pub mod registers;
pub mod stack;
pub mod multiboot;
pub mod structures;
pub mod process_switch;
pub mod gdt;
pub mod interrupt;
pub mod interrupt_service_routines;
pub mod pio {
//! Port IO
//!
//! Look at libut... | the_stack |
//! Platform independent window types.
use std::any::Any;
use std::time::Duration;
use crate::application::Application;
use crate::backend::window as backend;
use crate::common_util::Counter;
use crate::dialog::{FileDialogOptions, FileInfo};
use crate::error::Error;
use crate::keyboard::KeyEvent;
use crate::kurbo::{I... | the_stack |
use combine::{parser, ParseResult, Parser};
use combine::easy::{Error, Errors};
use combine::error::StreamError;
use combine::combinator::{many, many1, eof, optional, position, choice};
use combine::combinator::{sep_by1};
use crate::tokenizer::{Kind as T, Token, TokenStream};
use crate::helpers::{punct, ident, kind, n... | the_stack |
#![deny(missing_docs)]
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![allow(clippy::pub_enum_variant_names)]
#![allow(clippy::inline_always)]
// TODO: check these case by case, add unit tests
#![allow(clippy::cast_possible_truncation)]
#![allow(clippy::c... | the_stack |
use crate::api::{ApiError, FederationApi};
use crate::clients::transaction::TransactionBuilder;
use crate::ln::gateway::LightningGateway;
use crate::ln::{LnClient, LnClientError};
use crate::mint::{MintClient, MintClientError, SpendableCoin};
use crate::wallet::{WalletClient, WalletClientError};
use crate::{api, OwnedC... | the_stack |
use crate::default;
use crate::error::InvalidPathError;
use crate::middlewares::Closures;
use crate::path::{MatchedPath, PathNode};
use crate::request::{MatchedRequest, Request, RequestMethod};
use crate::responder::Response;
use std::collections::HashMap;
use std::result::Result;
// The type of HashMap where we will ... | the_stack |
use simba::simd::{SimdBool as _, SimdPartialOrd, SimdValue};
use crate::dynamics::solver::DeltaVel;
use crate::dynamics::{
IntegrationParameters, JointGraphEdge, JointIndex, JointParams, PrismaticJoint, RigidBodyIds,
RigidBodyMassProps, RigidBodyPosition, RigidBodyVelocity,
};
use crate::math::{
AngVector,... | the_stack |
quantity! {
/// Heat transfer (base unit watt per square meter kelvin, kg · s⁻³ · K⁻¹).
quantity: HeatTransfer; "heat transfer";
/// Dimension of heat transfer, MT⁻³Th⁻¹ (base unit watt per square meter kelvin,
/// kg · s⁻³ · K⁻¹).
dimension: ISQ<
Z0, // length
P1, // mass
... | the_stack |
use alumina_core::{
base_ops::{OpInstance, OpSpecification},
errors::{ExecutionError, GradientError, OpBuildError, ShapePropError},
exec::ExecutionContext,
grad::GradientContext,
graph::{merge_graphs, Graph, HeavyNode, Node, NodeID, NodeTag, Op},
init::msra,
shape::{NodeAxis, NodeShape},
shape_prop::ShapePropCo... | the_stack |
use codec::{Decode, EncodeLike, FullCodec, FullEncode};
use frame_support::{
storage::{
generator::{StorageDoubleMap as StorageDoubleMapT, StorageMap as StorageMapT},
unhashed, StorageDoubleMap, StorageMap,
},
ReversibleStorageHasher,
};
use sp_std::prelude::*;
/// Utility to iterate through items in a storage ... | the_stack |
use std::io::{Cursor, Read, Write};
#[cfg(test)]
use proptest::prelude::*;
use super::{
primitives::{Int16, Int32, Int64, Int8, Varint, Varlong},
traits::{ReadError, ReadType, WriteError, WriteType},
vec_builder::VecBuilder,
};
/// Record Header
///
/// # References
/// - <https://kafka.apache.org/docume... | the_stack |
use super::{
editor::{Buffer, Cell, Char, EditorCtx, CONSUMED, SP},
Options,
};
use cursive::{
event::{Event, EventResult, Key, MouseButton::*, MouseEvent::*},
Rect, Vec2,
};
use std::{cmp::min, fmt};
macro_rules! option {
($a:expr) => {
match $a {
Some(a) => a,
_ =>... | the_stack |
//! Data structures for communicating with the PeerManager.
use std::sync::mpsc::{channel, Sender};
use crate::collections::BiHashMap;
use super::error::{
PeerConnectionIdError, PeerListError, PeerLookupError, PeerManagerError, PeerRefAddError,
PeerRefRemoveError, PeerUnknownAddError,
};
use super::notificat... | the_stack |
#[allow(unused)]
fn runner() -> crate::TestRunner {
super::runner()
}
mod after {
#[allow(unused)]
use super::runner;
mod at_rule {
#[allow(unused)]
use super::runner;
#[test]
#[ignore] // wrong error
fn css() {
assert_eq!(
runner().... | the_stack |
use super::{Gl, WebGL2RenderResourceContext};
use crate::converters::*;
use crate::{gl_call, Buffer, WebGL2RenderPass};
use bevy::render::{
pass::{LoadOp, PassDescriptor, RenderPass, TextureAttachment},
renderer::{BufferId, RenderContext, RenderResourceBindings, RenderResourceContext, TextureId},
texture::E... | the_stack |
use std::collections::HashMap;
use femtovg::renderer::OpenGl;
use femtovg::{ImageFlags, ImageId, PixelFormat, RenderTarget};
use tuix::*;
use tuix::widgets::*;
mod overlay;
use overlay::*;
// mod treeview;
// use treeview::*;
mod canvas_options;
use canvas_options::*;
static STYLE: &str = include_str!("style.css")... | the_stack |
use std::cmp::Ordering;
use std::marker::PhantomData;
use std::ops::{Deref, AddAssign, DerefMut};
use rle::Searchable;
use super::*;
/// This file provides the safe implementation methods for cursors.
impl<'a, E: ContentTraits, I: TreeMetrics<E>, const IE: usize, const LE: usize> Cursor<'a, E, I, IE, LE> {
#[inl... | the_stack |
use makepad_render::*;
use makepad_microserde::*;
#[derive(Clone)]
pub struct Splitter {
pub axis: Axis,
pub align: SplitterAlign,
pub pos: f32,
pub min_size: f32,
pub split_size: f32,
pub bg: DrawColor,
pub animator: Animator,
pub realign_dist: f32,
pub split_view: View,
p... | the_stack |
use crate::{
errors::ShapePropError,
errors::{ShapeError, ShapesError},
graph::{Node, NodeID, Op, OpID},
shape::NodeShape,
subgraph::SubGraph,
util::display::{Iter2Display, IterDisplay},
};
use failure::ResultExt;
use indexmap::{IndexMap, IndexSet};
use lru::LruCache;
use ndarray::{Dimension, IxDyn};
use std::cel... | the_stack |
use cookie_factory::GenError;
use futures::{Async, Future, Poll};
use i2p_snow::{Builder, Session};
use nom::Err;
use rand::{rngs::OsRng, Rng};
use siphasher::sip::SipHasher;
use std::net::SocketAddr;
use std::ops::AddAssign;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use tokio::{
codec::{Decoder, Framed},
... | the_stack |
use crate::emitter::ir::{CapturedUse, Syntax, SyntaxBody, SyntaxMetadata};
use derive_new::new;
use llvm::prelude::*;
use memoffset::offset_of;
use std::mem::{align_of, size_of, ManuallyDrop};
/// Interconversion with the equivalent value representation in the execution environment.
pub trait RtValue: Sized {
type... | the_stack |
use crate::{encoding::Encoding, error::*, format::*, reader::buffer::*};
use log::*;
use nom::Offset;
use std::io::Read;
/// ArchiveReader parses a valid zip archive into an [Archive][]. In particular, this struct finds
/// an end of central directory record, parses the entire central directory, detects text encoding... | the_stack |
use logger::{log, sendlog};
use std::{
io::{self, Read, Write},
net::{SocketAddr, TcpStream, ToSocketAddrs},
process,
sync::mpsc::{channel, Receiver, Sender},
sync::{
atomic::{AtomicUsize, Ordering},
Arc, Mutex, MutexGuard,
},
thread,
time::Duration,
};
use net2::{TcpBu... | the_stack |
use std::collections::HashSet;
use std::future::Future;
use std::pin::Pin;
use std::time::Duration;
pub(crate) use self::messages::PutMsg;
use locutus_runtime::prelude::ContractKey;
use super::{OpEnum, OpError, OperationResult};
use crate::{
config::PEER_TIMEOUT,
contract::ContractHandlerEvent,
message::{... | the_stack |
use super::class::{Class, Obj};
use super::code::{Coro, GFn};
use super::collections::{Arr, Deque, DequeAccess, DequeOps, Str, Tab};
use super::engine::{
glsp, stock_syms::*, RData, RFn, RGlobal, RGlobalRef, RGlobalRefMut, RRef, RRefMut, RRoot, Sym,
};
use super::error::{GError, GResult};
use super::eval::{EnvMode,... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.