text
stringlengths
7.05k
33.9k
//! A tagged pointer is a pointer (concretely a memory address) with additional //! data associated with it, such as an indirection bit or reference count. This //! additional data is often "folded" into the pointer, meaning stored inline in //! the data representing the address, taking advantage of certain properties ...
use clap::ArgMatches; use crate::prelude::*; pub use source::Source; pub use content_configures::ContentConfigure; pub use config::{Config, WritingMode, PageProgressionDirection}; /// 入力された情報(設定およびfile) #[derive(Debug)] pub struct Input { pub cfg: config::Config, pub src: Vec<source::Source>, } trait ArgMatc...
use std::str::FromStr; use std::collections::HashMap; use lazy_static::lazy_static; use json_rs::*; use super::*; use crate::snp::SnpBuilder; enum JsKey { RefsnpId, PrimarySnapshotData, PlacementsWithAllele, IsPtlp, Alleles, Allele, Spdi, InsertedSequence, DeletedSequence, Position, SeqId, AlleleAnnotations, Freq...
//! This module contains the implementation of the InfluxDB IOx Metadata catalog use std::any::Any; use std::{ collections::{btree_map::Entry, BTreeMap}, sync::Arc, }; use parking_lot::RwLock; use snafu::{OptionExt, Snafu}; use arrow_deps::datafusion::{catalog::schema::SchemaProvider, datasource::TableProvide...
use ::std::os::raw::{ c_char, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_ulong, c_ushort, c_uint, c_void }; #[repr(C)] pub struct iovec { _unused: [u8; 0], } #[repr(C)] pub struct vmctx { _unused: [u8; 0], } #[repr(C)] pub struct seg_desc { pub base: ...
#![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/54989751?s=200&v=4")] //! # wapc //! //! The `wapc` crate provides a high-level WebAssembly host runtime that conforms to an RPC mechanism //! called **waPC**. waPC is designed to be a fixed, lightweight standard allowing both sides of the //! guest/host...
use core::fmt; use std::cell::RefCell; use std::error::Error; use std::fmt::Debug; use std::io::BufRead; use std::mem; use quick_xml::events::{BytesEnd, BytesStart, BytesText, Event}; use quick_xml::{escape, Reader}; use url::Url; #[cfg(test)] mod tests; /// Iteration over the XML elements may return an error (malfo...
/* Copyright (c) 2019-2021 <NAME> (<EMAIL>) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, pub...
#[macro_use] extern crate glium; #[macro_use] extern crate imgui; extern crate imgui_sys; extern crate imgui_glium_renderer; extern crate cgmath; extern crate docopt; extern crate num_traits; extern crate rulinalg; extern crate serde; extern crate serde_json; extern crate arcball; mod imgui_support; mod bezier; mod bs...
use crate::cube::CubeRenderer; use crate::font::FontSize; use crate::framerate::Framerate; use crate::gl::GlContext; use crate::theme::Theme; use crate::timer::analysis::TimerPostAnalysis; use crate::timer::state::TimerState; use crate::timer::BluetoothEvent; use crate::widgets::fit_scramble; use anyhow::Result; use eg...
use std::borrow::Cow; use base64; use rand::distributions::{Distribution, Uniform}; use rand::{rngs::OsRng, Rng}; use ring::digest::SHA256_OUTPUT_LEN; use ring::hmac; use error::{Error, Field, Kind}; use utils::find_proofs; use NONCE_LENGTH; /// Responds to client authentication challenges. It's the entrypoint for t...
use std::{ fs, path::{Path, PathBuf}, thread::{self, JoinHandle}, }; #[cfg(test)] use super::Team; use super::CompetitionData; pub fn save_to_file(file_path: String, data: &CompetitionData) -> JoinHandle<Result<(), String>> { let json = data.get_as_json_string(); thread::spawn(move || { i...
use std::cmp::{max, min}; use std::collections::HashMap; use std::io::Cursor; use std::sync::{Arc, Mutex}; use std::thread::sleep; use std::time::Duration; use std::time::{SystemTime, UNIX_EPOCH}; use anyhow::{anyhow, bail, Result}; use chrono::prelude::*; use dht22_pi::{read, Reading}; use plotters::prelude::*; use r...
//! This module contains traits and macros that are used by generated code to //! define flatdata's structs, archives and resources. //! //! flatdata's code generator translates a flatdata schema to Rust code. The //! generated code contains all schema definitions embedded as strings, and for //! each schema element it...
/* Copyright 2020 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
//! # Multinomial Naive Bayes //! //! Multinomial Naive Bayes classifier is a variant of [Naive Bayes](../index.html) for the multinomially distributed data. //! It is often used for discrete data with predictors representing the number of times an event was observed in a particular instance, //! for example frequency ...
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! Netstack3 bindings. //! //! This module provides Fuchsia bindings for the [`netstack3_core`] crate. #[macro_use] mod macros; #[cfg(test)] mod integra...
// Copyright 2018 The Grin Developers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
use std::collections::VecDeque; use std::pin::Pin; use std::sync::Arc; use std::time::Instant; use futures::channel::oneshot::Sender; use futures::stream::Stream; use futures::task::{Context, Poll}; use chromiumoxide_cdp::cdp::browser_protocol::page::{FrameId, GetFrameTreeParams}; use chromiumoxide_cdp::cdp::browser_...
#![type_length_limit = "1707074"] use async_trait::async_trait; use bytes::Bytes; use interledger_btp::{BtpAccount, BtpOutgoingService}; use interledger_ccp::CcpRoutingAccount; use interledger_errors::NodeStoreError; use interledger_http::{HttpAccount, HttpStore}; use interledger_packet::Address; use interledger_rates:...
#![no_std] #![no_main] #![feature(alloc_error_handler)] #![feature(alloc)] #![feature(lang_items)] #[macro_use] extern crate alloc; extern crate alloc_cortex_m; extern crate cortex_m; extern crate cortex_m_rt as rt; extern crate cortex_m_semihosting; extern crate stm32f7; #[macro_use] extern crate stm32f7_discovery; ...
use super::err::secstatus_to_res; use super::p11::sys::{ self, PK11Context, PK11_AEADOp, PK11_CreateContextBySymKey, PRBool, CKA_DECRYPT, CKA_ENCRYPT, CKA_NSS_MESSAGE, CKG_GENERATE_COUNTER_XOR, CKG_NO_GENERATE, CKM_AES_GCM, CKM_CHACHA20_POLY1305, CK_ATTRIBUTE_TYPE, CK_GENERATOR_FUNCTION, CK_MECHANISM_TYPE, ...
/* Copyright (C) 2018 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
use libc::{c_char, c_uint, c_int}; use ffi::prelude::LLVMValueRef; use ffi::{core, LLVMAttribute}; use ffi::LLVMLinkage; use std::ffi::CString; use std::{fmt, mem}; use std::ops::{Deref, Index}; use std::marker::PhantomData; use block::{BasicBlock, BlockIter}; use context::{Context, GetContext}; use types::{FunctionTyp...
//! This file contains code for using gimli to extract information from the DWARF section of an //! executable. The code is adapted from //! https://github.com/gimli-rs/gimli/blob/master/examples/simple.rs and //! https://github.com/gimli-rs/gimli/blob/master/examples/dwarfdump.rs. //! //! This code is a huge mess...
use std::any::TypeId; use std::sync::Arc; use num_complex::Complex; use num_integer::div_ceil; use num_traits::Zero; use crate::common::{fft_error_inplace, fft_error_outofplace}; use crate::{array_utils, twiddles, FftDirection}; use crate::{Direction, Fft, FftNum, Length}; use super::CommonSimdData; use super::{ ...
use std::collections::BTreeMap; use std::fmt; use std::marker::PhantomData; use failure::Fail; use pyo3::prelude::*; use pyo3::exceptions::TypeError as PyTypeError; use pyo3::exceptions::ValueError as PyValueError; use pyo3::types::{PyDict, PyFloat, PyList, PyAny, PyTuple}; use pyo3::{import_exception, wrap_pyfunction...
use crate::{sys, usr}; use crate::sys::allocator::PhysBuf; use crate::sys::net::Stats; use alloc::collections::BTreeMap; use alloc::vec::Vec; use core::convert::TryInto; use smoltcp::iface::{EthernetInterfaceBuilder, NeighborCache, Routes}; use smoltcp::phy; use smoltcp::phy::{Device, DeviceCapabilities}; use smoltcp::...
/// Remote timer and access methods to start/stop it. use std::convert::From; use std::convert::TryFrom; use std::io::Read; use std::io::Write; use std::net; use std::sync; use std::sync::mpsc; use std::time; use crate::tlv; use crate::gen_buffer; /// Represent possible failure causes. #[derive(Clone, Copy, std::cmp:...
#![allow(dead_code)] use aoc::{CustomError, Result}; use std::io::{self, Write}; use std::ops::{Index, IndexMut}; use std::str::FromStr; fn main() -> Result<()> { let s = aoc::read_input()?; // part1(&s)?; part2(&s)?; Ok(()) } fn show_instructions(code: &[Instruction]) { for (i, c) in code.ite...
use canon_collision_lib::entity_def::{CollisionBox, ECB}; use canon_collision_lib::geometry::Rect; use canon_collision_lib::package::Package; use canon_collision_lib::stage::Surface; use crate::entity::fighters::player::RenderShield; use crate::game::{SurfaceSelection, RenderRect}; use crate::graphics; use bytemuck::{...
//! Provide a convenient way to construct arbitrary paths. //! //! # Example //! //! ```rust,no_run //! # extern crate cairo; //! # use cairo::{Context, ImageSurface}; //! # use n18hex::{Colour, Hex, Orientation}; //! # use n18map::{Map, Coordinates, Letters, FirstRow}; //! # use n18token::Tokens; //! # use n18route::b...
//! Sql types //! //! Based on Sqlx types mapping: //! - MySQL: https://docs.rs/sqlx/latest/sqlx/mysql/types/index.html //! - Postgres: https://docs.rs/sqlx/latest/sqlx/postgres/types/index.html //! - SQLite: https://docs.rs/sqlx/latest/sqlx/sqlite/types/index.html use std::{collections::HashMap, marker::PhantomData};...
use std::collections::HashMap; use std::fs::File; use std::ops::Deref; use r2d2; use r2d2_diesel::ConnectionManager; use diesel::prelude::*; use diesel::sqlite::SqliteConnection; use diesel::result::Error::DatabaseError; use ammonia::clean; use rand::distributions::Alphanumeric; use rand::Rng; use rocket::http::Stat...
use super::LineSegment; use super::Point; use super::*; #[derive(Copy, Clone, Debug, PartialEq)] pub struct QuadraticBezier<P: Point> { pub(crate) start: P, pub(crate) ctrl: P, pub(crate) end: P, } impl<P: Point> QuadraticBezier<P> where P: Point, { /// Creates a new instance of QuadraticBezier fr...
use std::ops::Range; use serde::{Deserialize, Serialize}; use crate::aggregation::agg_req_with_accessor::{ AggregationsWithAccessor, BucketAggregationWithAccessor, }; use crate::aggregation::intermediate_agg_result::IntermediateBucketResult; use crate::aggregation::segment_agg_result::{ SegmentAggregationResu...
// Copyright 2013-2014 The CGMath Developers. For a full listing of the authors, // refer to the Cargo.toml file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a ...
use std::io::Error; use std::mem::size_of; use std::os::raw::{c_float, c_int, c_uint, c_void}; use std::ptr::null_mut; use lawrencium::*; mod utils_windows; use utils_windows::*; use crate::common::*; pub struct GLContext { context_ptr: HGLRC, pixel_format_id: i32, _pixel_format_descriptor: PIXELFORMATDE...
#[macro_use] extern crate criterion; use criterion::Criterion; use rand::prelude::{SliceRandom, ThreadRng}; use rand::thread_rng; use goban::pieces::stones::Stone; use goban::rules::{CHINESE, GobanSizes, JAPANESE, Move, Rule}; use goban::rules::game::Game; use goban::rules::GobanSizes::Nineteen; use goban::rules::Mov...
//! X.509 helper objects definitions: OID, short and long names, NID (internal ID) //! //! Most definitions taken from OpenSSL: /usr/include/openssl/objects.h //! Note: values does not match openssl, for ex. NIDs //! //! Note: the objects registry is implemented as a static array with linear search. This is not the //!...
//! Implementation of a pseudo-random number generator //! based on AES256 in CTR mode. //! //! The implementation follows the design discussed in this blogpost: //! <https://lukas-prokop.at/articles/2021-12-31-nists-rng-in-rust> use aes::BlockEncrypt; use aes::NewBlockCipher; use std::error; use std::fmt; /// Trait ...
//! Lunatic tries to expose all resources (file descriptors, processes, sockets, ...) to WASM guest //! code as externrefs. Usually, the signature of Lunatic imports returning resources looks something //! like this: //! //! (import "lunatic" "spawn" (func (;0;) (param i32 i64) (result externref))) //! //! Many progra...
use super::errors::*; use super::protos::*; use super::routing::*; use futures::future::*; use futures::{Future, Stream}; use futures::prelude::*; use futures::prelude::await; use hyper::{Body}; use serde::{Deserialize, Serialize}; use bytes::Bytes; use std::borrow::Borrow; use std::collections::HashMap; use std::sync:...
use std::fs::File; use std::io::{BufReader, BufWriter, Write}; use std::path::Path; use fnv::{FnvBuildHasher, FnvHashSet}; use indexmap::IndexMap; use quick_xml::events::{BytesDecl, BytesEnd, BytesStart, Event}; use quick_xml::{Reader, Writer}; #[cfg(windows)] use wchar::wch_c; #[cfg(windows)] use winapi::Interfac...
//! A build dependency for running `cmake` to build a native library //! //! This crate provides some necessary boilerplate and shim support for running //! the system `cmake` command to build a native library. It will add //! appropriate cflags for building code to link into Rust, handle cross //! compilation, and use...
//! server of Blockchain use super::*; use crate::block::*; use crate::transaction::*; use crate::utxoset::*; use bincode::{deserialize, serialize}; use failure::format_err; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; use std::io::prelude::*; use std::net::{TcpListener, TcpStream}; u...
// Copyright (c) 2016-2021 Memgraph Ltd. [https://memgraph.com] // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required ...
// Copyright 2017-2019 Parity Technologies (UK) Ltd. // This file is part of Substrate. // Substrate is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) a...
use crate::{Backtrack, BacktrackWith}; use std::cmp::Ordering; use std::fmt::Debug; use std::marker::PhantomData; use std::num::NonZeroU32; /// Represents a decision level. /// /// The ROOT is the level at which no decision has been made. /// Each time a decision is made, the decision level increases. /// /// As a lay...
use std::collections::BTreeMap; use std::sync::Arc; use std::{fmt, mem}; use bincode; use crypto::Signature; use rand::{self, Rand}; use serde::{Deserialize, Serialize}; use super::votes::{SignedVote, VoteCounter}; use super::{ Batch, Change, ChangeState, DynamicHoneyBadgerBuilder, Error, ErrorKind, Input, In...
use std::collections::BTreeMap; use std::io::{Read, Write}; use std::{io, fmt, result}; use packet; use packet::{Handshake}; use ntt; use raw_cbor::{self, de::{RawCbor}}; #[derive(Debug)] pub enum Error { NttError(ntt::Error), IOError(io::Error), ByteEncodingError(raw_cbor::Error), ServerCreatedLight...
extern crate failure; #[macro_use] extern crate failure_derive; use std::collections::HashMap; use std::str::FromStr; pub mod error; pub mod side_effect; use error::StackError; pub use side_effect::*; #[macro_use] pub mod stack_operations; /// Primitive machine operations. /// /// These are the operations that `St...
use std::io::{Read, Result, Write}; use std::thread; use std::time::Duration; use termion::{clear, cursor, style}; use termion::color::{Bg, Rgb}; use crate::graphics::*; use termion::input::TermRead; use termion::event::Key; use termion::input::Keys; use termion::raw::{IntoRawMode, RawTerminal}; use rand::rngs::Threa...
use crate::{ ext::FloatExt, util::{ BLUE, GREEN, RED, angle_to_vec, angle_from_vec, Vector2, Point2 }, io::{ tex::{Assets, Sprite, PosText}, snd::Sound, }, obj::{Object, pickup::Pickup, player::Player, enemy::{Enemy, Chaser}, health::Health, weapon::Weapon...
use crate::{Error, Protection, Region, Result, page, util}; use libc::{c_uint, c_void, area_info, area_id, get_area_info, get_next_area_info, set_area_protection, create_area, delete_area, B_WRITE_AREA, B_READ_AREA, B_EXECUTE_AREA, B_BAD_VALUE, B_OK, B_PAGE_SIZE, B_ANY_ADDRESS, B_EXACT_ADDRESS, B_NO_LOCK, B_NO_ME...
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))] use kvm_bindings::{ kvm_regs, kvm_userspace_memory_region, KVM_MAX_CPUID_ENTRIES, KVM_MEM_LOG_DIRTY_PAGES, }; use kvm_ioctls::{Kvm, VcpuExit, VcpuFd, VmFd}; use std::io::Write; use vm_memory::{Bytes, GuestAddress, GuestMemory, GuestMemoryMmap}; pub struct ...
use crate::error::DockerArchiveError; use crate::Result; use itertools::Itertools; use path_clean::clean; use serde::Serialize; use std::cell::RefCell; use std::rc::{Rc, Weak}; use std::{collections::HashMap, io::Read}; use tar::{Archive, EntryType}; use uuid::Uuid; use xxhash_rust::xxh3::xxh3_64; const WHITEOUT_PREFI...
use pyo3::prelude::*; use serde::{ de::{self, DeserializeSeed, Error, MapAccess, Visitor}, Deserialize, Deserializer, }; use std::borrow::Cow; use std::fmt; use crate::datetime::DateTimeString; use crate::enums::{MarketBettingType, MarketStatus}; use crate::ids::{EventID, EventTypeID}; use crate::mutable::runn...
use super::*; use crate::{ abi_stability::stable_abi_trait::GetTypeLayoutCtor, std_types::RVec, traits::IntoReprC, }; use std::{ cmp::{Eq, PartialEq}, ops::Range, }; /////////////////////////////////////////////////////////////////////////////// /// All the function pointer types in a type declaration. ...
use actix::prelude::*; use actix_raft::{ NodeId, AppData, AppDataResponse, AppError, RaftStorage, }; use super::Raft; use thiserror::Error; use tracing::*; use crate::{ NodeInfo, Configuration, ConfigurationError, network::{Network, BindEndpoint}, ports::PortData, storage::StorageFactory, };...
//***************************************************************************** // (C) 2018, <NAME>, Austria * // * // The Space Rust Library is free software; you can redistribute it and/or * // modi...
// // <NAME> <<EMAIL>> // // vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: // // PlayerTaskId is the id we give to the player task so that when we get a request we can identify // who is the player that is coming from. // // PlayerId is the id that identifies a player in the LobbyInfo structure. If the id f...
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Package deviceid generates device IDs. // DeviceID generates the device ID from a MAC address. // // This is used for mDNS, and the device ID for the f...
pub mod os_input_output; pub mod output; pub mod panes; pub mod tab; mod logging_pipe; mod pty; mod pty_writer; mod route; mod screen; mod thread_bus; mod ui; mod wasm_vm; use log::info; use pty_writer::{pty_writer_main, PtyWriteInstruction}; use std::collections::{HashMap, HashSet}; use std::{ path::PathBuf, ...
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use crate::message::action_fuse::ActionFuseHandle; use crate::message::beacon::Beacon; use crate::message::message_client::MessageClient; use crate::messag...
// Copyright Materialize, Inc. and contributors. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by ...
use smallvec::SmallVec; use super::D4TrackReader; use crate::{ ptab::{ BitArrayPartReader, BitArrayReader, DecodeBlockHandle, DecodeResult, Decoder, MatrixDecoder, PrimaryTablePartReader, PrimaryTableReader, }, stab::{SecondaryTablePartReader, SecondaryTableReader}, task::{IntoTaskVec, ...
use crate::check_box::CheckBoxBuilder; use crate::expander::ExpanderBuilder; use crate::inspector::editors::PropertyEditorInstance; use crate::utils::{make_arrow, ArrowDirection}; use crate::{ border::BorderBuilder, brush::Brush, core::{ algebra::Vector2, color::Color, inspect::{Cast...
#[macro_use] extern crate diesel; #[macro_use] extern crate diesel_migrations; use std::env; use std::net::SocketAddr; use std::sync::Arc; use std::time::Duration; use ::log::{debug, error, info}; use diesel::pg::PgConnection; use diesel::prelude::*; use diesel::r2d2::ConnectionManager; use google_youtube3::api::{Liv...
use regex::Regex; use std::cmp::Ordering; use std::collections::HashMap; use std::hash::Hash; pub(crate) fn day14_part1() -> usize { let mut nf = NanoFactory::from(day14_puzzle_input()); let target = Chemical::new(1, "FUEL"); nf.count_reactant_to_make_wanted_product(&target, "ORE") } pub(crate) fn day14_p...
//! //! FUSE userspace library implementation (as of libosxfuse-2.5.5). //! //! This is an improved rewrite of the FUSE userspace library (lowlevel //! interface) to fully take advantage of Rust's architecture. The only thing //! we rely on in the real libfuse are mount and unmount calls which are //! needed to establi...
use std::cell::RefCell; use std::collections::HashSet; use std::env; use std::fs::{self, File, OpenOptions}; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; use std::rc::Rc; use cargo::core::{Dependency, PackageId, Summary, Verbosity, Workspace}; use cargo::ops::{update_lockfile, UpdateOptions}; use cargo:...
use std::collections::HashMap; use std::io::{ErrorKind}; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use tokio::net::UdpSocket; use std::time::Duration; use log::{debug, info}; use bytecodec::{DecodeExt, EncodeExt}; use stun_codec_blazh::{Attribute, Message, MessageClass, MessageDecoder, MessageEncoder, Transaction...
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 #![deny(missing_docs)] #![deny(warnings)] #![allow(clippy::too_many_arguments)] /// The module which provides top-level enclave commands. pub mod commands; /// The module which provides a connection to the...
//! Dataframe configuration structs and methods use std::collections::HashMap; use std::fs::File; use std::io::Read; use std::path::Path; use serde_json; use toml; use dataframe::DataStore; use dataframe::TransformFields; use errors::*; /// Specification of how a data frame is configued from data sources #[derive(...
use crate::language_features::hover::editor_hover; use crate::markup::escape_kakoune_markup; use crate::position::{ get_kakoune_position_with_fallback, get_lsp_position, kakoune_position_to_lsp, lsp_range_to_kakoune, parse_kakoune_range, }; use crate::types::*; use crate::util::*; use crate::{context::*, positi...
// Copyright Materialize, Inc. and contributors. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by ...
//! Different subsystems use a different method to set/get options. So per //! subsystem, you will see small but subtle differences. The config setting //! should be applied *before* any call is made to mayastor. //! //! Partial config options are supported i.e you do not have to fully //! spell out the YAML spec for a...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] use std::{ collections::{hash_map, HashMap, HashSet}, convert::TryFrom, marker::PhantomData, sync::Arc, }; use anyhow::{bail, ensure, format_err, Result}; use fail::fail_point; use diem_crypto:...
use super::prelude::*; pub(crate) fn config(cfg: &mut web::ServiceConfig) { cfg.service(show_tasks) .service(create_task) .service(update_task) .service(run_task) .service(suspend_task) .service(advance_task) .service(delete_task); } #[post("/api/task/create")] asyn...
//! Core definitions module. use std::{collections::BTreeMap, convert::TryInto}; use anyhow::anyhow; use thiserror::Error; pub use oasis_core_keymanager_api_common::KeyManagerError; use crate::{ callformat, context::{BatchContext, Context, TxContext}, dispatcher, error, module::{self, InvariantHandle...
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // 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 ...
//! A `Window` object should be owned by an application. It can display a `Displayable` object in its framebuffer. See `applications/new_window` as a demo to use this library. //! //! This library will create a window with default title bar and border. It handles the commonly used interactions like moving //! the windo...
use std::cmp::max; use std::collections::hash_map; use std::collections::HashMap; use std::env; use std::fmt::{Display, Formatter}; use std::io::{Error, ErrorKind}; use std::iter::FromIterator; use std::path::{Path, PathBuf}; use std::process::{Command, Output}; use std::sync::{Arc, RwLock}; use ipc::Semaphore; use se...
use std::{any::Any, convert::TryInto, io, str, sync::Arc}; use bytes::BytesMut; use ring::aead; pub use rustls::Error; use rustls::{ self, quic::{ ClientQuicExt, HeaderProtectionKey, KeyChange, PacketKey, QuicExt, Secrets, ServerQuicExt, Version, }, Connection, }; use crate::{ cryp...
use crate::atlas::{self, AtlasImageID}; use crate::image_view::BstImageView; use crate::interface::bin::Bin; use crate::interface::interface::ItfVertInfo; use crate::{Basalt, BstEvent, BstItfEv}; use crossbeam::queue::SegQueue; use crossbeam::sync::{Parker, Unparker}; use ordered_float::OrderedFloat; use parking_lot::{...
use std::collections::BTreeMap; use std::fs; use std::marker::PhantomData; use nix::sys::{ ptrace, wait::{self, WaitPidFlag, WaitStatus}, }; use crate::{ cmd::Command, error::{Error, Result}, }; pub use nix::unistd::Pid; pub use nix::sys::ptrace::Options; pub use nix::sys::signal::Signal; pub type ...
use super::{Node, Variable, NodeIndex}; use crate::{FromIndex, IntoIndex}; use std::cmp::max; use std::collections::VecDeque; use std::iter::Map; use std::ops::Range; use std::convert::TryFrom; /// A `Bdd` describes a directed acyclic graph corresponding to a Boolean function. /// /// There are two "orderings" that ap...
use std::collections::HashMap; use std::convert::TryInto; use std::ffi::{OsStr, OsString}; use std::fmt::Write; use std::io::{BufRead, BufReader, Read, Write as WriteIo}; use std::path::PathBuf; use std::process::{Command, ExitStatus, Stdio}; use std::sync::Arc; use std::thread::{self, JoinHandle}; use cursive::theme:...
use std::fmt; use std::net::SocketAddr; use std::net::ToSocketAddrs; use std::sync::Arc; use std::thread; use bytes::Bytes; use futures::channel::oneshot; use futures::future; use futures::future::FutureExt; use futures::future::TryFutureExt; use futures::stream::StreamExt; use tls_api::TlsConnector; use tls_api::TlsC...
use std::fmt; use bitlab::SingleBits; use ::{high_byte, low_byte}; use join_bytes; use ppu::{GpuMode, Ppu}; pub mod opcodes; pub mod opcode; #[derive(Clone, Copy)] pub enum Register8 { A, F, B, C, D, E, H, L, } #[derive(Copy, Clone)] pub enum Register16 { AF, BC, DE, H...
use std::convert::{TryFrom, TryInto}; use std::fs::{File, OpenOptions}; use std::io::{self, Write}; use age_plugin::run_state_machine; use dialoguer::{Confirm, Input, Select}; use gumdrop::Options; use yubikey_piv::{ certificate::PublicKeyInfo, key::{RetiredSlotId, SlotId}, policy::{PinPolicy, TouchPolicy}...
#![allow(dead_code)] use crate::common::time_point::TimePoint; use std::fs::File; use std::io::{BufReader, Read, Seek, Write}; use std::ops::Deref; use std::{io, result}; use crate::Timestamp; use crate::{MonolithErr, Result, Value}; mod gorilla; mod simple; use crate::compaction::gorilla::GorillaDecompactor; use c...
// Copyright © 2015-2017 winapi-rs developers // 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. // All files in the project carrying such notice may not be copied,...
use std::fs::File; use std::io::prelude::*; use std::io::BufReader; use std::path::{Path, PathBuf}; use glob::{glob_with, MatchOptions}; use crate::qc::tag; pub fn parse_input(input: &Path, is_id: bool, is_rename: bool) -> Vec<RawSeq> { let file = File::open(input).expect("CAN'T OPEN INPUT FILE."); let buff ...
use super::utils::{parse_f64_default, parse_i32_default, parse_u32_default, parse_usize_default}; use crate::io::{FileReadError, LineReader, ParseError}; use crate::mol::{Atom, Bond, BondType, Molecule, Point3d}; // Reference: https://web.archive.org/web/20070630061308/http:/www.mdl.com/downloads/public/ctfile/ctfile....
#![feature( doc_cfg, async_closure, bool_to_option, cow_is_borrowed, once_cell, box_syntax, str_split_as_str, option_result_contains )] #![allow(clippy::nonstandard_macro_braces)] #![warn( missing_debug_implementations, // missing_docs, rust_2018_idioms, unreachable_pub )] #![deny(broken_intra_doc_links)] #![doc(test(n...
mod tests; use std::cell::RefCell; use std::rc::Rc; use ya6502::memory::Inspect; use ya6502::memory::Memory; use ya6502::memory::Read; use ya6502::memory::ReadError; use ya6502::memory::ReadResult; use ya6502::memory::Write; use ya6502::memory::WriteError; use ya6502::memory::WriteResult; pub type Color = u8; /// VI...
#![cfg_attr(feature = "cargo-clippy", allow(clippy::needless_pass_by_value))] use crate::nonce_futures::NonceFutures; use actix_web::{ http::Method, middleware, middleware::cors::Cors, server, App, AsyncResponder, Error, HttpMessage, HttpRequest, HttpResponse, }; use models::config::RUNTIME_CONFIG; use models:...
pub mod lexer; use self::lexer::{Lexer, LexerError, LexerErrorVariant, Token, TokenVariant}; use ast::{BinOp, Expression, ExpressionVariant, FunctionValue, Statement, StatementVariant, StringlyType}; use std::ops::{Deref, DerefMut}; use std::str; use std::fmt::{self, Display}; enum Either<T, U> { Left(...