text
stringlengths
9.08k
47.9k
use self::NodeKind::*; use crate::base_types; use crate::base_types::{Member, TagTypeKind, TypeKind}; use crate::token::Operator; use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Debug)] pub enum NodeKind { Assign, AAdd, ASub, AMul...
//! Direct Memory Access. //! //! [Transfer::init](struct.Transfer.html#method.init) is only implemented for //! valid combinations of peripheral-stream-channel-direction, providing compile //! time checking. //! //! This module implements Memory To Memory, Peripheral To Memory and Memory to //! Peripheral transfers, d...
use core::cmp; use scie_scanner::scanner::scie_scanner::IOnigCaptureIndex; use std::collections::HashMap as Map; use std::fs::File; use std::io::Read; use std::path::Path; use std::path::PathBuf; use crate::grammar::line_tokens::{IToken, LineTokens, TokenTypeMatcher}; use crate::grammar::local_stack_element::LocalStac...
// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. //! Manage an embedded Python interpreter. use libc::c_char; use python3_sys as pyffi; use std::collections::BTreeS...
// compile with // rustc --crate-type dylib rustplugin.rs // on windows: // rustc --crate-type cdylib -C opt-level=3 -C link-args=-s -C prefer-dynamic rustplugin.rs use std::os::raw::{c_void,c_char,c_uchar,c_int,c_uint,c_double,c_float}; use std::ffi::CString; const VOO_PLUGIN_API_VERSION: i32 = 6; // display p...
extern crate bincode; #[macro_use] extern crate clap; extern crate influx_db_client; extern crate rand; extern crate rayon; #[macro_use] extern crate log; extern crate serde_json; #[macro_use] extern crate solana; use clap::{App, Arg}; use influx_db_client as influxdb; use rand::{thread_rng, Rng}; use rayon::prelude::...
use crate::{ errors::{ControllerError, ExtKubeApiError}, object_sync_controller::{FAILURE, SUCCESS}, object_sync_modifications::ObjectSyncModifications, utils::{add_finalizer_if_missing, remove_finalizer}, utils::{delete_destinations, metric_name}, Configuration, FINALIZER, MANAGER, }; use futu...
use crate::common::{mk_t, mk_uuid, Timestamp, UUID}; use crate::model::common::{EndpointId, Gen, LeadershipId}; use crate::model::message as msg; use crate::model::message::{ LeaderChanged, PLEntry, PLIndex, PaxosDriverMessage, PaxosMessage, Rnd, }; use rand::RngCore; use sqlparser::dialect::keywords::Keyword::NEXT; ...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Git short commit id"] pub git_id: GIT_ID, #[doc = "0x04 - System clock base frequency"] pub clk_freq: CLK_FREQ, #[doc = "0x08 - PLL0 controller"] pub pll0: PLL0, #[doc = "0x0c - PLL1 controller"] pub pll1: P...
//! Trustore and its undelying types. use rustc_serialize::{Encoder,Encodable,Decoder}; use std::cmp::Eq; use num::traits::Bounded; use std::collections::VecDeque; use mydht_base::keyval::{Key,KeyVal,Attachment,SettableAttachment}; use mydht_base::kvstore::{KVStore,KVStoreRel,BoxedStore,BoxedStoreRel}; use mydht_ba...
// In this file we define the PackedFile type DB for decoding and encoding it. // This is the type used by database files. // The structure of a header is: // - (optional) 4 bytes for the GUID marker. // - (optional) The GUID in u16 bytes, with the 2 first being his lenght in chars (bytes / 2). // - (optional) 4 bytes...
// Copyright 2021 <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 writ...
use std::marker::PhantomData; use bellperson::{ gadgets::{ boolean::{AllocatedBit, Boolean}, multipack::pack_bits, num::AllocatedNum, }, Circuit, ConstraintSystem, LinearCombination, SynthesisError, }; use blstrs::Scalar as Fr; use ff::{Field, PrimeFieldBits}; use filecoin_hashers::...
extern crate rand; use std::rc::Rc; use std::cell::RefCell; use self::rand::Rng; pub struct PPU { // The cycle number of the current scanline cycle: u16, // The current scanline number scanline: u16, // Current VRAM address vram_addr: u16, temp_addr: u16, x: u8, oddframe: bool,...
pub mod part_heads; use std::{ cell::{Cell, Ref, RefCell}, collections::HashSet, convert::{TryFrom, TryInto}, ops::Deref, rc::Rc, }; use bellframe::{ music::Regex, row::RowAccumulator, AnnotBlock, IncompatibleStages, Row, RowBuf, Stage, }; use emath::Pos2; use index_vec::index_vec; use jigsaw_...
use math::Vector3; use math::Euler; use math::EulerOrder; use math::Quaternion; #[derive(Debug,PartialEq,Copy,Clone)] pub struct Matrix4 { pub elements: [f32; 16], } pub struct MatrixBasis { pub x_axis: Vector3, pub y_axis: Vector3, pub z_axis: Vector3, } impl Matrix4 { pub const IDENTITY: Matrix...
// Copyright 2019 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::display_metrics::{DisplayMetrics, ViewingDistance}, crate::graphics_utils::{ImageResource, ScreenCoordinates, ScreenSize}, crate::...
pub mod api; mod atom; pub mod client; mod hints; pub mod monitor; pub mod signal; use crate::{ config, error::CritResult, layouts::Layout, util::{Action, Cursor, Key, XCursor, XCursorShape}, }; use atom::Atom; use client::Client; use monitor::Monitor; use std::{cmp, collections::HashMap, mem, slice}; ...
// Copyright 2019-2021 Google LLC // // 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 t...
use self::regs::*; use crate::cart::Cartridge; use bit_field::BitField; use std::{cell::Cell, ops::IndexMut}; pub use self::palettes::PALETTES; mod palettes; mod regs; const OAM_SIZE: usize = 0x100; const NAMETABLE_SIZE: usize = 0x1000; const PALETTES_SIZE: usize = 0x20; const BUF_SIZE: usize = 256 * 240 * 3; const ...
// Copyright 2019 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::queue, failure::Fail, fidl::endpoints::ServerEnd, fidl_fuchsia_amber::OpenedRepositoryProxy, fidl_fuchsia_io::{ Di...
use crate::actions::*; use crate::Sender; use bivec::BiVec; use chart::Backend; use fp::prime::ValidPrime; use fp::vector::FpVector; use fp::{ matrix::{Matrix, Subquotient}, vector::Slice, }; use serde::{Deserialize, Serialize}; use sseq::{Adams, Sseq, SseqProfile}; use std::cmp::{max, Ordering}; use std::colle...
mod filetype; mod parser; mod reduction; // FIXME: experimental! use super::foss::*; use super::fshelper::{is_executable, to_absolute_path}; use super::internal::{die, warn, AppOptions, Error}; use super::pattern::{Pattern, PatternBuilder}; use super::walk::DirEntry; pub use self::filetype::*; #[derive(Clone, Debug,...
// Imported from syn // Original source: https://github.com/dtolnay/syn/blob/04b7618556d3699e47edf517933376595ad8e2ac/src/lit.rs#L875 use proc_macro2 as pm; use proc_macro2::Span; use crate::bigint::BigInt; use std::char; use std::ops::{Index, RangeFrom}; /// A literal token #[derive(Debug, Clone)] pub struct Liter...
use std::os::raw::{ c_int, c_uchar }; use ffi; enum_from_primitive! { /// Named keys. /// /// [GLFW Reference][glfw] /// /// [glfw]: http://www.glfw.org/docs/3.3/group__keys.html #[repr(i32)] #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub enum KeyCode { Space = ffi::GL...
use std::collections::HashSet; use std::iter::FromIterator; use std::net::Ipv4Addr; use std::sync::{Arc, RwLock}; use std::time::Duration; use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; use tokio::net::tcp::WriteHalf; use tokio::net::TcpListener; use tokio::select; use tokio::sync::mpsc; use tokio::time::...
use enum_dispatch::enum_dispatch; use log::error; use crate::textures::dots::DotsTexture; use crate::textures::constant::ConstantTexture; use crate::textures::scaled::ScaleTexture; use crate::core::interaction::SurfaceInteraction; use crate::textures::imagemap::{ ImageTextureFloat, ImageTextureRGB}; use crate::textures...
use std::rc::Rc; use arret_runtime::abitype; use arret_runtime::boxed; use arret_syntax::datum::DataStr; use arret_syntax::span::Span; use crate::codegen::GenAbi; use crate::id_type::ArcId; use crate::mir::tagset::TypeTagSet; new_counting_id_type!(PrivateFunIdCounter, PrivateFunId); new_global_id_type!(RegId); #[...
use std::fmt; use std::fs::File; use std::io; use std::io::{Read, Write}; use std::path::{Path, PathBuf}; use grin_core::global::ChainTypes; use grin_util::logger::LoggingConfig; use grin_util::secp::key::PublicKey; use grin_wallet_libwallet::proof::proofaddress::ProvableAddress; use crate::contacts::{ DEFAULT_GRINBO...
use std::num::Wrapping; use super::{PPU, VRAM_BANK_SIZE, VRAM_NUM_BANKS_DMG, OAM_SIZE, WIDTH, HEIGHT, PpuMode, Bitmap, PpuIoRegister, TileDataAddress, Sprite, SpritePalette, SpritePriority, framebuffer::FrameBuffer}; use gameboy::cpu::interrupts::{Interrupt, InterruptLine}; /* RGBA shades for dmg */ #[allow(dead_code...
//! This module contains the code to instantiate a "query result", and //! in particular to extract out the resulting region obligations and //! encode them therein. //! //! For an overview of what canonicaliation is and how it fits into //! rustc, check out the [chapter in the rustc dev guide][c]. //! //! [c]: https:/...
// Rust Bitcoin Library // Written in 2018 by // <NAME> <<EMAIL>> // To the extent possible under law, the author(s) have dedicated all // copyright and related and neighboring rights to this software to // the public domain worldwide. This software is distributed without // any warranty. // // You should have rece...
// This is copied almost verbatim from: https://github.com/alexcrichton/wasm-gc // Commit: b261ea6339c9987c81fcc0c691189018cd514928 use std::path::Path; use std::collections::{BTreeSet, HashSet}; use std::str; use rustc_demangle; use parity_wasm::elements::*; pub fn run<I: AsRef<Path>, O: AsRef<Path>>(input: I, outp...
//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2018, the Perspective Authors. // // This file is part of the Perspective library, distributed under the terms // of the Apache License 2.0. The full license can be found in the LICENSE // file. mod copy; mod download...
// 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,...
// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0. use std::cmp; use std::fmt; use std::i32; use std::io; use std::ops::Deref; use std::path::{Path, PathBuf, MAIN_SEPARATOR}; use std::sync::Arc; use uuid::Uuid; use kvproto::import_kvpb::mutation::Op as MutationOp; use kvproto::import_kvpb::{WriteBatc...
// Copyright (c) 2020 Ant Financial // // 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 ...
//! Top level module for preparing measurements for the linear programming implementation. //! This is everything up-to the actual program estimation /* MIT License Copyright (c) 2020 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation file...
// Copyright 2021 - <NAME> <<EMAIL>> // SPDX-License-Identifier: Apache-2.0 use crate::contract_cache::ValidatorCache; use crate::node_status_api::ONE_DAY; use crate::nymd_client::Client; use crate::rewarding::error::RewardingError; use crate::storage::models::{ FailedMixnodeRewardChunk, PossiblyUnrewardedMixnode,...
use std::{collections::BTreeSet, fmt::Display}; use crate::{ config::{self, get_configuration}, error::{InquireError, InquireResult}, formatter::MultiOptionFormatter, input::Input, list_option::ListOption, terminal::get_default_terminal, type_aliases::Filter, ui::{Backend, Key, KeyModif...
use crate::utils::{ cargo, change_versions, is_unversioned, read_config, ChangeData, ChangeOpt, Error, GitOpt, GroupName, Pkg, Result, WorkspaceConfig, INTERNAL_ERR, }; use cargo_metadata::Metadata; use clap::{ArgEnum, ArgSettings, Parser}; use dialoguer::{theme::ColorfulTheme, Confirm, Input, Select}; use ocl...
#![forbid(unsafe_code)] use std::net::ToSocketAddrs; use std::num; use std::net::{IpAddr, TcpStream, Shutdown}; use std::io; use std::io::{Read, Write}; // use std::str; use std::io::{BufReader, BufRead, BufWriter}; use std::option::Option; use std::collections::HashMap; use std::fs::File; use std::fmt; use regex::Reg...
//! All the datatypes associated with MEV-Inspect use std::fmt; use std::ops::{Deref, DerefMut}; use std::str::FromStr; use ethers::types::{Action as TraceAction, Address, CallType, Trace, TxHash, U256}; pub use classification::Classification; pub use evaluation::{EvalError, Evaluation}; pub use inspection::Inspectio...
extern crate typemap; extern crate types; extern crate futures; use std::any::{Any, TypeId}; use std::collections::{BTreeMap, HashMap}; use std::future::Future; use types::traits::{System, Hosts, Host as HostTrait, Context, GlobalState, View}; use types::errors::traits::{AllocError, ReduceError}; use futures::task::Sp...
use super::{tb110_date::Tb110Date, tb210_position::Tb210Position}; use crate::{ apis::{ enums::{DialogTypeEnum, SearchDirectionEnum}, services, }, base::{ functions, parameter::{self}, }, config::{self, RsbpConfig, RsbpError}, forms::{ bin, control...
//! A Fast and Accurate Dependency Parser using Neural Networks //! <NAME> and <NAME>, EMNLP, 2014 //! http://aclweb.org/anthology/D14-1082 use std::f32::NEG_INFINITY as F32_NEG_INFINITY; use std::marker::PhantomData; use std::u32::MAX as U32_MAX; use monolith::lang::prelude::*; use monolith::models::*; use monolith:...
use std::marker::PhantomData; use bellperson::{Circuit, ConstraintSystem, SynthesisError}; use fil_sapling_crypto::circuit::{boolean, num}; use fil_sapling_crypto::jubjub::JubjubEngine; use paired::bls12_381::{Bls12, Fr}; use crate::circuit::constraint; use crate::circuit::drgporep::{ComponentPrivateInputs, DrgPoRepC...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 1020usize], #[doc = "0x3fc - GPIO Data"] pub data: DATA, #[doc = "0x400 - GPIO Direction"] pub dir: DIR, #[doc = "0x404 - GPIO Interrupt Sense"] pub is: IS, #[doc = "0x408 - GPIO Interrupt Both Edges"] ...
// This file is part of sv_check and subject to the terms of MIT Licence // Copyright (c) 2019, <EMAIL> use crate::reporter::{REPORTER, MsgID}; use crate::error::SvError; use crate::lex::token::{TokenKind}; use crate::lex::token_stream::TokenStream; use crate::ast::astnode::*; use crate::ast::common::*; use crate::ast...
use byteorder::{WriteBytesExt, BigEndian}; use pixels::{Pixels, SurfaceTexture}; use std::{fmt, thread, time}; use winit::dpi::{LogicalPosition, LogicalSize, PhysicalSize}; use winit::event::{Event, VirtualKeyCode}; use winit::event_loop::{ControlFlow, EventLoop}; use winit_input_helper::WinitInputHelper; const SCREEN...
/* Library file used to run DLA simulations. */ /* Imports */ use std::error::Error; pub(crate) mod writer; use std::time::Instant; use itertools::{iproduct, Itertools}; use ndarray::{Array, ArrayBase, Dim, OwnedRepr}; use math::round::floor; use kurbo::common::solve_quadratic as quad; use rayon::iter::{IntoPara...
use ark_std::{marker::PhantomData, Zero}; use super::{Fp, FpConfig}; use crate::{biginteger::arithmetic as fa, BigInt, BigInteger}; use ark_ff_macros::unroll_for_loops; /// A trait that specifies the constants and arithmetic procedures /// for Montgomery arithmetic over the prime field defined by `MODULUS`. /// /// #...
use anyhow::{anyhow, Result}; use base64::decode as base64decode; use regex::Regex; use serde::{Deserialize, Serialize}; use std::{ collections::{hash_map::DefaultHasher, HashMap, HashSet}, hash::{Hash, Hasher}, }; use woothee::parser::{Parser as UserAgentParser, WootheeResult}; #[derive(Deserialize, Serialize...
//! SQL commons. // #![cold] #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] use crate::{ enums::{YotsubaBoard, YotsubaEndpoint, YotsubaHash, YotsubaIdentifier}, mysql }; use anyhow::{anyhow, Result}; use async_trait::async_trait; use enum_iterator::IntoEnumIterator; use mysql_async:...
//! Wire protocol definitions for the Trivial File Transfer Protocol (TFTP). //! //! See https://tools.ietf.org/html/rfc1350 for the TFTP specification. // TODO: remove me once the TFTP client has been implemented! #![allow(unused)] use byteorder::{ByteOrder, NetworkEndian}; use core::str; use smoltcp::{Error, Result...
use clap::Clap; use genomicsqlite::ConnectionMethods; use json::object; use log::{debug, info, log_enabled, warn}; use num_format::{Locale, ToFormattedString}; use rusqlite::{params, OpenFlags, OptionalExtension, Statement, Transaction}; use std::cmp; use std::collections::{HashMap, HashSet}; use crate::bad_command; u...
//! Structural representations of regular patterns. //! //! ## Atoms //! //! Patterns are parameterized by the _kind_ of thing &mdash; bounded by the //! [`Atom`][Atom] trait &mdash; those patterns describe; regular expressions, //! for example, are usually patterns of characters. Like their real-world //! counterpart...
use super::StateParameters; use crate::jambler::state::IntervalTimerRequirements; use crate::jambler::state::StateMessage; use crate::jambler::JamblerState; use crate::jambler::StateReturn; use heapless::{consts::*, Vec}; use heapless::{ pool::singleton::{Box, Pool}, }; // TODO for using the pdu buffer use crate:...
#![no_std] #![feature(asm)] #![feature(start)] #![feature(naked_functions)] mod asm; mod console; mod descriptor_table; mod fifo; mod file; mod fonts; mod interrupt; mod keyboard; mod memory; mod mouse; mod mt; mod sheet; mod timer; mod vga; mod window; use core::fmt::Write; use core::panic::PanicInfo; use asm::{cli...
//! The worlds #1 TCP implementation use core::convert::TryInto; use crate::time; use crate::net::{Ip, ETHTYPE_IPV4, IPPROTO_TCP}; use crate::net::{Packet, NetDevice, NetAddress}; use crate::core_locals::LockInterrupts; use alloc::sync::Arc; use alloc::collections::VecDeque; use noodle::{Reader, Writer}; use lockcell:...
use super::*; use std::io::Read; #[derive(Debug, thiserror::Error)] pub enum Error { #[error("unsupported version")] UnsupportedVersion, #[error("invalid data: {}", .0)] InvalidData(String), #[error("io error: {}", .0)] Io(std::io::Error), } impl From<std::io::Error> for Error { fn from(sr...
//! GPU-accelerated image denoising using OptiX's AI models. use std::{ marker::PhantomData, mem::MaybeUninit, sync::{Arc, Mutex}, }; use cust::{ error::CudaResult, memory::{ DeviceBox, DeviceBuffer, DeviceCopy, DevicePointer, GpuBox, GpuBuffer, UnifiedBuffer, }, prelude::Stream, }...
//! A platform agnostic driver to interface with the BMP388 (pressure sensor) //! //! This driver is built using [`embedded-hal`] traits. #![deny(missing_docs)] #![deny(warnings)] #![no_std] extern crate embedded_hal as ehal; const ADDRESS: u8 = 0x76; /// BMP388 driver pub struct BMP388<I2C: ehal::blocking::i2c::Wr...
// Copyright (c) 2020 Huawei Technologies Co.,Ltd. All rights reserved. // // StratoVirt is licensed under Mulan PSL v2. // You can use this software according to the terms and conditions of the Mulan // PSL v2. // You may obtain a copy of Mulan PSL v2 at: // http://license.coscl.org.cn/MulanPSL2 // THIS SOFTWA...
use std::collections::HashMap; use std::env; use std::fmt; use std::hash::{Hash, Hasher}; use std::path::{Path, PathBuf}; use std::sync::Arc; use lazycell::LazyCell; use log::info; use super::{BuildContext, CompileKind, Context, FileFlavor, Layout}; use crate::core::compiler::{CompileMode, CompileTarget, CrateType, F...
use std::collections::HashMap; use std::fs; use regex::Regex; use serde::{Deserialize, Serialize}; const AMD_SPEEDS: &str = r#" { '8346': '1.8', '8347': '1.9', '8350': '2.0', '8354': '2.2', '8356|SE': '2.4', '8356': '2.3', '8360': '2.5', '2372': '2.1', '2373': '2.1', '2374': '2.2...
//! # Rust bindings to ImPlot //! //! This crate contains idiomatic bindings to the C++ [implot library](https://github.com/epezent/implot), //! which use the bindings exposed by the `implot-sys` crate. An attempt is made to keep //! documentation here somewhat self-contained, but when in doubt, the documentation of im...
mod nonterminal_set; use std::collections::btree_map::Entry; use std::collections::{BTreeMap, BTreeSet}; use std::fmt::{self, Write}; use lalr::*; use parser::nonterminal_set::NonterminalSet; use proc_macro; use proc_macro2::{Span, TokenStream}; use quote::ToTokens; use syn::parse::{Parse, ParseStream}; use syn::spa...
// External deps use crypto::{digest::Digest, sha2::Sha256}; use crypto_exports::franklin_crypto::{ alt_babyjubjub::AltJubjubBn256, bellman::pairing::{ bn256::{Bn256, Fr}, ff::{BitIterator, Field, PrimeField, PrimeFieldRepr}, }, eddsa::{PrivateKey, PublicKey}, jubjub::{FixedGenerator...
use crate::addr::*; use crate::arch::{ arch_get_current_page_table_with_pcid, arch_set_current_page_table_with_pcid, arch_with_pcid_array, arch_flush_pcid, MAX_PCID, MIN_PCID, task::{ arch_enter_user_mode, arch_enter_user_mode_syscall, arch_get_kernel_tls, arch_init_kernel_tls_fo...
#[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ attr, to_binary, Addr, BankMsg, Binary, Coin, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Response, StdResult, Uint128, WasmMsg, }; use std::cmp::{max, min}; use crate::collateral::{ liquidate_collateral, lock_collateral, q...
use std::f32::EPSILON; use math::Euler; use math::EulerOrder; use math::Matrix4; use math::Vector3; #[derive(Debug,PartialEq,Clone)] pub struct Quaternion { pub x: f32, pub y: f32, pub z: f32, pub w: f32, } impl Quaternion { pub const DEFAULT: Quaternion = Quaternion { x: 0.0, y: ...
use std::rc::Rc; use std::hash::Hash; use std::mem; use std::collections::{HashMap, hash_map::Entry}; use super::environment::{AtomID, Type}; use super::{LocalContext, ElabError, Result, Elaborator, Environment, SortID, TermID, ThmID, ExprNode, ProofNode, DeclKey}; use super::lisp::{LispVal, LispKind, Uncons, InferTa...
/*! (dev) `twist!` implementation We also define some macros in this module, but since they're macros, they're accessible from the crate root: - (dev) `__impl_twist` - `twist!` - `next_if!` and `last_if!` We also reexport all the types in this module for convenience. */ /** (dev) Error message when trying to break w...
//! NMEA is the sentence format for receiving data from a GPS. //! //! # GPS outputs //! ## GPS sentence outputs. //! - GGA -> UTC, Latitude, Longitude, Position fix (GPS, DGPS, No fix), sats used, HDOP, altitude, Geoidal Seperation, Age of diff corr //! - VTG -> Course (true), Course (magnetic), speed knots, speed kph...
use std::{ ffi::OsStr, io, sync::Arc, time::{Duration, SystemTime, UNIX_EPOCH}, }; use anyhow::Result; use camino::Utf8PathBuf; use polyfuse::{ op, reply::{AttrOut, EntryOut, FileAttr, OpenOut, ReaddirOut}, KernelConfig, Operation, Request, Session, }; use tokio::{ io::{unix::AsyncFd, I...
// #![cfg_attr(debug_assertions, windows_subsystem = "windows")] use anyhow::Result; use log::{debug, error, info, warn}; use ncs::errors::NcsError::*; use ncs::local_listen::*; use ncs::meta::*; use ncs::nc_listen::*; use ncs::network::{self, NetworkStatus}; use ncs::*; use next_client_win::{config, logging, ncsync_da...
use async_compat::CompatExt; use distant_core::{ data::{DirEntry, Error as DistantError, FileType, Metadata, RunningProcess, SystemInfo}, Request, RequestData, Response, ResponseData, }; use futures::future; use log::*; use std::{ collections::HashMap, future::Future, io::{self, Read, Write}, pa...
// Copyright 2021 The AccessKit Authors. All rights reserved. // Licensed under the Apache License, Version 2.0 (found in // the LICENSE-APACHE file) or the MIT license (found in // the LICENSE-MIT file), at your option. // Derived from Chromium's accessibility abstraction. // Copyright 2021 The Chromium Authors. All ...
#![allow(dead_code)] use crate::error::{ErrorKind, Item}; use crate::fmt_util::ty_var_name; use crate::types::{ generalize, Bs, Env, FixedTyVars, FunSig, IdStatus, Sig, StrEnv, Sym, Ty, TyEnv, TyInfo, TyNameSet, TyScheme, TyVarKind, ValEnv, ValInfo, }; use crate::util::{apply_bv, cannot_bind_val, get_env, get_ty_i...
// Copyright 2016 TiKV Project Authors. Licensed under Apache-2.0. //! Scheduler which schedules the execution of `storage::Command`s. //! //! There is one scheduler for each store. It receives commands from clients, executes them against //! the MVCC layer storage engine. //! //! Logically, the data organization hier...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - DMA Status Registers"] pub status: STATUS, #[doc = "0x04 - DMA Configuration Register"] pub config: CONFIG, #[doc = "0x08 - Channel Control Data Base Pointer Register"] pub ctrlbase: CTRLBASE, #[doc = "0x0c - Ch...
//! Power-law electron distribution. pub mod acceleration; use super::{ super::{feb, BeamPropertiesCollection, FixedBeamScalarValues, FixedBeamVectorValues}, DepletionStatus, Distribution, PropagationResult, }; use crate::{ constants::{KEV_TO_ERG, M_H, PI, Q_ELECTRON}, field::CachingScalarFieldProvide...
/* gifski pngquant-based GIF encoder © 2017 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program ...
use std::fmt; #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] pub enum Register { Zero, Ra, Sp, Gp, Tp, T0, T1, T2, S0, S1, A0, A1, A2, A3, A4, A5, A6, A7, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, T3...
use crate::api::TypedWebSocket; use crate::words; use anyhow::{anyhow, Error}; use ferrogallic_shared::api::game::{ Canvas, Game, GamePhase, GameReq, GameState, Player, PlayerStatus, }; use ferrogallic_shared::config::{ close_guess_levenshtein, FIRST_CORRECT_BONUS, HEARTBEAT_SECONDS, MINIMUM_GUESS_SCORE, NU...
//! Synthesizer unit testable logic. #![cfg_attr(not(test), no_std)] use arrayvec::ArrayVec; use core::{ cmp::{max, min}, convert::{TryFrom, TryInto}, }; use wmidi::{Channel, FromBytesError, MidiMessage, PitchBend, ProgramNumber, Velocity}; /// Precomputed tables to get pitch and wavelength. mod lookup; /// M...
//! The execution context and other core structures use std::{ mem::{ size_of, align_of, zeroed, }, ffi::{ CStr, }, }; type PeekableSliceIter<'a, T> = std::iter::Peekable<std::slice::Iter<'a, T>>; use llvm_sys::{ prelude::{ LLVMContextRef, LLVMModuleRef, LLVMBuilderRef, LLVMPassManagerRef, ...
mod compute_device; use std::{collections::HashMap, convert::TryInto, mem, u64}; use crate::{ animation::{Animation, AnimationTargetType}, auxiliary_data::{ aux_data_consumer_type_is_compatible, aux_data_to_consumer_type, AuxiliaryData, AuxiliaryDataType, AuxiliaryDataTypeConsumer, }, ...
use core::{cmp, marker::PhantomData, mem, ops::Add, slice}; use crate::{ fs::InodeGuard, kernel::kernel_builder, memlayout::{kstack, FINISHER, KERNBASE, PHYSTOP, PLIC, TRAMPOLINE, TRAPFRAME, UART0, VIRTIO0}, page::Page, param::NPROC, riscv::{ make_satp, pa2pte, pgrounddown, pgroundup, p...
use std::path::Path; use std::{io, net::SocketAddr, panic, time::Duration}; use either::Either; use futures::{future::FutureExt as _, select, stream::StreamExt as _}; use thiserror::Error; use librad::{ git, git::{identities, refs, storage, storage::fetcher, tracking}, net::{ discovery::{self, Dis...
//! Serialized configuration of a build. //! //! This module implements parsing `config.toml` configuration files to tweak //! how the build runs. use std::collections::{HashMap, HashSet}; use std::env; use std::fs; use std::path::{Path, PathBuf}; use std::process; use std::cmp; use num_cpus; use toml; use crate::cac...
use bellman::{Circuit, ConstraintSystem, SynthesisError}; use ff::PrimeField; use pairing::bls12_381::{Bls12, Fr}; use sapling_crypto::circuit::boolean::{self, Boolean}; use sapling_crypto::circuit::{multipack, num}; use sapling_crypto::jubjub::JubjubEngine; use crate::circuit::constraint; use crate::circuit::kdf::kdf...
use ff::{Field, PrimeField}; use groupy::{CurveAffine, CurveProjective}; use rayon::prelude::*; use super::{ commit, commit::{VKey, WKey}, compress, inner_product, poly::DensePolynomial, structured_scalar_power, transcript::Transcript, AggregateProof, GipaProof, KZGOpening, Prove...
macro_rules! modulus { ($($name:ident),*) => { $( #[derive(Copy, Clone, Eq, PartialEq)] enum $name {} impl Modulus for $name { const VALUE: u32 = $name as _; const HINT_VALUE_IS_PRIME: bool = true; fn butterfly_cache() -> ...
//! # Analog to Digital Converter. //! //! ## Examples //! //! Check out [examles/adc.rs][]. //! //! It can be built for the STM32F3Discovery running //! `cargo build --example adc --features=stm32f303xc` //! //! [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.8.0/examples/adc.rs use cortex_m::asm...
// 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. use { crate::buffer::Buffer, crate::buffer::ImageInstanceId, crate::client::{Client, TaskQueue}, crate::display::Callback, crate::objec...
use std::collections::{BTreeMap, BTreeSet}; use std::path::{Path, PathBuf}; use structopt::clap::AppSettings; use structopt::StructOpt; use pacman_repo_tools::db::{read_db_dir, DatabasePackage}; use pacman_repo_tools::msg::{use_color, Paint}; use pacman_repo_tools::parse::rpartition; use pacman_repo_tools::{error, msg...
use serde::{Deserialize, Serialize}; use std::{ collections::{hash_map::Entry, HashMap}, fmt, path::{Path, PathBuf}, str::FromStr, }; const DAPPTOOLS_CONTRACTS_DIR: &str = "src"; const DAPPTOOLS_LIB_DIR: &str = "lib"; const JS_CONTRACTS_DIR: &str = "contracts"; const JS_LIB_DIR: &str = "node_modules"; ...
//! Baja //! //! ## Authors //! //! The Veracruz Development Team. //! //! ## Licensing and copyright notice //! //! See the `LICENSE.markdown` file in the Veracruz root directory for //! information on licensing and copyright. use super::BajaError; use crate::baja_session::BajaSession; use ring; use rustls; use std::...