text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
use super::wasmedge; use crate::{ error::{check, VmError, WasmEdgeError, WasmEdgeResult}, instance::function::FuncType, types::{HostRegistration, WasmEdgeString}, utils, Config, ImportObj, Module, Statistics, Store, Value, }; use std::path::Path; /// Struct of WasmEdge Vm. /// /// A [`Vm`] defines a vi...
the_stack
use crate::types::{RootMarkers, ToUsize}; use anyhow::{anyhow, Result}; use log::*; use lsp_types::{CodeAction, Position, TextEdit, Url}; use serde_json::json; use serde_json::Value; use std::{ collections::{HashMap, HashSet}, path::Path, str::FromStr, }; pub fn escape_single_quote<S: AsRef<str>>(s: S) -> ...
the_stack
use core::ops::Range; use displaydoc::Display; use crate::attribute::NtfsAttributeType; use crate::types::NtfsPosition; use crate::types::{Lcn, Vcn}; /// Central result type of ntfs. pub type Result<T, E = NtfsError> = core::result::Result<T, E>; /// Central error type of ntfs. #[derive(Debug, Display)] #[non_exhau...
the_stack
use std::borrow::ToOwned; use std::collections::HashMap; use std::fmt; use std::mem::{self, MaybeUninit}; use std::ptr; use std::sync::Arc; use std::sync::Mutex; use std::time::Duration; use crate::binding::*; use crate::chkerr; use crate::new_odpi_str; use crate::oci_attr::data_type::{AttrValue, DataType}; use crate:...
the_stack
use std::env; use std::fs::read_to_string; use std::io::Error as IoError; use std::io::ErrorKind; use std::io::Write; use std::path::{Path, PathBuf}; use std::collections::HashMap; use std::fs::File; use std::fs::create_dir_all; use thiserror::Error; use tracing::debug; #[cfg(not(target_arch = "wasm32"))] use dirs::ho...
the_stack
use crate::{ geometry::UP, voxel::{voxel_containing_point, IsFloor}, }; use amethyst::core::math::{Point3, Vector3}; use building_blocks::prelude::*; use itertools::Itertools; /// Returns all numbers `t` such that `bias + slope * t` is an integer and `t_0 <= t <= t_f`. /// Always returns empty vector for cons...
the_stack
use crate::error::TokenizerError; use crate::tokenizer::tokenization_utils::{clean_text, lowercase}; use crate::tokenizer::tokenization_utils::{ split_on_punct, split_on_special_tokens, strip_accents, tokenize_cjk_chars, truncate_sequences, whitespace_tokenize, }; use crate::vocab::Vocab; use itertools::Itertoo...
the_stack
use crate::{valid_subslice, SystemStateAccessor}; use ic_ic00_types::IC_00; use ic_interfaces::execution_environment::{HypervisorError, HypervisorResult}; use ic_logger::{info, ReplicaLogger}; use ic_registry_routing_table::{resolve_destination, RoutingTable}; use ic_registry_subnet_type::SubnetType; use ic_types::{ ...
the_stack
use crate::ptr::{self, NonNull}; use crate::mem; use crate::cell::UnsafeCell; use crate::slice; use crate::ops::{Deref, DerefMut, Index, IndexMut, CoerceUnsized}; use crate::slice::SliceIndex; use fortanix_sgx_abi::*; use super::super::mem::is_user_range; /// A type that can be safely read from or written to userspac...
the_stack
use crate::common; use aptos_types::transaction::{ ArgumentABI, ScriptABI, ScriptFunctionABI, TransactionScriptABI, TypeArgumentABI, }; use heck::{CamelCase, ShoutySnakeCase}; use move_deps::move_core_types::{ account_address::AccountAddress, language_storage::{ModuleId, TypeTag}, }; use serde_generate::{ ...
the_stack
use std::{ collections::HashMap, fmt::Debug, os::unix::prelude::{IntoRawFd, RawFd}, }; use enumflags2::BitFlags; use futures::TryFutureExt; use serde::{Deserialize, Serialize}; use serde_repr::{Deserialize_repr, Serialize_repr}; use zvariant::{OwnedFd, Value}; use zvariant_derive::{DeserializeDict, Seriali...
the_stack
//! The types for the dataflow crate. //! //! These are extracted into their own crate so that crates that only depend //! on the interface of the dataflow crate, and not its implementation, can //! avoid the dependency, as the dataflow crate is very slow to compile. use std::collections::{BTreeMap, HashMap, HashSet};...
the_stack
use std::collections::hash_map::{Entry, HashMap}; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::sync::Arc; use std::time::{Duration}; use bytes::Bytes; use futures::prelude::*; use futures::{pin_mut}; use quick_error::quick_error; use tokio::sync::{mpsc, oneshot}; use tokio::select; use crate::app_messages; ...
the_stack
use crate::cmd_ctags::CmdCtags; use crate::cmd_git::CmdGit; use dirs; use failure::{Error, ResultExt}; use serde_derive::{Deserialize, Serialize}; use std::fs; use std::io::BufRead; use std::io::{stdout, BufWriter, Read, Write}; use std::path::PathBuf; use std::process::Output; use std::str; use structopt::{clap, Struc...
the_stack
use super::types::*; use crate::types::{Field, Function, Type}; use crate::{pretty_parse, Error, Result}; use std::collections::{BTreeMap, BTreeSet}; use std::path::{Path, PathBuf}; pub struct Env<'a> { pub te: &'a mut TypeEnv, pub pre: bool, } #[derive(Debug, Clone, Default)] pub struct TypeEnv(pub BTreeMap<...
the_stack
use std::collections::VecDeque; use std::fmt; use std::io; use std::io::Write; use crate::config::{Color, Config, Verbosity}; #[derive(Debug, PartialEq)] pub enum DiffLine { Context(String), Expected(String), Resulting(String), } #[derive(Debug, PartialEq)] pub struct Mismatch { /// The line number i...
the_stack
use crate::errors::{BulletproofError, R1CSError}; use crate::r1cs::linear_combination::AllocatedQuantity; use crate::r1cs::{ConstraintSystem, LinearCombination, Variable}; use amcl_wrapper::field_elem::FieldElement; use super::{constrain_lc_with_scalar, get_bit_count}; use crate::r1cs::gadgets::helper_constraints::{ge...
the_stack
use std::path::Path; use amethyst::{ animation::{ get_animation_set, AnimationBundle, AnimationCommand, AnimationControlSet, AnimationSet, EndControl, VertexSkinningBundle, }, assets::{ AssetLoaderSystemData, AssetStorage, Completion, Handle, Loader, PrefabLoader, PrefabLoad...
the_stack
use std::env::var_os; use std::path::{Path, PathBuf}; use std::str::FromStr; use crate::connection::Connection; use crate::errors::ReplyError; use crate::protocol::xproto::{AtomEnum, ConnectionExt as _}; mod matcher; mod parser; /// Maximum nesting of #include directives, same value as Xlib uses. /// After following...
the_stack
use ansi_term::Style; use chrono::{Datelike, Local, NaiveDate}; use clap::{App, Arg}; use itertools::izip; use std::{error::Error, str::FromStr}; #[derive(Debug)] pub struct Config { month: Option<u32>, year: i32, today: NaiveDate, } type MyResult<T> = Result<T, Box<dyn Error>>; const LINE_WIDTH: usize =...
the_stack
use crate::types::LocalPid; use crate::wrapper::{NIF_ENV, NIF_TERM}; use crate::{Encoder, Term}; use std::marker::PhantomData; use std::ptr; use std::sync::{Arc, Weak}; /// Private type system hack to help ensure that each environment exposed to safe Rust code is /// given a different lifetime. The size of this type i...
the_stack
use fixtures::dep_helpers::{assert_link_order, GraphAssert, GraphMetadata, GraphQuery, GraphSet}; use guppy::{ graph::{ feature::{FeatureId, FeatureSet, StandardFeatures}, DependencyDirection, PackageGraph, Prop010Resolver, }, PackageId, }; use pretty_assertions::assert_eq; use proptest::{co...
the_stack
use fibers_rpc::server::{HandleCall, Reply, ServerBuilder as RpcServerBuilder}; use frugalos_core::tracer::{SpanExt, ThreadLocalTracer}; use futures::Future; use libfrugalos::schema::frugalos as rpc; use rustracing::tag::{StdTag, Tag}; use rustracing_jaeger::span::Span; use std::time::Duration; use trackable::error::Er...
the_stack
use crate::errors::PSError; use crate::keys::Verkey; use crate::signature::Signature; use crate::{ate_2_pairing, OtherGroup, OtherGroupVec, SignatureGroup, SignatureGroupVec}; use amcl_wrapper::field_elem::{FieldElement, FieldElementVector}; use amcl_wrapper::group_elem::{GroupElement, GroupElementVector}; use amcl_wra...
the_stack
use noria::{ControllerHandle, DataType, Table, TableOperation, View, ZookeeperAuthority}; use failure; use futures_executor::block_on as block_on_buffer; use msql_srv::{self, *}; use nom_sql::{ self, ColumnConstraint, InsertStatement, Literal, SelectStatement, SqlQuery, UpdateStatement, }; use std::borrow::Cow; u...
the_stack
// Example from Firecracker virtio block device // We test the parse function against an arbitrary guest memory #![allow(dead_code)] #![allow(unused_variables)] macro_rules! error { ( $( $x:expr ),* ) => {}; } struct MyError {} unsafe impl rmc::Invariant for MyError { fn is_valid(&self) -> bool { tru...
the_stack
use alloc::{SliceWrapper, Allocator}; use super::slice_util; use super::probability::interface::{CDF16, ProbRange}; use super::probability; use super::codec::copy::CopySubstate; use super::codec::dict::DictSubstate; use super::codec::literal::LiteralSubstate; use super::codec::context_map::PredictionModeSubstate; use s...
the_stack
// Coding conventions #![recursion_limit = "256"] #![deny(dead_code, missing_docs, warnings)] //! ElGamal encryption scheme with SECP256k1 curve. //! According to <https://crypto.stackexchange.com/a/45042> #[macro_use] extern crate amplify; use bitcoin_hashes::{sha256, Hash, HashEngine}; use secp256k1::{Secp256k1, S...
the_stack
use super::ipv4::Ipv4; use super::{Layer, LayerKind, LayerKinds}; use pnet::packet::tcp::{ self, MutableTcpOptionPacket, MutableTcpPacket, TcpFlags, TcpOption, TcpOptionNumber, TcpOptionNumbers, TcpOptionPacket, TcpPacket, }; use std::clone::Clone; use std::cmp::min; use std::fmt::{self, Display, Formatter}; us...
the_stack
use super::fsutil; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::convert::TryInto; use std::io::Read; use std::io::Seek; use std::io::Write; use std::os::unix::fs::MetadataExt; use std::path::{Path, PathBuf}; const RJ_NAME: &str = "rollback.journal"; // See fsutil for explanation of this...
the_stack
extern crate cgmath; extern crate froggy; #[macro_use] extern crate gfx; extern crate gfx_window_glutin; extern crate glutin; use cgmath::{Angle, EuclideanSpace, One, Rotation3, Transform, Zero}; use gfx::traits::{Device, Factory, FactoryExt}; use std::time; pub type ColorFormat = gfx::format::Srgba8; pub type DepthF...
the_stack
#![cfg_attr(feature = "strict", deny(warnings))] #![deny(clippy::all)] #![feature(maybe_uninit_uninit_array, new_uninit)] #![feature(try_blocks)] pub mod dpdk; pub mod memory; pub mod runtime; use crate::runtime::DPDKRuntime; use anyhow::Error; use catnip::{ file_table::FileDescriptor, interop::{ dmtr...
the_stack
//! ICMPv4 use core::convert::TryFrom; use core::fmt; use net_types::ip::{Ipv4, Ipv4Addr}; use packet::{BufferView, ParsablePacket, ParseMetadata}; use zerocopy::{AsBytes, ByteSlice, FromBytes, Unaligned}; use crate::error::{ParseError, ParseResult}; use crate::U32; use super::common::{IcmpDestUnreachable, IcmpEcho...
the_stack
use std::collections::HashMap; use std::time::Duration; use timely::communication::message::RefOrMut; use timely::dataflow::channels::pact::Pipeline; use timely::dataflow::operators::capture::Replay; use timely::dataflow::operators::generic::builder_rc::OperatorBuilder; use timely::dataflow::{Scope, Stream}; use timel...
the_stack
use super::*; use crate::consensus::Threshold; use crate::{NodeIndex, NumberOfNodes}; use std::collections::HashSet; use std::convert::TryFrom; use std::slice::Iter; #[cfg(test)] mod tests; /// Configures interactive DKG. // TODO (CRP-311): replace Config by DkgConfig in two steps: // 1. internally in crypto: conver...
the_stack
use shared_map::SharedMap; use kernel::sync::Mutex; use kernel::lib::ring_buffer::{RingBuf,AtomicRingBuf}; use core::sync::atomic::{AtomicUsize, Ordering}; use crate::nic::SparsePacket; use crate::Address; const IPV4_PROTO_TCP: u8 = 6; const MAX_WINDOW_SIZE: u32 = 0x100000; // 4MiB const DEF_WINDOW_SIZE: u32 = 0x4000;...
the_stack
pub struct DescribeFleetAttributesPaginator< C = aws_smithy_client::erase::DynConnector, M = crate::middleware::DefaultMiddleware, R = aws_smithy_client::retry::Standard, > { handle: std::sync::Arc<crate::client::Handle<C, M, R>>, builder: crate::input::describe_fleet_attributes_input::Builder, } i...
the_stack
use super::{attribute::*, derive::*, domain::*, inverse::*, unique::*}; use crate::{ ast::*, parser::{combinator::*, identifier::*, subsuper::*, types::*}, }; /// 215 explicit_attr = [attribute_decl] { `,` [attribute_decl] } `:` \[ OPTIONAL \] [parameter_type] `;` . pub fn explicit_attr(input: &str) -> ParseRe...
the_stack
use crate::{Sleep, SleepTrait, TimeServiceTrait, ZERO_DURATION}; use aptos_infallible::Mutex; use futures::future::Future; use std::{ cmp::max, collections::btree_map::BTreeMap, fmt::Debug, pin::Pin, sync::{Arc, MutexGuard}, task::{Context, Poll, Waker}, time::{Duration, Instant}, }; /// TO...
the_stack
use proc_macro2::{Span, TokenStream}; use quote::quote; use syn::parse::Error; use syn::spanned::Spanned; use crate::util::{expr_to_single_string, ident_to_type, path_to_single_string, strip_raw_ident_prefix}; #[derive(Debug)] pub struct FieldInfo<'a> { pub ordinal: usize, pub name: &'a syn::Ident, pub ge...
the_stack
use std::ffi::CStr; #[doc(alias = "GTK_IM_MODULE_EXTENSION_POINT_NAME")] pub static IM_MODULE_EXTENSION_POINT_NAME: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(ffi::GTK_IM_MODULE_EXTENSION_POINT_NAME) .to_str() .unwrap() }); #[doc(...
the_stack
use cpu::arith::{cmp8, cmp16, cmp32}; use cpu::cpu::{ get_seg, io_port_read8, io_port_read16, io_port_read32, io_port_write8, io_port_write16, io_port_write32, read_reg16, read_reg32, safe_read8, safe_read16, safe_read32s, safe_write8, safe_write16, safe_write32, set_reg_asize, test_privileges_for_io, trans...
the_stack
use crate::parser::single_token_parse_recovery::SingleTokenParseRecovery; use crate::parser::ParsedSyntax::{Absent, Present}; use crate::parser::{ParsedSyntax, RecoveryResult}; use crate::syntax::decl::{parse_formal_param_pat, parse_parameter_list}; use crate::syntax::expr::{parse_expr_or_assignment, parse_expression};...
the_stack
use crate::*; /// A genius(?) const min() /// /// # What this does /// * create an array of the two elements you want to choose between /// * create an arbitrary boolean expression /// * cast said expresison to a usize /// * use that value to index into the array created above /// /// # Source /// https://stackoverflo...
the_stack
use super::ipv4_header::Ipv4HeaderData; use byteorder::{BigEndian, ByteOrder}; use std::mem; pub struct TcpHeader<'a> { raw: &'a [u8], data: &'a TcpHeaderData, } pub struct TcpHeaderMut<'a> { raw: &'a mut [u8], data: &'a mut TcpHeaderData, } #[derive(Clone)] pub struct TcpHeaderData { source_port...
the_stack
pub const MIN_WIDE_BENCH_SIZE: u64 = 16; #[macro_export] macro_rules! bench_lib { ($libname:literal, $group:ident, $size:expr, $closure:expr) => { #[cfg(feature = $libname)] $group.bench_with_input( criterion::BenchmarkId::new($libname, $size), $size, $closure, ...
the_stack
use super::{ InteractionVisitor, InteractionVisitors, PathVisitor, PathVisitorContext, QueryParametersVisitor, QueryParametersVisitorContext, RequestBodyVisitor, RequestBodyVisitorContext, ResponseBodyVisitor, ResponseBodyVisitorContext, VisitorResults, }; use crate::interactions::result::{ InteractionDiffResul...
the_stack
//! Implements peer membership and gossip protocol to communicate in P2P fashion //! //! Every peer has a unique name and manages a certain number of open connections to other peers //! (atm fully connected to all peers). After a connection is established all known peers are //! exchanged, resulting in a global members...
the_stack
use crate::models; #[cfg(any(feature = "client", feature = "server"))] use crate::header; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct DeleteKeychainEntryRequestV1 { /// The key of the entry to delete from th...
the_stack
use super::*; const START_PC: usize = 0xF00; const NEXT_PC: usize = START_PC + OPCODE_SIZE; const SKIPPED_PC: usize = START_PC + (2 * OPCODE_SIZE); fn build_processor() -> Processor { let mut processor = Processor::new(); processor.pc = START_PC; processor.v = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7...
the_stack
use super::*; /// The main representation to draw the halfedge's faces as triangles on the GPU /// This is suitable to be rendered with `wgpu::PrimitiveTopology::TriangleList` #[derive(Clone, Debug)] pub struct VertexIndexBuffers { /// Vertex positions, one per vertex. pub positions: Vec<Vec3>, /// Vertex ...
the_stack
use std::future::Future; use std::sync::{Arc, Mutex}; use futures::channel::oneshot; use futures::future::TryFutureExt; use kvproto::kvrpcpb::CommandPri; use prometheus::IntGauge; use thiserror::Error; use yatp::pool::Remote; use yatp::queue::Extras; use yatp::task::future::TaskCell; use file_system::{set_io_type, IO...
the_stack
#[non_exhaustive] #[derive(std::fmt::Debug)] pub struct CreateLifecyclePolicyError { /// Kind of error that occurred. pub kind: CreateLifecyclePolicyErrorKind, /// Additional metadata about the error, including error code, message, and request ID. pub(crate) meta: aws_smithy_types::Error, } /// Types of...
the_stack
//! Metadata fetcher for Packet.net. //! //! Metadata JSON schema is described in their //! [knowledge base](https://help.packet.net/article/37-metadata). use std::collections::HashMap; use std::fs::File; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; use std::str::FromStr; use anyhow::{anyhow, bail, Context, Result}; u...
the_stack
//! Implementation of string interning used to implement hash-consing for context path fragments. //! This avoids un-necessary duplication of strings, saving memory. use std::{borrow::Cow, collections::hash_map::DefaultHasher, convert::TryInto, hash::Hasher}; use static_assertions::const_assert; use tezos_timing::Str...
the_stack
use crate::config_file::JuliaupConfig; use crate::config_file::JuliaupConfigChannel; use crate::config_file::JuliaupConfigVersion; use crate::get_bundled_julia_full_version; use crate::global_paths::GlobalPaths; use crate::jsonstructs_versionsdb::JuliaupVersionDB; use crate::utils::get_arch; use crate::utils::get_julia...
the_stack
pub const MAX_THREAD: TID = 31; use crate::services::ProcessInner; use core::cell::RefCell; use std::io::Write; use std::net::TcpStream; use std::thread_local; use xous_kernel::{ProcessInit, ProcessKey, ThreadInit, PID, TID}; pub const INITIAL_TID: usize = 2; pub const EXCEPTION_TID: usize = 1; pub const MAX_PROCESS_C...
the_stack
use cardano::block::{Block, BlockDate, BlockHeader, ChainState, EpochId, HeaderHash, RawBlock}; use cardano::config::GenesisData; use cardano::util::hex; use cardano_storage::{ blob, chain_state, epoch::{self, epoch_exists}, pack, tag, types, Error, Storage, }; use config::net; use network::{api::Api, api::...
the_stack
#[non_exhaustive] #[derive(std::clone::Clone, std::cmp::PartialEq)] pub struct Tag { /// <p>The key of the tag.</p> pub key: std::option::Option<std::string::String>, /// <p>The value of the tag.</p> pub value: std::option::Option<std::string::String>, } impl Tag { /// <p>The key of the tag.</p> ...
the_stack
#![cfg(test)] #[macro_use] extern crate capnp_rpc; use capnp::Error; use capnp::capability::Promise; use capnp_rpc::{RpcSystem, rpc_twoparty_capnp, twoparty}; use futures::{Future, FutureExt, TryFutureExt}; use futures::channel::oneshot; pub mod test_capnp { include!(concat!(env!("OUT_DIR"), "/test_capnp.rs")); }...
the_stack
use std::collections::BTreeMap; use std::collections::Bound::{self, Excluded, Included, Unbounded}; use std::default::Default; use std::fmt::{self, Debug, Display, Formatter}; use std::ops::RangeBounds; use std::sync::{Arc, RwLock}; use engine_panic::PanicEngine; use engine_traits::{CfName, IterOptions, ReadOptions, C...
the_stack
use crate::path::layer_state::*; use crate::path::animation_path::*; use flo_canvas::*; use std::mem; use std::sync::*; use std::time::{Duration}; /// /// Converts drawing on a single layer to paths /// #[derive(Clone)] pub struct LayerDrawingToPaths { state: LayerState, state_stack: Vec<LayerSta...
the_stack
use proc_macro2::{Span, TokenStream}; use std::error::Error as StdError; use std::fmt; use std::iter::{self, Iterator}; use std::string::ToString; use std::vec; use syn::spanned::Spanned; use syn::{Lit, LitStr, Path}; mod kind; use self::kind::{ErrorKind, ErrorUnknownField}; /// An alias of `Result` specific to attr...
the_stack
use libc::c_char; use std::borrow::Cow; use std::ops::Range; use xi_core_lib::edit_types::{BufferEvent, EventDomain, SpecialEvent, ViewEvent}; use xi_core_lib::rpc::{GestureType, Rect}; use xi_core_lib::selection::{InsertDrift, SelRegion, Selection}; use xi_core_lib::view::ViewMovement; use xi_core_lib::{edit_ops, mov...
the_stack
use crate::{get_zero_hash, Hash256, HASHSIZE}; use eth2_hashing::{Context, Sha256Context, HASH_LEN}; use smallvec::{smallvec, SmallVec}; use std::mem; type SmallVec8<T> = SmallVec<[T; 8]>; #[derive(Clone, Debug, PartialEq)] pub enum Error { /// The maximum number of leaves defined by the initialization `depth` ha...
the_stack
use crate::{line_error, Location, RecordHint, StatusMessage, Stronghold}; #[cfg(feature = "p2p")] use p2p::firewall::Rule; #[cfg(feature = "p2p")] use crate::{ actors::p2p::{messages::SwarmInfo, NetworkConfig}, tests::fresh, ProcResult, Procedure, ResultMessage, SLIP10DeriveInput, }; #[actix::test] async...
the_stack
use util; use {ArgsIter, Result, UtilRead, UtilSetup, UtilWrite}; use clap::{AppSettings, Arg, ArgGroup}; use std::collections::VecDeque; use std::ffi::{OsStr, OsString}; use std::fs::File; use std::io::{self, BufRead, BufReader, Read, Write}; use std::iter; use std::mem; use std::path::Path; use std::result::Result a...
the_stack
use core::mem; use core::ops::Deref; use bitflags::bitflags; use zerocopy::{AsBytes, FromBytes}; use crate::{ addr::UVAddr, arena::{ArenaObject, ArenaRc, ArrayArena}, lock::SleepLock, param::NINODE, proc::KernelCtx, util::strong_pin::StrongPin, }; mod lfs; mod path; mod stat; mod ufs; pub us...
the_stack
mod char_width; use once_cell::sync::Lazy; use regex::Regex; use std::fmt; use crate::tokenizer::debug_utils::EllipsisDebug; use char_width::NewlineNormalizedCharWidths; static CR_OR_LF_RE: Lazy<Regex> = Lazy::new(|| Regex::new(r"[\r\n]").expect("regex")); pub trait TextPattern { fn match_len(&self, text: &str)...
the_stack
use crate::{ connection::{ connection_id_mapper::ConnectionIdMapperState, local_id_registry::LocalIdStatus::*, InternalConnectionId, }, contexts::WriteContext, transmission, }; use core::convert::TryInto; use s2n_quic_core::{ ack, connection, frame, packet::number::PacketNumber, ...
the_stack
mod support; use csml_interpreter::data::context::Context; use csml_interpreter::data::event::Event; use std::collections::HashMap; use crate::support::tools::format_message; use crate::support::tools::message_to_json_value; use serde_json::Value; ////////////////////////////////////////////////////////////////////...
the_stack
use std::fmt; use once_cell::sync::Lazy; use ring::constant_time::verify_slices_are_equal; use ring::rand::SystemRandom; use ring::signature::KeyPair; use ring::{aead, hmac, rand, signature}; use serde::de::DeserializeOwned; use serde::{Deserialize, Serialize}; use crate::errors::Error; use crate::jwk; use crate::jws...
the_stack
use core::str::FromStr; use futures::StreamExt; use structopt::StructOpt; use tendermint::abci::transaction::Hash; use tendermint::abci::{Path, Transaction}; use tendermint_rpc::query::Query; use tendermint_rpc::{ Client, Error, HttpClient, Order, Paging, Scheme, Subscription, SubscriptionClient, Url, WebSocket...
the_stack
use crate::{ cil::{il_f32, il_f64, il_i32, il_i64, il_i8, il_u16, il_u32, il_u8, opcode::*, OperandParams}, error::{Error, Error::InvalidCil}, }; use std::fmt::{Display, Formatter}; /// A signed or unsigned 8-bit integer type #[derive(Debug, Copy, Clone)] pub enum SingleByte { Signed(i8), Unsigned(u8),...
the_stack
use failure::format_err; use human_panic::setup_panic; use log::{debug, error, info, warn}; use bio::alignment::pairwise::banded; use bio::io::fasta; use clap::{App, Arg}; use failure::{Error, ResultExt}; use flate2::read::MultiGzDecoder; use itertools::Itertools; use rayon::prelude::*; use rust_htslib::bam::record::A...
the_stack
use std::{ sync::{ atomic::{AtomicBool, Ordering}, Arc, Barrier, }, thread, time::Duration, }; trait RwLock<T> { const NAME: &'static str; fn new(v: T) -> Self; fn read<F, R>(&self, f: F) -> R where F: FnOnce(&T) -> R; fn write<F, R>(&self, f: F) -> R ...
the_stack
use super::decoder::DecodeError; use super::encoder::{command_to_buf, encode_resp}; use super::fp::{RFunctor, VFunctor}; use super::resp::{BinSafeStr, IndexedResp, Resp, RespSlice, RespVec}; use super::stateless::{parse_indexed_resp, ParseError}; use crate::common::utils::{ array_append_front, change_bulk_array_ele...
the_stack
use super::*; use memchr::memchr_iter; use std::convert::TryFrom; use std::io; use std::mem; #[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)] pub enum VersionstampOffset { None { size: u32 }, OneIncomplete { offset: u32 }, MultipleIncomplete, } impl std::ops::AddAssign<u32> for Versionst...
the_stack
mod server; use std::collections::{HashMap, HashSet}; use std::fs::{create_dir_all, read_to_string, File, OpenOptions}; use std::future::Future; use std::io::{Seek, SeekFrom, Write}; use std::iter::FromIterator; use std::pin::Pin; use std::process::Command; use std::time::Duration; use assert_cmd::prelude::*; use ind...
the_stack
use crate::{ui_log, ChannelStream, StreamerFeedBack, StreamingState, WavData, CLIENTS, CONFIG}; use crossbeam_channel::{unbounded, Receiver, Sender}; use fltk::app; use log::debug; use std::net::IpAddr; use std::sync::Arc; use tiny_http::{Header, Method, Response, Server}; /// run_server - run a tiny-http webserver to...
the_stack
mod common; use oracle::sql_type::{Collection, FromSql, Object, OracleType, Timestamp}; use oracle::{Result, SqlValue}; use std::iter::Iterator; #[test] fn collection_udt_nestedarray() -> Result<()> { let conn = common::connect()?; let objtype = conn.object_type("UDT_NESTEDARRAY")?; let subobjtype = conn.o...
the_stack
use channel; use connection::Connection; use protocol; use amq_proto::{self, Table, Method, Frame, MethodFrame}; use amq_proto::TableEntry::{FieldTable, Bool, LongString}; use amqp_error::{AMQPResult, AMQPError}; use super::VERSION; use std::sync::{Arc, Mutex}; use std::default::Default; use std::collections::HashMap...
the_stack
use crate::{ align::{AlignAlgorithm, AlignMode, Banded, DEFAULT_BLOCKSIZE, DEFAULT_KMER, DEFAULT_WINDOW}, control::Settings, drawer::{DisplayMode, Style}, view::{Aligned, Unaligned}, }; use cursive::{event::Key, theme::PaletteColor, traits::*, views::*, Cursive, View}; use std::{fmt::Display, str::FromS...
the_stack
use std::iter; use crayon::prelude::*; use crayon::utils::hash::{FastHashMap, FastHashSet}; use failure::Error; use super::node::Node; use super::transform::Transform; use Entity; /// A simple scene graph that used to tore and manipulate the postiion, rotation and scale /// of the object. We do also keeps a tree re...
the_stack
use super::instance_action::InstanceAction; use chrono::Utc; use k8s_openapi::apimachinery::pkg::apis::meta::v1::Time; /// Pod action types /// /// Pod actions describe the types of actions the controller can /// take for broker Pods. /// #[derive(Clone, Copy, Debug, PartialEq)] pub enum PodAction { /// The broker...
the_stack
use event; use std; use std::cmp::Ordering; use widget; use { color, Borderable, Color, Colorable, FontSize, Labelable, Positionable, Scalar, Sizeable, Widget, }; /// For viewing, selecting, double-clicking, etc the contents of a directory. #[derive(WidgetCommon_)] pub struct DirectoryView<'a> { #[conrod(c...
the_stack
use std::io::{self, BufReader, Write}; use std::path::{Component, Path}; use std::process::{Command, Stdio}; use std::{env, str}; use anyhow::{bail, Result}; use cargo_metadata::{Artifact, CargoOpt, Message, Metadata, MetadataCommand}; use clap::{App, AppSettings, Arg, ArgMatches}; use rustc_cfg::Cfg; pub use tool::T...
the_stack
// https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_cas...
the_stack
use std::fmt; use std::str::SplitWhitespace; #[derive(Copy, Clone)] pub struct FP12 { a:FP4, b:FP4, c:FP4 } use rom::BIG_HEX_STRING_LEN; //mod fp; //use fp::FP; //mod fp2; use fp2::FP2; //mod fp4; use fp4::FP4; //mod big; use big::BIG; //mod dbig; //use dbig::DBIG; //mod rand; //mod hash256; //mod rom; use rom; ...
the_stack
use crate::{ loom::{ atomic::{AtomicUsize, Ordering::*}, cell::UnsafeCell, }, util::{mutex::Mutex, CachePadded}, wait::{Notify, WaitResult}, }; use core::{fmt, marker::PhantomPinned, pin::Pin, ptr::NonNull}; /// A queue of waiters ([`core::task::Waker`]s or [`std::thread::Thread`]s) //...
the_stack
use super::{ channel::{AnyChannel, Busy, CallbackStatus, Channel, ChannelId, InterruptFlags, Ready}, dma_controller::{ChId, TriggerAction, TriggerSource}, BlockTransferControl, DmacDescriptor, Error, Result, DESCRIPTOR_SECTION, }; use crate::typelevel::{Is, Sealed}; use core::{ptr::null_mut, sync::atomic}; ...
the_stack
DEFINE_GUID!{FOLDERID_NetworkFolder, 0xD20BEEC4, 0x5CA8, 0x4905, 0xAE, 0x3B, 0xBF, 0x25, 0x1E, 0xA0, 0x9B, 0x53} DEFINE_GUID!{FOLDERID_ComputerFolder, 0x0AC0837C, 0xBBF8, 0x452A, 0x85, 0x0D, 0x79, 0xD0, 0x8E, 0x66, 0x7C, 0xA7} DEFINE_GUID!{FOLDERID_InternetFolder, 0x4D9F7874, 0x4E0C, 0x4904, 0x96, 0x7B, 0x4...
the_stack
use super::ITGenerator; use crate::default_export_api_config::RELEASE_OBJECTS; use crate::instructions_generator::ITResolver; use marine_macro_impl::*; use wasmer_it::interpreter::Instruction; use wasmer_it::IType; fn generate_export_fn(args: Vec<ParsedType>, output: Option<ParsedType>) -> FnType { let name = Str...
the_stack
use super::{PcfSet, PCF}; use crate::syntax::{ formula::*, term::{Complex, Variable}, Const, Error, Formula, Func, Pred, Sig, Var, FOF, }; use itertools::Itertools; use std::{collections::HashMap, iter::FromIterator, ops::Deref}; // Atomic formula over flat terms to build relational formulae type FlatLiter...
the_stack
use crate::backend::render::{BitmapHandle, BitmapInfo, RenderBackend}; use crate::backend::video::{ DecodedFrame, EncodedFrame, Error, FrameDependency, VideoBackend, VideoStreamHandle, }; use generational_arena::Arena; use swf::{VideoCodec, VideoDeblocking}; /// Software video backend that proxies to CPU-only code...
the_stack
use rlua::UserData; use std::cell::{Cell, RefCell}; use std::rc::Rc; use crate::{animation::Anim, EntityState}; use sulis_core::config::Config; use sulis_core::image::Image; use sulis_core::io::{DrawList, GraphicsRenderer}; use sulis_core::ui::{animation_state, Color}; use sulis_core::util::{approx_eq, gen_rand, ExtI...
the_stack
use crate::geometry::Transform2D; use crate::{Align, Baseline, Color, FillRule, FontId, ImageId, LineCap, LineJoin}; #[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Default)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub(crate) struct GradientStop(pub f32, pub Color); // We use MultiStopGradi...
the_stack
/// VM-execution, VM-exit, and VM-entry control fields. pub mod control { use bitflags::bitflags; // B.1.1.: 16-bit control fields /// Virtual-processor identifier (VPID). pub const VPID: u32 = 0x0; /// Posted-interrupt notification vector. pub const POSTED_INTERRUPT_NOTIFICATION_VECTOR: u32 = ...
the_stack
mod build; pub mod confirm; pub mod gas_price; mod send; pub use self::build::Transaction; use self::confirm::ConfirmParams; pub use self::gas_price::GasPrice; pub use self::send::TransactionResult; use crate::errors::ExecutionError; use crate::secret::{Password, PrivateKey}; use web3::api::Web3; use web3::types::{Add...
the_stack
use std::mem; use std::ops::{Deref, DerefMut, Index, IndexMut}; use std::slice; use util::{Nullable, PrefixPtr, mk_slice, mk_slice_mut}; /// Safe C-like array. The length is stored in an additional metadata field just before the first /// array element. /// /// Unlike `CBlockPtr`, `CArray` maintains ownership of it...
the_stack