text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
use {
fuchsia_async::{self as fasync, PacketReceiver, ReceiverRegistration},
fuchsia_zircon::{self as zx},
futures::{channel::mpsc, Stream, StreamExt, TryStreamExt},
std::{
convert::TryInto,
pin::Pin,
task::{Context, Poll},
},
thiserror::Error,
};
// Virtio 1.0 Section 4... | the_stack |
use crate::blockstore::BlockStore;
use chapter01::interface::SSet;
#[derive(Clone, Debug, Default, Eq, Ord, PartialEq, PartialOrd)]
struct Node<T: Clone + PartialOrd> {
id: usize,
keys: Box<[Option<T>]>,
children: Box<[i32]>,
}
#[allow(non_snake_case)]
#[derive(Clone, Debug, Default, Eq, Ord, PartialEq, P... | the_stack |
//! This module contains Sulis' scripting API. Most structs are inserted into lua scripts as
//! objects. The documentation for each struct describes the available functions on each
//! object when interacting with them within a lua script.
//!
//! There are currently four kinds of scripts:
//!
//! 1. AI Scripts: Th... | the_stack |
//! String functions for EndBASIC.
use async_trait::async_trait;
use endbasic_core::ast::{Expr, Value, VarType};
use endbasic_core::eval::eval_all;
use endbasic_core::exec::Machine;
use endbasic_core::syms::{
CallError, CallableMetadata, CallableMetadataBuilder, Function, FunctionResult, Symbols,
};
use std::cmp::... | the_stack |
use crate::{Output, Result};
use heck::ToSnakeCase;
use proc_macro2::{Ident, Span, TokenStream};
use quote::{quote, ToTokens};
use syn::parse::{Parse, ParseStream};
#[derive(Debug, Default)]
pub struct File {
pub structs: Vec<Struct>,
pub enums: Vec<Enum>,
pub extra: TokenStream,
}
impl File {
fn pars... | the_stack |
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationExceptionField {
/// <p>The name of the field that caused the exception.</p>
pub name: std::option::Option<std::string::String>,
/// <p>Information about what caused the field to cause an exception.</p>
pub message:... | the_stack |
use std::sync::Arc;
use super::{
command::CreateRemoveCommands, comms::Comms, package::run::Packages,
step_output::SimulationStepOutput, step_result::SimulationStepResult, Error, Result,
};
use crate::{
config::SimRunConfig,
datastore::{
prelude::Store,
table::{
context::ExC... | the_stack |
use crate::{
container::ContainerProcessState,
process::{args::ContainerArgs, channel, container_intermediate_process, fork},
rootless::Rootless,
seccomp, utils,
};
use anyhow::{Context, Result};
use nix::{
sys::{socket, uio},
unistd::{self, Pid},
};
use oci_spec::runtime;
use std::path::Path;
... | the_stack |
use std::{
borrow::{Borrow, Cow},
hash::Hasher,
io::{Cursor, Read},
ops::{Deref, DerefMut},
};
use blake2::{Blake2s256, Digest};
use byteorder::LittleEndian;
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
const CONTRACT_KEY_SIZE: usize = 32;
#[derive(Debug)]
pub enum ContractError {
... | the_stack |
use std::collections::BTreeMap;
use std::convert::TryInto;
use std::{cmp, mem, ptr, slice};
use netutils::setcfg;
use syscall::error::{Error, Result, EACCES, EBADF, EINVAL, EWOULDBLOCK};
use syscall::flag::{EventFlags, O_NONBLOCK};
use syscall::io::Dma;
use syscall::scheme::SchemeBlockMut;
const CTRL: u32 = 0x00;
co... | the_stack |
use std::{
fmt::Display,
future::Future,
net::{SocketAddr, ToSocketAddrs},
pin::Pin,
sync::Arc,
task::{Context, Poll},
};
use futures_util::stream::{FuturesUnordered, Stream};
use openssl::{
ssl::{Ssl, SslAcceptor, SslMethod, SslOptions, SslVerifyMode},
x509::X509Ref,
};
use tokio::{
... | the_stack |
use super::{Monitor, MonitorConfig, MonitorDirectories, MonitorEntry, MonitorMessage};
use crate::{AbsPath, AbsPathBuf};
use crossbeam_channel::{never, select, unbounded, Receiver, Sender};
use notify::{RecommendedWatcher, RecursiveMode, Watcher};
use std::{convert::TryFrom, thread};
use walkdir::WalkDir;
/// A messag... | the_stack |
use std::fs::File;
use std::io::{stdout, BufReader, BufWriter, Read, Write};
use std::path::PathBuf;
use anyhow::{bail, Result};
//use crate::dovi::get_aud;
const OUT_NAL_HEADER: &[u8] = &[0, 0, 0, 1];
use hdr10plus::metadata_json::{Hdr10PlusJsonMetadata, MetadataJsonRoot};
use crate::core::is_st2094_40_sei;
use s... | the_stack |
use std::env;
use std::fs::File;
use std::io::{stdout, BufRead, BufReader, BufWriter, ErrorKind, Write};
use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
use crate::create_smartlist::{SmartlistBuilder, SmartlistTokenizer, DEFAULT_VOCAB_SIZE};
use crate::generators::get_word_generator;
use crate::helpers::Ra... | the_stack |
extern crate bytes;
extern crate futures;
extern crate rtsp;
extern crate tokio;
extern crate tokio_tcp;
extern crate tokio_timer;
use bytes::BytesMut;
use futures::{future, lazy, Async, Future, Poll};
use rtsp::header::map::HeaderMapExtension;
use rtsp::header::name::HeaderName;
use rtsp::header::types::CSeq;
use rts... | 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.
extern crate addr2l... | the_stack |
use std::collections::hash_map;
use std::mem::ManuallyDrop;
use std::sync::Arc;
use std::path::{Path, PathBuf};
use byteorder::{ByteOrder, LittleEndian, WriteBytesExt};
use tokio::fs;
use tokio::io::{self, AsyncReadExt, AsyncWriteExt, BufReader};
use fxhash::FxHashMap;
use parking_lot::{MappedMutexGuard, Mutex, MutexG... | the_stack |
use super::{
array::Array, private::Wrapper as WrapperPriv, DataTypeRef, SimpleVectorRef, TypeNameRef,
ValueRef, Wrapper,
};
use crate::error::{JuliaResultRef, CANNOT_DISPLAY_TYPE};
use crate::layout::typecheck::{Concrete, Typecheck};
use crate::memory::frame::Frame;
use crate::wrappers::ptr::value::Value;
use ... | the_stack |
use std::fmt;
use std::mem;
use std::cmp::Ordering;
use phf::Map;
use grammar::token::Token;
pub use self::Method::*;
macro_rules! method_enum {
($(
$ident:ident,
$bytes:expr,
$safe:ident,
$idempotent:ident,
#[$doc:meta];
)*) => {
static REGISTERED_METHODS: Ma... | the_stack |
use super::value::Value;
use crate::{constant_pool::ConstantId, function::FunctionId, global_val::GlobalVariableId};
use id_arena::*;
use rustc_hash::{FxHashMap, FxHashSet};
use std::convert::From;
use std::fmt;
use std::{
cell::RefCell,
cell::{Ref, RefMut},
rc::Rc,
};
#[derive(Clone)]
pub struct Types {
... | the_stack |
extern crate unrust;
#[macro_use]
extern crate unrust_derive;
use unrust::actors::{FirstPersonCamera, ShadowPass, SkyBox};
use unrust::engine::{AssetError, AssetSystem, DirectionalLight, GameObject, Light, Material, Mesh,
ObjMaterial, PointLight, Prefab, RenderQueue, TextureWrap};
use unrust::math... | the_stack |
//! (Animated) GIF support.
//!
//! GIF is treated as both a container and a video codec.
#![allow(non_snake_case)]
use container;
use pixelformat::{Palette, PixelFormat, RgbColor};
use streaming::StreamReader;
use timing::Timestamp;
use videodecoder;
use byteorder::{LittleEndian, WriteBytesExt, ReadBytesExt};
use l... | the_stack |
#[allow(unused)]
fn runner() -> crate::TestRunner {
super::runner()
.mock_file("conflict/_left.scss", "$a: left;\n")
.mock_file("conflict/_midstream.scss", "@use \"left\" as *;\n@use \"right\" as *;\n\n$a: c !default;\n")
.mock_file("conflict/_right.scss", "$a: right;\n")
.mock_file(... | the_stack |
use colored::*;
use dicom::core::dictionary::{DataDictionary, DictionaryEntry};
use dicom::core::header::Header;
use dicom::core::value::{PrimitiveValue, Value as DicomValue};
use dicom::core::VR;
use dicom::encoding::transfer_syntax::TransferSyntaxIndex;
use dicom::object::mem::{InMemDicomObject, InMemElement};
use di... | the_stack |
// Crypto primitives used by the remote attestation protocol.
//
// Should be kept in sync with the Java implementation of the remote attestation
// protocol.
use crate::message::EncryptedData;
use anyhow::{anyhow, Context};
use ring::{
aead::{self, BoundKey},
agreement,
hkdf::{Salt, HKDF_SHA256},
rand... | the_stack |
use crate::array::Array;
use crate::attr::Attr;
use crate::bitmap::Bitmap;
use crate::codec::{Codec, Single};
use crate::error::{Error, Result};
use smallvec::SmallVec;
use std::collections::BTreeSet;
use std::sync::Arc;
use xngin_datatype::PreciseType;
/// Sel encodes filter indexes into bitmap, single or none.
#[der... | the_stack |
use super::win;
use crate::message_parser;
use crate::message_parser::{
ClientServerInfo, MessageData, MessageInfo, MessageParser, StreamData,
};
use crate::search_expr;
use crate::search_expr::OperatorNegation;
use crate::tshark_communication::TcpStreamId;
use crate::widgets::comm_target_card::{CommTargetCardData,... | the_stack |
use std::io::Write;
use std::ops::Range;
use std::sync::Arc;
use std::{fs, io, path, process};
use codespan_reporting::diagnostic::{Diagnostic, Label, Severity};
use codespan_reporting::files::Files as _;
use tempfile::NamedTempFile;
use arret_syntax::span::{FileId, Span};
use arret_compiler::{emit_diagnostics_to_s... | the_stack |
use std::cell::RefCell;
use std::num::Wrapping;
use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Mul, Rem, Sub};
use std::rc::Rc;
use model::class_file::access_flags::class_access_flags;
use vm::{sig, symref};
use vm::bytecode::opcode;
use vm::class::Class;
use vm::class_loader::ClassLoader;
use vm::constant_pool::Run... | the_stack |
use super::*;
#[test_suite(schema(to_one_composites), only(MongoDb))]
mod is_set_to_one {
#[connector_test]
async fn basic(runner: Runner) -> TestResult<()> {
create_to_one_test_data(&runner).await?;
insta::assert_snapshot!(
run_query!(&runner, r#"{ findManyTestModel(where: { b: { i... | the_stack |
//! Event handling components
use super::ScrollDelta::{LineDelta, PixelDelta};
use super::{Command, CursorIcon, Event, EventMgr, PressSource, Response, Scroll};
use crate::cast::traits::*;
use crate::geom::{Coord, Offset, Rect, Size, Vec2};
#[allow(unused)]
use crate::text::SelectionHelper;
use crate::{TkAction, Widge... | the_stack |
use super::DeviceCopy;
use crate::error::*;
use crate::memory::malloc::{cuda_free_locked, cuda_malloc_locked};
use std::mem;
use std::ops;
use std::ptr;
use std::slice;
/// Fixed-size host-side buffer in page-locked memory.
///
/// See the [`module-level documentation`](../memory/index.html) for more details on page-l... | the_stack |
use std::collections::HashMap;
use crate::{
genetic::{Children, Parents, ParentsSlice},
operator::{CrossoverOp, GeneticOperator},
random::{random_cut_points, Rng},
};
/// The `OrderOneCrossover` operator combines permutation encoded
/// `genetic::Genotype`s according the order one crossover scheme (OX1).
... | the_stack |
use super::test::{results, Test};
use crossterm::event::KeyCode;
use crossterm::event::KeyEvent;
use results::Fraction;
use std::iter;
use tui::{
buffer::Buffer,
layout::{Constraint, Direction, Layout, Rect},
style::{Color, Modifier, Style},
symbols::Marker,
text::{Span, Spans, Text},
widgets::... | the_stack |
use crate::builder::{Builder, Kind, RunConfig, ShouldRun, Step};
use crate::cache::Interned;
use crate::compile::{add_to_sysroot, run_cargo, rustc_cargo, rustc_cargo_env, std_cargo};
use crate::config::TargetSelection;
use crate::tool::{prepare_tool_cargo, SourceType};
use crate::INTERNER;
use crate::{Compiler, Mode, S... | the_stack |
use crate::token::{Token, TokenWithSpan};
use crate::error::LiveError;
use crate::ident::{Ident, IdentPath, QualifiedIdentPath};
use crate::span::{Span, LiveBodyId};
use crate::lit::Lit;
use crate::ty::TyLit;
use crate::math::*;
use crate::livestyles::{LiveStyles, LiveStyle};
use crate::livetypes::{Font, LiveItemId, Pl... | the_stack |
use core::cell::Cell;
use kernel::hil::i2c::{self, I2CClient, I2CDevice};
use kernel::hil::sensors::{HumidityClient, HumidityDriver, TemperatureClient, TemperatureDriver};
use kernel::utilities::cells::{OptionalCell, TakeCell};
use kernel::ErrorCode;
const REG_AUTO_INCREMENT: u8 = 1 << 7;
const CTRL_REG1: u8 = 0x20;
c... | the_stack |
use ::serde::{Deserialize, Serialize};
use chrono::{DateTime, NaiveDateTime, Utc};
use futures::future::join_all;
use log::{debug, error};
use rusoto_core::Region;
use rusoto_dynamodb::*;
use rusoto_ec2::{DescribeRegionsRequest, Ec2, Ec2Client};
use std::{
io::{self, Error as IOError, Write},
time,
};
use dial... | the_stack |
use crate::parser::{expected_any, expected_node, ParserProgress, RecoveryResult, ToDiagnostic};
use crate::syntax::binding::parse_binding;
use crate::syntax::js_parse_error::{
duplicate_assertion_keys_error, expected_binding, expected_export_name,
expected_export_name_after_as_keyword, expected_local_name_for_default... | the_stack |
use crate::utils;
use std::time::Duration;
use failure::Error;
use futures::channel::{mpsc, oneshot};
use futures::future;
use futures::stream::StreamExt;
pub use libp2p::gossipsub::Topic;
use libp2p::gossipsub::{self, Gossipsub, GossipsubMessage, MessageId};
use libp2p::gossipsub::{GossipsubEvent, TopicHash};
pub us... | the_stack |
use crate::doppelganger_service::DoppelgangerService;
use crate::{
http_api::{ApiSecret, Config as HttpConfig, Context},
initialized_validators::InitializedValidators,
Config, ValidatorDefinitions, ValidatorStore,
};
use account_utils::{
eth2_wallet::WalletBuilder, mnemonic_from_phrase, random_mnemonic,... | the_stack |
/// Conversions from N-dimensional points (called axes, following Skilling's usage) to Hilbert curve indices and back again.
///
/// - Converting from an N-dimensional point to a 1-Dimensional Hilbert Index will be called the **Hilbert Transform**.
/// - Converting from the Hilbert Index back to the N-Dimensional ... | the_stack |
mod ast;
mod lexer;
mod parser;
const ANON_KEY: &'static str = "*anon*";
pub type ParseError = parser::Error;
pub fn parse_gdb_value<'s>(result_string: &'s str) -> Result<Node, ParseError> {
let lexer = lexer::Lexer::new(result_string);
parser::parse(lexer, result_string)
}
#[derive(Debug, PartialEq)]
pub e... | the_stack |
use std::fmt::{Debug, Formatter};
use std::io::SeekFrom;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use std::time::{SystemTime, UNIX_EPOCH};
use anyhow::Result;
use bytes::{Buf, BufMut, Bytes, BytesMut};
use dashmap::DashMap;
use dav_server::{
davpath::DavPath,
fs::{
DavDirEntry, DavFile, DavF... | the_stack |
extern crate html5ever;
#[macro_use]
extern crate lazy_static;
use html5ever::rcdom::{Handle, NodeData, RcDom};
use html5ever::serialize::{serialize, SerializeOpts};
use html5ever::{driver as html, QualName};
use pulldown_cmark::{Options, Parser};
use regex::Regex;
use std::collections::HashSet;
use std::mem;
use std... | the_stack |
extern crate rand;
mod regspec;
mod operand;
mod display;
mod evex_generated;
mod reuse_test;
use std::fmt::Write;
use yaxpeax_arch::{AddressBase, Decoder, LengthedInstruction};
use yaxpeax_x86::long_mode::InstDecoder;
fn test_invalid(data: &[u8]) {
test_invalid_under(&InstDecoder::default(), data);
}
fn test_... | the_stack |
use super::{constants::*, pack::IdError};
use std::{
borrow::Cow,
collections::{HashMap, HashSet},
fs, io,
io::{Read, Write},
path::{Path, PathBuf},
str::FromStr,
time::SystemTime,
};
use crypto::digest::Digest;
use crypto::sha1::Sha1;
use log::{error, info, warn};
use walkdir::WalkDir;
u... | the_stack |
use std::io;
use std::io::BufRead;
use std::io::Read;
use std::mem;
#[cfg(feature = "bytes")]
use crate::bytes::Bytes;
#[cfg(feature = "bytes")]
use crate::chars::Chars;
use crate::buf_read_iter::BufReadIter;
use crate::enums::ProtobufEnum;
use crate::error::ProtobufError;
use crate::error::ProtobufResult;
use crate:... | the_stack |
use regex::Regex;
use rustling::{RuleError, RuleResult, RuleSetBuilder, RustlingResult};
use rustling_ontology_moment::{Grain, PeriodComp, Weekday};
use rustling_ontology_values::dimension::*;
use rustling_ontology_values::helpers;
pub fn rules_finance(b: &mut RuleSetBuilder<Dimension>) -> RustlingResult<()> {
b.r... | the_stack |
//! Local state for known hashes and their external location (blob reference).
use blob;
use crypto;
use db;
use errors::{DieselError, RetryError};
use std::sync::{Arc, Mutex, MutexGuard};
use tags;
use util::UniquePriorityQueue;
pub mod tree;
#[cfg(test)]
mod tests;
#[cfg(all(test, feature = "benchmarks"))]
mod ... | the_stack |
//! Adapted from control_flow_graph for Bytecode, this module defines the control-flow graph on
//! Stackless Bytecode used in analysis as part of Move prover.
use crate::{
function_target::FunctionTarget,
stackless_bytecode::{Bytecode, Label},
};
use move_binary_format::file_format::CodeOffset;
use petgraph::... | the_stack |
//! Filesystem walk.
//!
//! - Performed in parallel using rayon
//! - Entries streamed in sorted order
//! - Custom sort/filter/skip/state
//!
//! # Example
//!
//! Recursively iterate over the "foo" directory sorting by name:
//!
//! ```no_run
//! # use std::io::Error;
//! use jwalk::{WalkDir};
//!
//! # fn try_main(... | the_stack |
use std::fmt;
use std::io;
use std::io::SeekFrom;
use std::path;
use std::path::PathBuf;
use crate::framework::context::Context;
use crate::framework::error::{GameError, GameResult};
use crate::framework::vfs;
use crate::framework::vfs::{OpenOptions, VFS};
/// A structure that contains the filesystem state and cache.... | the_stack |
#![cfg_attr(test, feature(test))]
#[cfg(test)]
extern crate test;
#[macro_use]
extern crate lazy_static;
extern crate rshader;
mod asset;
mod cache;
mod coordinates;
mod generate;
mod gpu_state;
mod mapfile;
mod sky;
mod srgb;
mod stream;
mod terrain;
mod types;
mod utils;
use crate::cache::{LayerType, MeshCacheDes... | the_stack |
#[macro_use]
extern crate log;
#[cfg(target_os = "macos")]
#[macro_use]
extern crate objc;
#[cfg(not(feature = "use-rtld-next"))]
use ash::Entry;
#[cfg(feature = "use-rtld-next")]
type Entry = ash::EntryCustom<()>;
use ash::{
extensions::{ext, khr, nv::MeshShader},
version::{DeviceV1_0, EntryV1_0, InstanceV1_... | the_stack |
use build::{BlockAnd, BlockAndExtension, Builder};
use build::expr::category::{Category, RvalueFunc};
use mir::*;
use syntax::ast::{self, ExprKind};
use syntax::codemap::Span;
use syntax::ptr::P;
impl<'a, 'b: 'a> Builder<'a, 'b> {
pub fn into_expr(&mut self,
destination: Lvalue,
... | the_stack |
use std::net::{Ipv4Addr, SocketAddr};
use std::sync::{Arc, RwLock};
use std::time::Duration;
use tokio::io::BufReader;
use tokio::net::tcp::WriteHalf;
use tokio::net::TcpListener;
use tokio::prelude::*;
use tokio::select;
use tokio::sync::mpsc;
use tokio::time::sleep;
use bitcoin::hashes::{hash160::Hash as Hash160, H... | the_stack |
use std::io::Read;
use bitflags::bitflags;
use futures_io::AsyncWrite;
use futures_util::{
io::{BufReader, BufWriter},
AsyncReadExt,
AsyncWriteExt,
};
use super::header::{Header, OpCode};
use crate::{
bson_util,
cmap::{
conn::{command::RawCommand, wire::util::SyncCountReader},
Comm... | the_stack |
//! Get the metadata of the current enclave.
//!
//! This mod has clear interface and is easy to understand. Currently we don't
//! have time for its documents.
use sgx_types::metadata::*;
use sgx_types::*;
pub const LAYOUT_ENTRY_NUM: usize = 42;
#[link(name = "sgx_trts")]
extern "C" {
static g_global_data: glob... | the_stack |
use super::*;
use crate::domain::*;
use opendatafabric::serde::flatbuffers::*;
use opendatafabric::*;
use dill::*;
use std::path::{Path, PathBuf};
use std::sync::Arc;
pub struct SyncServiceImpl {
workspace_layout: Arc<WorkspaceLayout>,
metadata_repo: Arc<dyn MetadataRepository>,
repository_factory: Arc<Re... | the_stack |
//! Sub-menu
use super::{BoxedMenu, Menu, SubItems};
use crate::{AccelLabel, Mark, PopupFrame};
use kas::event::{Command, Scroll};
use kas::layout::{self, RulesSetter, RulesSolver};
use kas::prelude::*;
use kas::theme::{FrameStyle, MarkStyle, TextClass};
use kas::WindowId;
impl_scope! {
/// A sub-menu
#[autoi... | the_stack |
use super::property::*;
use super::viewmodel::*;
use desync::{Desync};
use flo_stream::*;
use flo_binding::*;
use flo_binding::binding_context::*;
use futures::*;
use futures::stream;
use futures::stream::{BoxStream};
use futures::task;
use futures::task::{Poll, Context, Waker};
use std::pin::*;
use std::sync::*;
us... | the_stack |
#![allow(clippy::unnecessary_wraps)]
use exonum::{
crypto,
helpers::{Height, ValidatorId},
merkledb::ObjectHash,
messages::{AnyTx, Verified},
runtime::{
ArtifactId, CommonError, ErrorMatch, InstanceId, RuntimeIdentifier, SnapshotExt,
SUPERVISOR_INSTANCE_ID,
},
};
use exonum_rust... | the_stack |
use std::f64::{EPSILON, consts::PI};
use nalgebra_glm as glm;
use glm::{DVec2, DVec3, DVec4, DMat4};
use nurbs::{AbstractSurface, NDBSplineSurface, SampledSurface};
use crate::{Error, mesh::Vertex};
// Represents a surface in 3D space, with a function to project a 3D point
// on the surface down to a 2D space.
#[der... | the_stack |
use static_map;
use font_types::{Symbol, AtomType};
pub static SYMBOLS: static_map::Map<&'static str, Symbol> = static_map! {
Default: Symbol { unicode: 0x00, atom_type: AtomType::Accent },
// unicode-math.dtx command table
"mathexclam" => Symbol { unicode: 0x21, atom_type: AtomType::Close }, // 33
"ma... | the_stack |
#![allow(clippy::all)]
// So we don't get warned about intentionally calling `drain_filter()` on a const struct, or warned
// about incomplete features.
#![allow(const_item_mutation, incomplete_features)]
// To be clear, as a "regular end user" of this crate, you will not necessarily need all or even any
// of the abov... | the_stack |
#[macro_use]
extern crate clap;
#[macro_use]
extern crate failure;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate tracing;
mod backend;
mod convert;
mod referred_tables;
mod rewrite;
mod schema;
mod utils;
use crate::backend::NoriaBackend;
use futures_util::future::FutureExt;
use futures_util::strea... | the_stack |
use crate::error::CliError;
use grid_sdk::protocol::schema::state::DataType;
use serde_yaml::{Mapping, Sequence, Value};
/**
* Given a yaml object, parse it as a sequence
*
* property - Yaml object we wish to parse in as a sequence
*/
pub fn parse_value_as_sequence(
property: &Mapping,
key: &str,
) -> Resu... | the_stack |
use super::super::blocks::sequence_section::ModeType;
use super::super::blocks::sequence_section::Sequence;
use super::super::blocks::sequence_section::SequencesHeader;
use super::bit_reader_reverse::BitReaderReversed;
use super::scratch::FSEScratch;
use crate::fse::FSEDecoder;
pub fn decode_sequences(
section: &S... | the_stack |
// === Standard Linter Configuration ===
#![deny(non_ascii_idents)]
#![warn(unsafe_code)]
// === Non-Standard Linter Configuration ===
#![warn(missing_copy_implementations)]
#![warn(missing_debug_implementations)]
#![warn(missing_docs)]
#![warn(trivial_casts)]
#![warn(trivial_numeric_casts)]
#![warn(unused_import_brace... | the_stack |
use crate::address::{PAddr, VAddr};
use crate::bootinfo::{AllowedPciDevice, BootInfo, RamArea, VirtioMmioDevice};
use arrayvec::{ArrayString, ArrayVec};
use core::cmp::max;
use core::mem::size_of;
use core::slice;
use kerla_utils::alignment::align_up;
use kerla_utils::byte_size::ByteSize;
const MULTIBOOT_MAGIC_LEGACY:... | the_stack |
use crate::{CheckButton, Label, PopupEvent, Slider, SliderEvent, common::*};
use crate::{Dropdown, DropdownEvent, Textbox, TextboxEvent, CheckboxEvent};
#[derive(PartialEq, Debug)]
pub enum LengthBoxEvent {
SetType(Units),
SetValue(f32, bool),
Reset(bool),
}
pub struct LengthBox {
name: String,
... | the_stack |
use parking_lot::Mutex;
use rustc_hash::FxHashMap;
use std::cmp::min;
use std::convert::TryInto;
use std::error::Error;
use std::fmt::Debug;
use std::fs;
use std::io::Write;
use std::sync::Arc;
const MAX_PAGE_SIZE: usize = 256 * 1024;
/// The number of bytes we consider enough to warrant their own page when
/// decid... | the_stack |
use crate::data::{DynamoDbClient};
use crate::db_connectors::dynamodb::{get_db, Memory, MemoryGetInfo, MemoryDeleteInfo, DynamoDbKey};
use crate::{
encrypt::{decrypt_data, encrypt_data},
Client, ConversationInfo, EngineError,
};
use csml_interpreter::data::Memory as InterpreterMemory;
use rusoto_dynamodb::*;
us... | the_stack |
use std::convert::Infallible;
use std::str::FromStr;
use std::sync::Arc;
use crate::prelude::*;
use serde::Deserialize;
use serde_json::json;
use warp::Reply;
use crate::datastore::{self, EventQueryParams};
use crate::elastic;
use crate::server::filters::GenericQuery;
use crate::server::response::Response;
use crate:... | the_stack |
use bit_field::Error as BitFieldError;
use bit_field::*;
use data_model::DataInit;
use std::fmt::{self, Display};
use vm_memory::GuestAddress;
#[derive(Debug)]
pub enum Error {
UnknownTrbType(BitFieldError),
CannotCastTrb,
}
type Result<T> = std::result::Result<T, Error>;
impl Display for Error {
fn fmt(... | the_stack |
use quick_xml::events::{Event, BytesDecl};
use quick_xml::Writer;
use std::io;
use std::collections::BTreeSet;
use ::structs::Spreadsheet;
use ::structs::Worksheet;
use ::structs::SharedStringTable;
use ::structs::Stylesheet;
use super::driver::*;
use super::XlsxError;
const SUB_DIR: &'static str = "xl/worksheets";
p... | the_stack |
use anyhow::{bail, Result};
use async_trait::async_trait;
use barcoders::{
generators::{image::Image, svg::SVG},
sym::code39::Code39,
};
use google_drive::{
traits::{DriveOps, FileOps},
Client as GoogleDrive,
};
use log::warn;
use macros::db;
use reqwest::StatusCode;
use schemars::JsonSchema;
use serde:... | the_stack |
use super::*;
/// Structure to contain all possible variables which can be returned
/// by the standard telemetry message's `rotating_variable` fields
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RotatingTelemetry {
/// IGRF magnetic fields (X, Y, Z) (Tesla)
pub b_field_igrf: [f32; 3],
/// ECI Su... | the_stack |
use itertools::Itertools;
use std::collections::HashMap;
use std::convert::TryInto;
use std::fmt;
use std::time::Instant;
#[derive(Debug)]
struct RareResults {
digits: u8,
time_to_find: u128,
counter: u32,
number: u64,
}
impl fmt::Display for RareResults {
fn fmt(&self, f: &mut fmt::Formatter) -> ... | the_stack |
use std::{
any::TypeId,
collections::{hash_map::Entry, HashMap},
fmt::{Display, Formatter},
hash::{BuildHasherDefault, Hasher},
marker::PhantomData,
};
use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
use downcast_rs::{impl_downcast, Downcast};
use crate::internals::{
hash::Compon... | the_stack |
use std::io::{ Write, Error, ErrorKind };
use super::super::classfile::*;
pub struct ClassWriter<'a> {
target: &'a mut Write
}
impl<'a> ClassWriter<'a> {
pub fn new<T>(target: &'a mut T) -> ClassWriter where T: Write {
ClassWriter { target: target }
}
pub fn write_class(&mut self, classfile: ... | the_stack |
use kamu::domain::*;
use kamu::infra::*;
use kamu::testing::*;
use opendatafabric::*;
use chrono::prelude::*;
use std::assert_matches::assert_matches;
use std::convert::TryFrom;
use std::path::Path;
use std::sync::{Arc, Mutex};
macro_rules! n {
($s:expr) => {
DatasetName::try_from($s).unwrap()
};
}
m... | the_stack |
mod test_utils;
use rusoto_kms::KmsClient;
extern crate rusoto_mock;
use self::rusoto_mock::*;
use ring::rand::SystemRandom;
use rusoto_core::signature::SignedRequest;
use rusoto_core::{HttpDispatchError, Region};
use serde::{Deserialize, Deserializer};
use std::fs::File;
use std::io::BufReader;
use tough::key_source::... | the_stack |
use std::collections::HashSet;
use std::fs::File;
use std::io::{self, Seek, SeekFrom, Write, BufReader, BufRead, Read};
use std::os::unix::fs::{PermissionsExt};
use std::path::{Path, PathBuf};
use std::sync::Arc;
use futures::{Future, Stream};
use futures::stream::iter_ok;
use futures_cpupool::{self, CpuPool, CpuFutur... | the_stack |
use std::str::from_utf8;
use rand::{thread_rng, Rng};
use tk_bufstream::Buf;
use byteorder::{BigEndian, ByteOrder};
use super::{Packet};
use websocket::error::ErrorEnum;
/// A borrowed frame of websocket data
#[derive(Debug, Clone, PartialEq)]
pub enum Frame<'a> {
/// Ping mesage
Ping(&'a [u8]),
/// Pon... | the_stack |
use std::any::Any;
use style::{property::Property, render_tree::RenderNodeRef, values::prelude::Position};
use crate::{
box_model::{BoxComponent, Dimensions},
formatting_context::{FormattingContext, LayoutContext},
layout_box::{
apply_explicit_sizes, children_are_inline, get_containing_block, Layo... | the_stack |
use std::collections::VecDeque;
use std::convert::TryFrom;
use std::convert::TryInto;
use std::ffi::c_void;
use color_eyre::eyre::anyhow;
use color_eyre::eyre::Error;
use color_eyre::Result;
use windows::core::Result as WindowsCrateResult;
use windows::Win32::Foundation::BOOL;
use windows::Win32::Foundation::HANDLE;
u... | the_stack |
use crate::config::PageServerConf;
use crate::layered_repository::delta_layer::{DeltaLayer, DeltaLayerWriter};
use crate::layered_repository::ephemeral_file::EphemeralFile;
use crate::layered_repository::filename::DeltaFileName;
use crate::layered_repository::image_layer::{ImageLayer, ImageLayerWriter};
use crate::laye... | the_stack |
#![warn(clippy::all)]
/*!
Wrapper for PxArticulationBase
*/
use crate::{
articulation::Articulation,
articulation_joint_base::ArticulationJointBase,
articulation_link::ArticulationLink,
articulation_reduced_coordinate::ArticulationReducedCoordinate,
base::Base,
base::ConcreteType,
math::P... | the_stack |
use std::fs::File;
use std::io::{BufWriter, Read, Write};
use std::path::PathBuf;
use std::{thread, time};
use bellman::groth16;
use pairing::bls12_381::Bls12;
use pairing::Engine;
use sapling_crypto::jubjub::JubjubBls12;
use sector_base::api::disk_backed_storage::REAL_SECTOR_SIZE;
use sector_base::api::sector_store:... | the_stack |
//! Defines the parser for the Documentation Compiler.
//! It uses all the lexical items and creates a structured text.
use crate::lexer::LexicalContent;
use crate::lexer::LexicalItem;
use crate::source::Location;
use crate::DocCompiler;
use std::rc::Rc;
/// Defines parsed text.
///
/// A text holds paragraphs.
pub s... | the_stack |
use std::{thread, time};
pub use spacepacket::SpacePacket;
pub use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use std::net::{ UdpSocket};
use std::net::{ SocketAddr, Ipv4Addr};
use std::sync::{Arc, Mutex};
use std::process::{Command};
use Config;
pub enum FlagCmds {
ShutdownCommand,
SleepCommand{in... | the_stack |
use reporter::{Diagnostic, Note, Severity};
use std::collections::{BTreeMap, HashSet};
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Debug, Copy, Clone)]
enum MarkerStyle {
// ~~~~~ or ____~
Secondary,
// ^^^^^ or ____^
Primary,
}
impl MarkerStyle {
fn from_note_index(index: usize) -> MarkerStyle... | the_stack |
use futures::{
Future,
Stream,
Sink,
lazy
};
use futures::future::{loop_fn, Loop, Either};
use futures::sync::mpsc::{UnboundedSender, unbounded};
use futures::sync::oneshot::{
Sender as OneshotSender,
channel as oneshot_channel
};
#[cfg(feature="mocks")]
use crate::mocks;
use crate::utils as client_utils;... | the_stack |
extern crate gl;
extern crate opengl_graphics;
use gl_backend::opengl_graphics::shader_utils::{
compile_shader,
uniform_location
};
use crate::*;
/// Stores scene data.
pub struct Scene {
/// Scene settings.
pub settings: SceneSettings,
/// Projection transform.
pub projection: Matrix4<f32>,
... | the_stack |
use std::collections::HashMap;
use std::fmt;
use std::io;
use std::sync::mpsc::{Sender, Receiver};
use std::sync::mpsc;
use std::thread;
use http::{StreamId, HttpError, Response, StaticResponse, Header, HttpResult, StaticHeader};
use http::frame::{RawFrame, FrameIR};
use http::transport::TransportStream;
use http::co... | the_stack |
use support::{decl_module, decl_storage, decl_event, ensure, StorageValue, dispatch::Result, traits::Get};
use system::ensure_signed;
use primitive_types::H256;
use rstd::prelude::Vec;
use rstd::vec;
use codec::{Encode, Decode};
use accumulator::*;
/// At the moment, this particular struct resembles more closely an NF... | the_stack |
//! This module implements conversion from/to `Value` for `time` types.
#![cfg(feature = "time")]
use std::str::from_utf8;
use time::{Date, ParseError, PrimitiveDateTime, Time};
use crate::value::Value;
use super::{parse_mysql_time_string, ConvIr, FromValueError, ParseIr};
impl ConvIr<PrimitiveDateTime> for Parse... | the_stack |
use crate::register_space::{Register, RegisterSpace};
/// Max interrupter number.
pub const MAX_INTERRUPTER: u8 = 1;
/// For port configuration, see register HCSPARAMS1, spcap1.3 and spcap2.3.
pub const MAX_SLOTS: u8 = 16;
/// Usb 2 ports start from port number 0.
pub const USB2_PORTS_START: u8 = 0;
/// Last usb 2 po... | the_stack |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.