text stringlengths 9.08k 47.9k |
|---|
extern crate pest;
#[macro_use]
extern crate pest_derive;
extern crate lazy_static;
extern crate log;
use std::error::Error;
use lazy_static::lazy_static;
use log::{debug, trace};
use pest::{
iterators::{Pair, Pairs},
prec_climber::{Assoc, Operator, PrecClimber},
Parser,
};
use styxc_ast::{
control::L... |
use anyhow::{Context, Result};
use std::borrow::ToOwned;
use std::ffi::OsString;
use std::fs::File;
use std::io::Read;
use std::path::{Path, PathBuf};
use std::process::Command;
#[derive(Deserialize, Debug, Clone, Copy)]
pub struct Color {
pub r: u8,
pub g: u8,
pub b: u8,
}
#[rustfmt::skip]
const DARK_BLU... |
use std::fs;
use std::fs::File;
use std::io;
use std::io::prelude::*;
use std::path::Path;
use std::path::PathBuf;
use std::process;
use std::process::{Child, Command, Stdio};
use std::thread;
use std::fmt;
use itertools::{iproduct, Itertools};
use rustc_serialize::Encodable;
use std::time::Duration;
use wait_timeout... |
use bitfield::BitRange;
use bitfield::bitfield;
use crate::mapper::Mapper;
use std::rc::Rc;
use std::cell::RefCell;
/// Width of the screen for NTSC systems
pub const SCREEN_WIDTH: usize = 256;
/// Height of the screen for NTSC systems
pub const SCREEN_HEIGHT: usize = 240;
pub const PALETTE: [u8; 192] = [
0x7C... |
// Copyright © 2015, skdltmxn
// Licensed under the MIT License <LICENSE.md>
STRUCT!{struct ERROR_LOG {
el_len: ::DWORD,
el_reserved: ::DWORD,
el_time: ::DWORD,
el_error: ::DWORD,
el_name: ::LPWSTR,
el_text: ::LPWSTR,
el_data: ::LPBYTE,
el_data_size: ::DWORD,
el_nstrings: ::DWORD,
}}... |
//! Contains Rant's syntax tree implementation and supporting data structures.
use std::{collections::HashMap, fmt::Display, ops::{Deref, DerefMut}, rc::Rc};
use crate::{RantProgramInfo, InternalString, RantValue, RantValueType};
pub(crate) const PIPE_VALUE_NAME: &str = "~PIPE";
/// Printflags indicate to the compil... |
// Copyright 2019 <NAME>
// Dual licensed under the Apache 2.0 and MIT licenses.
use stm32ral::usb;
use stm32ral::{read_reg, write_reg, modify_reg};
mod packets;
mod buffers;
mod descriptors;
use packets::{*, ToBytes};
use buffers::*;
use descriptors::*;
use crate::app::{PinState, Mode, Request};
use... |
use clap::Parser;
use core::num;
use regex::Regex;
use std::{
cmp::{max, min},
collections::{BTreeSet, HashMap, HashSet},
fs,
hash::Hash,
panic,
slice::SliceIndex,
};
#[derive(Parser)]
#[clap(version = "1.0", author = "<NAME>. <<EMAIL>>")]
struct Opts {
#[clap(short, long)]
problem: i32... |
use std::convert::TryInto;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use bindle::client::{
tokens::{HttpBasic, NoToken, OidcToken, TokenManager},
Client, ClientBuilder, ClientError, Result,
};
use bindle::invoice::signature::{
KeyRing, SecretKeyEntry, SecretKeyFile, SecretKeyStorage, SignatureRol... |
// This file is part of Substrate.
// Copyright (C) 2019-2020 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// 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
//
// ht... |
//! Inter-Integrated Circuit (I2C) bus
//! For now, only master mode is implemented
// NB : this implementation started as a modified copy of https://github.com/stm32-rs/stm32f1xx-hal/blob/master/src/i2c.rs
use crate::gpio::{self, Alternate, OpenDrain};
use crate::hal::blocking::i2c::{Read, Write, WriteRead};
use cra... |
//! Implementation of fmt::Display for [GenericFraction] and [Sign] structures
//!
//! Complete support of the [std::fmt] formatting syntax with exceptions for alternate
//! integer types (hexadecimal, octal, binary)
//!
//! There are a couple of extensions on top of std::fmt, which are
//! - Alternate flag (`#`) is ... |
//! Trust region optimization method.
//!
//! More than a particular algorithm, [trust
//! region](https://en.wikipedia.org/wiki/Trust_region) methods is actually sort
//! of a framework of various techniques. This also applies to the
//! implementation of this method in gomez; it is composed of multiple
//! techniques... |
//! Contains the tree struct, which is used to hold all chunks
use crate::traits::*;
use std::collections::{HashMap, VecDeque};
use std::num::NonZeroUsize;
// struct for keeping track of chunks
// keeps track of the parent and child indices
#[derive(Copy, Clone, Debug, Default)]
pub(crate) struct TreeNode {
// c... |
use std::{
num::NonZeroU64,
ops::{Range, Rem, Sub},
};
use bytemuck::{bytes_of, cast_slice, Pod, Zeroable};
use cgmath::{Matrix4, SquareMatrix, Zero};
use rand::Rng;
use wgpu::{include_wgsl, util::DeviceExt};
use wgrepp::ssao::{SsaoEffect, SsaoResources};
use winit::{
dpi::PhysicalSize,
event::{Element... |
//! This crate implements the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) standard in Rust.
//! It also has optional Serde support, by using the `serde` feature:
//!
//! ```toml
//! isolanguage-1 = { version = "0.2.2", features = ["serde"] }
//! ```
//!
//! The main type is the `LanguageCode` type, which is an... |
#[cfg(feature = "cuda")]
use crate::cuda::set_device;
use crate::backward::PythonGradientBatch;
use crate::data::{EmbeddingTensor, PersiaBatchData};
use crate::dlpack::DLManagedTensor;
use crate::metrics::MetricsHolder;
use crate::tensor::{CPUStorage, DType, Storage, Tensor};
use crate::utils::PyPersiaBatchDataReceive... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Port Control Register"]
pub pa_ctrl: crate::Reg<pa_ctrl::PA_CTRL_SPEC>,
#[doc = "0x04 - Port Pin Mode Low Register"]
pub pa_model: crate::Reg<pa_model::PA_MODEL_SPEC>,
#[doc = "0x08 - Port Pin Mode High Register"]
p... |
//! Slow, fallback cases where we cannot unambiguously round a float.
//!
//! This occurs when we cannot determine the exact representation using
//! both the fast path (native) cases nor the Lemire/Bellerophon algorithms,
//! and therefore must fallback to a slow, arbitrary-precision representation.
#![doc(hidden)]
... |
use crate::common::{Clocked, Shared, Addressable};
use crate::cpu::Cpu;
use crate::memory::{PpuMem, PpuMask};
pub struct Ppu {
mem: Shared<PpuMem>,
cpu: Shared<Cpu>,
tile: Option<Tile>,
sprites: Box<Vec<Sprite>>,
framebuffer_index: usize,
framebuffer: [u8; (256 * 240 * 3)],
scanline: i16, ... |
use std::{
borrow::Cow,
sync::{
Arc,
Mutex,
},
thread,
};
use vulkano::{
buffer::{
BufferUsage,
CpuAccessibleBuffer,
cpu_pool::CpuBufferPool,
},
command_buffer::{
AutoCommandBufferBuilder,
CommandBufferUsage,
DynamicState,
... |
// Copyright (C) 2021 <NAME>
// SPDX-License-Identifier: MIT OR Apache-2.0
#![forbid(unsafe_code)]
use std::cmp::Ordering;
use std::convert::TryFrom;
use std::error::Error;
use std::fmt::{Display, Debug, Error as FmtError, Formatter};
use std::str::FromStr;
use lazy_static::lazy_static;
use rand::{thread_rng, Rng};
... |
// Copyright 2016 <NAME>.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those t... |
//! Command-line interface (subcommands, arguments, and handling)
//!
//! For overall architecture, see [ARCHITECTURE.md](https://gitlab.com/tangram-vision-oss/bolster/-/blob/main/ARCHITECTURE.md)
use std::{
ffi::OsStr,
fmt::Display,
io::{self, Write},
path::{Component, Path, PathBuf},
str::FromStr... |
use shared::fact::{Fact, Getter, FactFieldType, GetFieldType};
use shared::nodes::alpha::{IsHashEq, AlphaNode};
use shared::nodes::beta::{CollectRequired, BetaNode};
use shared::compiler::prelude::Stage1Node;
use runtime::memory::StringCache;
use shared::compiler::prelude::{DrainWhere, ProvidesNode};
use shared::compil... |
//! This crate automatically generates the definition of the Visitor,
//! VisitorMut, and Folder traits in `syn` based on the `syn` source. It
//! discovers structs and enums declared with the `ast_*` macros and generates
//! the functions for those types.
//!
//! It makes a few assumptions about the target crate:
//! ... |
//! Block header
use crate::{ADDigest, BlockId, Digest32, EcPoint};
use num_bigint::BigInt;
use sigma_ser::vlq_encode::{ReadSigmaVlqExt, WriteSigmaVlqExt};
use sigma_ser::{
ScorexParsingError, ScorexSerializable, ScorexSerializationError, ScorexSerializeResult,
};
use sigma_util::hash::blake2b256_hash;
use std::io:... |
use crate::operations::{
do_operation, pop_concrete, pop_stack_value, pop_value, push_value, Operations, OPS,
};
use crate::r2_api::{hex_decode, CallingConvention, Instruction, Syscall};
use crate::value::{vc, Value};
use crate::state::{
Event, EventContext, EventTrigger, ExecMode, StackItem, State, StateStatu... |
use super::weather::Weather;
use super::{Camera, GameContext, SimpleCull};
use base::math::*;
use glium;
use glium::backend::Facade;
use glium::draw_parameters::DrawParameters;
use glium::framebuffer::SimpleFrameBuffer;
use glium::framebuffer::ToColorAttachment;
use glium::index::PrimitiveType;
use glium::texture::text... |
use parking_lot::{Mutex, RwLock};
use std::mem;
use std::ptr;
use std::sync::Arc;
use crate::compiler;
use crate::compiler::compile_stub;
use crate::compiler::dora_stub;
use crate::compiler::fct::JitFct;
use crate::compiler::map::{CodeDescriptor, CodeMap};
use crate::compiler::native_stub::{self, NativeFct, NativeFctD... |
//! A module for making raw requests to Discord's API.
use crate::context::DiscordContext;
use derive_setters::*;
use enumset::*;
use minnie_errors::*;
use minnie_model::channel::*;
use minnie_model::guild::*;
use minnie_model::message::*;
use minnie_model::types::*;
use minnie_model::user::*;
use parking_lot::Mutex;
... |
/*!
* Function of PortMidi
*/
use std::{ptr};
use core::mem::transmute;
use libc::c_char;
use std::string::raw;
#[deriving(Show, PartialEq, Eq, FromPrimitive)]
pub enum PmError {
PmNoError = ffi::PmNoError as int,
PmGotData = ffi::PmGotData as int, /* < A "no error" return that also indicates data available ... |
//! Reimplementation of DrPetter's "sfxr" sound effect generator.
//!
//! This crate provides tools for creating quick placeholder sound effects. The effects are
//! primarily intended to be used in quickly made games.
//!
//! Sound effects are first defined as `Sample` values, which has many fields for tuning the
//! ... |
use super::*;
use crate::mut_input::sign::{Sign, SignInfo};
use angora_common::{
config::{self, FuzzerConfig},
debug_cmpid, defs,
};
use log::debug;
enum DescendStatus {
/// The preidcate is solved while we are descending.
SolvedHalfWay,
/// Unable to move to a lower value for given step size,
... |
// tests/tests_macos.rs
//
// This file may look funny, as using the objc crate to cross-communicate with Objective-C involves heavy use of the msg_send![] macro. This macro allows interoperable calls to Objective-C methods on Objective-C objects, and mimics the syntax of such Objective-C method calls.
//
// Such calls... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
use core::fmt;
///Error returned when trying to scale a value into HpVoldB.
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
pub enum HpVoldBScaleError {
///The given range is null.
NullRange,
///The given value is outside the given range.
OutOfRange,
}
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
/// Hea... |
use std::cmp;
use arrayvec::ArrayVec;
use erupt::vk;
use crate::{
vks::{self, VkObject},
Device,
};
const MAX_FRAMES_IN_FLIGHT: usize = 2;
const SWAPCHAIN_CHOOSES_EXTENT: vk::Extent2D = vk::Extent2D {
width: u32::MAX,
height: u32::MAX,
};
/// A set of synchronization primitives used to control rende... |
// Copyright (c) 2019 Parity Technologies (UK) Ltd.
//
// 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 b... |
//#![allow(dead_code)]
use std::{
iter,
mem,
sync::{
Arc,
Mutex,
},
};
use crate::{
error::WriteError,
head::Head,
slab::{
EdgeLink,
EntityId,
EntityType,
SlabHandle,
SlotId,
MAX_SLOTS,
},
};
/// # What is a Stash?
/// Stas... |
//! This module provides the Database Layer.
use crate::{
atomic_option::AtomicOption,
cache::ClockCache,
checksum::{XxHash, XxHashBuilder},
compression::CompressionConfiguration,
cow_bytes::SlicedCowBytes,
data_management::{
self, Dml, DmlBase, DmlWithCache, DmlWithHandler, DmlWithSpl, ... |
use std::fs::File;
use std::io::Read;
use std::env;
use std::path::{Path,PathBuf};
use std::collections::BTreeMap;
use std::fs::{read_dir};
use toml;
#[derive(Debug)]
struct PackageInfo {
name: String,
version: Option<String>,
source: Option<PathBuf>
}
// otry is 'option try'
macro_rules! otry {
($e:e... |
// Copyright 2016 Mozilla Foundation
//
// 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... |
// Copyright (C) 2019 Red Hat, Inc. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright (C) 2019 Alibaba Cloud Computing. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Id... |
// Copyright 2018-2020 argmin developers
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according... |
//! Inodes.
//!
//! An inode describes a single unnamed file.
//! The inode disk structure holds metadata: the file's type,
//! its size, the number of links referring to it, and the
//! list of blocks holding the file's content.
//!
//! The inodes are laid out sequentially on disk at
//! kernel().file_system.superbloc... |
use std::borrow::Cow;
use std::cmp;
use std::cmp::Ordering::{self, Less, Greater, Equal};
use std::iter::repeat;
use std::mem;
use traits;
use traits::{Zero, One};
use biguint::BigUint;
use bigint::BigInt;
use bigint::Sign;
use bigint::Sign::{Minus, NoSign, Plus};
#[allow(non_snake_case)]
pub mod big_digit {
///... |
#![allow(clippy::redundant_closure_call)]
use peg::parser;
use std::{
path::{Path, PathBuf},
rc::Rc,
};
mod expr;
pub use expr::*;
pub use jrsonnet_interner::IStr;
pub use peg;
pub struct ParserSettings {
pub loc_data: bool,
pub file_name: Rc<Path>,
}
macro_rules! expr_bin {
($a:ident $op:ident $b:ident) => {
... |
// Copyright 2017 <NAME>
//
// This file is part of the PulseAudio Rust language binding.
//
// Licensed under the MIT license or the Apache license (version 2.0), at your option. You may not
// copy, modify, or distribute this file except in compliance with said license. You can find copies
// of these licenses either... |
use super::Error;
use super::debug;
use super::graph;
use super::spans;
use debug::{DebugCounters, NESTED_INDENT};
use graph::{BasicCoverageBlock, BcbBranch, CoverageGraph, TraverseCoverageGraphWithLoops};
use spans::CoverageSpan;
use rustc_data_structures::graph::WithNumNodes;
use rustc_index::bit_set::BitSet;
use ... |
// 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... |
const BLOCK_SIZE: usize = 64;
const STATE_SIZE: usize = 5;
const RESULT_SIZE: usize = 20;
const INIT_STATE: [u32; STATE_SIZE] = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
const K1: u32 = 0x5a827999;
const K2: u32 = 0x6ed9eba1;
const K3: u32 = 0x8f1bbcdc;
const K4: u32 = 0xca62c1d6;
#[inline(always)... |
// This would be nice once it stabilizes:
// https://github.com/rust-lang/rust/issues/44732
// #![feature(external_doc)]
// #![doc(include = "../README.md")]
//! This is a Rust crate which can take a [json schema (draft
//! 4)](http://json-schema.org/) and generate Rust types which are
//! serializable with [serde](ht... |
//! Manages compiling of a `Project`
//!
//! The compilation of a project is performed in several steps.
//!
//! First the project's dependency graph [`crate::Graph`] is constructed and all imported
//! dependencies are resolved. The graph holds all the relationships between the files and their
//! versions. From there... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Global Type Register"]
pub xdmac_gtype: XDMAC_GTYPE,
#[doc = "0x04 - Global Configuration Register"]
pub xdmac_gcfg: XDMAC_GCFG,
#[doc = "0x08 - Global Weighted Arbiter Configuration Register"]
pub xdmac_gwac: XDMAC... |
// Copyright (c) 2016 <NAME>
extern crate cairo;
extern crate gds;
extern crate getopts;
// mod parser;
use std::io::{Read, BufRead, BufReader, stderr, stdin, Write};
use std::env;
use std::fs::File;
use getopts::Options;
use std::collections::{HashMap, HashSet, BTreeMap};
use std::rc::Rc;
// use parser::{Parser, Byte... |
// Copyright 2019 The Matrix.org Foundation C.I.C.
//
// 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... |
#![doc(html_root_url = "https://docs.rs/bme280")]
#![doc(issue_tracker_base_url = "https://github.com/uber-foo/bme280/issues/")]
#![deny(
missing_docs,
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unuse... |
use std::collections::{HashMap, HashSet};
use actix::SystemRunner;
use failure::{Error, format_err};
use log::{info, debug};
use std::time::Instant;
use serde_derive::Deserialize;
use tesseract_core::{Schema, Backend};
use tesseract_core::names::{LevelName, Property};
use tesseract_core::schema::{Level, Cube, InlineT... |
use std::any::{Any, TypeId};
use std::cell::RefCell;
use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::fmt::Write;
use std::marker::PhantomData;
use std::rc::Rc;
use scoped_tls::scoped_thread_local;
use zvariant::{ObjectPath, OwnedValue, Value};
use crate::{dbus_interface, fdo, Connection... |
use crate::{SparseBiPolyZp, SparsePolyZp};
use common::{assert, assert_eq};
use common::{prover, FiatShamirRng, Int, PolyZ, PolyZp, Prover, RSAGroup};
use dark::DARK;
use rug::Assign;
use std::num::NonZeroUsize;
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct ABC {
pub a: Int,
pub b: I... |
use serde::de::DeserializeOwned;
#[cfg(feature = "stargate")]
use serde::Serialize;
use std::collections::HashMap;
use crate::addresses::{CanonicalAddr, HumanAddr};
use crate::binary::Binary;
use crate::coins::Coin;
use crate::deps::OwnedDeps;
use crate::errors::{StdError, StdResult, SystemError};
#[cfg(feature = "sta... |
use jsonrpc_core::Value;
use lsp_msg_derive::{lsp_object, lsp_kind};
use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};
#[lsp_kind]
#[serde(untagged)]
pub enum Elective<T> {
Absent,
Present(T)
}
impl<T> Elective<T> {
fn is_absent(&self) -> bool {
match self {
... |
/*
* Copyright 2018 <NAME>
*
* This is free software, distributed under the MIT license. A copy of the
* license can be found in the LICENSE file in the project root, or at
* https://opensource.org/licenses/MIT.
*/
//! Chip-8 instructions and opcodes.
//!
//! This module provides the basic types and functions f... |
//! Types representing query execution strategies.
//!
//! The [`plan_expr`][pe] function takes an `Expr` and produces a `Plan` for
//! evaluating it.
//!
//! [pe]: fn.plan_expr.html
use fallible_iterator::{self, FallibleIterator};
use regex;
use super::ast::{Expr, LambdaId, Predicate, PredicateOp, Var};
use super::b... |
// Copyright 2021 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.
//! The qemu_base module encapsulates traits and functions specific
//! for engines using QEMU as the emulator platform.
use crate::{arg_templates::proces... |
use crate::durability::Durability;
use crate::plumbing::CycleRecoveryStrategy;
use crate::revision::{AtomicRevision, Revision};
use crate::{Cancelled, Cycle, Database, DatabaseKeyIndex, Event, EventKind};
use log::debug;
use parking_lot::lock_api::{RawRwLock, RawRwLockRecursive};
use parking_lot::{Mutex, RwLock};
use r... |
// 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::startup,
anyhow::{format_err, Context, Error},
cm_rust::{CapabilityName, CapabilityTypeName, FidlIntoNative},
cm_types::Url,
... |
use std::{
cmp::Ordering,
collections::HashSet,
fmt::Debug,
hash::{Hash, Hasher},
time::Instant,
};
use cactus::Cactus;
use cfgrammar::TIdx;
use lrtable::{Action, StIdx};
use num_traits::{AsPrimitive, PrimInt, Unsigned};
use super::{
dijkstra::dijkstra,
parser::{AStackType, ParseRepair, Pa... |
use crate::debug::TableEntry;
use crate::derived::MemoizationPolicy;
use crate::durability::Durability;
use crate::lru::LruIndex;
use crate::lru::LruNode;
use crate::plumbing::{DatabaseOps, QueryFunction};
use crate::revision::Revision;
use crate::runtime::local_state::ActiveQueryGuard;
use crate::runtime::local_state:... |
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
#[doc = "0x00 - Hibernation RTC Counter"]
pub rtcc: RTCC,
#[doc = "0x04 - Hibernation RTC Match 0"]
pub rtcm0: RTCM0,
_reserved2: [u8; 4usize],
#[doc = "0x0c - Hibernation RTC Load"]
pub rtcld: RTCLD,
#[doc = "0x10 - Hibern... |
use crate::internal::{unordered_load3, Filled, HashPacket, PACKET_SIZE};
use crate::{HighwayHash, Key};
use core::arch::wasm32::{self, v128};
use core::ops::{
Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, ShlAssign,
ShrAssign, SubAssign,
};
/// HighwayHash powered by Wasm SIMD... |
// Chariot: An open source reimplementation of Age of Empires (1997)
// Copyright (c) 2016 <NAME>
//
// 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 ... |
use lazy_static::lazy_static;
use log::{debug, trace};
use proc_macro2::TokenStream;
use rustc_hash::FxHashMap;
use syn::{parse_quote, spanned::Spanned, Type};
use crate::{
ast::{fn_arg_type, list_lifetimes, normalize_ty_lifetimes, DisplayToTokens, RustType},
error::{DiagnosticError, Result},
java_jni::{
... |
/* raylib-rs
safe_types.rs - Safe versions of raylib structs
Copyright (c) 2018-2019 <NAME> (@deltaphc)
This software is provided "as-is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to ... |
//! Input Handlers
use crate::{udev, kernel_input, epoll::Epoll};
use std::rc::Rc;
use std::cell::RefCell;
pub struct InputNativeLink {
ws_ref: std::rc::Weak<RefCell<super::X11>>
}
impl InputNativeLink {
pub fn new(ws: &Rc<RefCell<super::X11>>) -> Self {
InputNativeLink { ws_ref: std::rc::Rc::downgrade(ws) }
... |
/*!
Mapping complex text to a sequence of positioned glyphs.
Shaping is the process of converting a sequence of
[character clusters](CharCluster) into a sequence of
[glyph clusters](GlyphCluster) with respect to the rules of a particular
writing system and the typographic features available in a font. The shaper
opera... |
use std::collections::HashMap;
use std::fs::File;
use comfy_table::{Attribute, Cell, CellAlignment, Color, ContentArrangement, Table};
use epub_builder::{EpubBuilder, EpubContent, TocElement, ZipLibrary};
use html5ever::tendril::fmt::Slice;
use indicatif::{ProgressBar, ProgressStyle};
use kuchiki::NodeRef;
use log::{d... |
// Generated from definition io.k8s.api.core.v1.PersistentVolumeSpec
/// PersistentVolumeSpec is the specification of a persistent volume.
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PersistentVolumeSpec {
/// AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
use std::fmt;
use std::borrow::Cow;
use combine::{StreamOnce, Positioned};
use combine::error::{StreamError};
use combine::stream::{ResetStream};
use combine::easy::{Error, Errors};
use twoway::find_str;
use crate::position::Pos;
// Current max keyword length is 10, but we're reserving some space
pub const MAX_KEYW... |
// Copyright (c) The Libra Core Contributors
// SPDX-License-Identifier: Apache-2.0
//! The ConnectivityManager actor is responsible for ensuring that we are
//! connected to a node if and only if it is an eligible node.
//!
//! A list of eligible nodes is received at initialization, and updates are
//! received on ch... |
// 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 ... |
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
/// `VsockPacket` provides a thin wrapper over the buffers exchanged via virtio queues.
/// There are two components to a vsock packet, each using its own descriptor in a
/// virtio queue:
/// - the pac... |
use crate::options::{self, BuildOptions, Sanitizer};
use crate::utils::default_target;
use anyhow::{anyhow, bail, Context, Result};
use std::collections::HashSet;
use std::io::Read;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::{
env, ffi, fs,
process::{Command, Stdio},
time,
};
const DEFAUL... |
//! THIR datatypes and definitions. See the [rustc dev guide] for more info.
//!
//! If you compare the THIR [`ExprKind`] to [`hir::ExprKind`], you will see it is
//! a good bit simpler. In fact, a number of the more straight-forward
//! MIR simplifications are already done in the lowering to THIR. For
//! example, met... |
// external
use pyo3::prelude::*;
use log::error;
use crate::{agent, save_e, save_t};
use crate::components::{controller, pv};
use crate::misc::hist_memory;
use crate::thermal_systems::building::{heatpump_system, chp_system};
use crate::misc::ambient::AmbientParameters;
#[derive(Clone)]
enum HeatingSystem {
Ch... |
//! Radio driver, Bluetooth Low Energy, nRF51
//!
//! Sending Bluetooth Low Energy advertisement packets with payloads up to 31 bytes
//!
//! Currently all fields in PAYLOAD array are configurable from user-space
//! except the PDU_TYPE.
//!
//! ### Authors
//! * <NAME> <<EMAIL>>
//! * <NAME> <<EMAIL>>
//! * Date: June... |
//
// GLM-COLOR
//
// Copyright (c) 2015 The glm-color authors.
//
// 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, c... |
// Copyright 2020 <NAME>
// SPDX-License-Identifier: Apache-2.0
/// RocksDB storage.
pub mod rocksdb;
/// Stronghold storage.
pub mod stronghold;
use crate::{
account::Account,
event::{BalanceEvent, TransactionConfirmationChangeEvent, TransactionEvent, TransactionReattachmentEvent},
message::{Message, Me... |
//
// Copyright (c) <NAME>. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
use crate::core::config::DatasourceCfg;
use crate::core::feature::Feature;
use crate::core::layer::Layer;
use crate::core::Config;
use crate::datasource::postgis_fie... |
use std::borrow::Cow::{self, Owned};
use std::collections::{HashMap, HashSet};
use std::env;
use std::fs;
use std::io;
use std::io::{Read, Write};
use std::iter;
use std::ops::Deref;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
use ansi_term::Colour::{Green, Red, Yellow, RGB};
use clap;
use dirs;... |
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use super::analysis;
use super::client::Client;
use super::config::ConfigSnapshot;
use super::documents;
use super::documents::Document;
use super::documents::Documents;
use super::language_server;
use super::performance::Performance;
use super... |
use self::state::TracerState;
use crate::tracing::error::TraceResult;
use crate::tracing::net::{Network, ProbeResponse};
use crate::tracing::types::{MaxInflight, MaxRounds, Sequence, TimeToLive, TraceId};
use crate::tracing::TracerProtocol;
use crate::tracing::{IcmpPacketType, ProbeStatus};
use crate::tracing::{Probe, ... |
// Copyright 2019 Fullstop000 <<EMAIL>>.
//
// 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 ag... |
use algebra::{PrimeField, ProjectiveCurve, Group};
use r1cs_std::{
fields::fp::FpGadget,
alloc::AllocGadget,
groups::GroupGadget,
eq::EqGadget,
to_field_gadget_vec::ToConstraintFieldGadget,
bits::ToBytesGadget,
};
use primitives::{
vrf::ecvrf::{FieldBasedEcVrfProof, FieldBasedEcVrf},
cr... |
// Copyright 2012-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-MI... |
///////////////////////////////////////////////////////////////////////////////////////////////////// Key
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Key {
Space,
Apostrophe,
Comma,
Minus,
Period,
Slash,
Num0,
Num1,
Num2,
Num3,
Num4,
Num5,
Num6,
Num7,
Num8,
Num9,
Semicolon,... |
// Copyright 2018 Grove Enterprises 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 ... |
extern crate cretonne;
extern crate cton_frontend;
use error::*;
use rustc::mir::{Mir, Local};
use rustc::mir::{UnOp, BinOp, Literal, Lvalue, Operand, ProjectionElem, Rvalue, AggregateKind,
CastKind, StatementKind, TerminatorKind};
use rustc::dep_graph::DepNode;
use rustc::middle::const_val::ConstVal;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.