text
stringlengths
7.05k
33.9k
//! A set of structs to represent a compressed part of the timeline, and methods to asynchronously compress and uncompress a stream of data, //! without holding the entire data in memory. //! For the latter, both compress and uncompress functions operate buffered streams (currently hardcoded size of [`ARCHIVE_STREAM_BU...
// Copyright 2020 EinsteinDB Project Authors & WHTCORPS INC. Licensed under Apache-2.0. use std::future::Future; use std::marker::PhantomData; use std::sync::Mutex; use std::time::Duration; use futures::future::{self, TryFutureExt}; use ekvproto::encryption_timeshare::EncryptedContent; use rusoto_core::request::Dispa...
//! no_std driver for the MS5611 (barometric pressure sensor) //! //! //! # Usage //! //! Use embedded-hal implementation to get SPI, NCS, and delay, then create //! a ms5611 handle //! //! ```ignore //! // Create handle //! let ms5611 = Ms5611::new(spi, ncs, Delay)?; //! // Get a second order compensated pressure (and...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 16usize], #[doc = "0x10 - Start SPI transaction."] pub tasks_start: TASKS_START, #[doc = "0x14 - Stop SPI transaction."] pub tasks_stop: TASKS_STOP, _reserved2: [u8; 4usize], #[doc = "0x1c - Suspend SPI transac...
use std::borrow::Cow; use std::collections::HashMap; use std::ops::Range; use std::str; use crate::arttype::ArtType; use crate::errors::*; use crate::util::Buffer; use memchr::memchr; use once_cell::sync::Lazy; // helper macro to build header names and hashmap. macro_rules! nntp_headers { {$(($variant:ident, $na...
//! Main implementation crate for the USDT package. // Copyright 2021 Oxide Computer Company // // 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/LICE...
use num_enum::{IntoPrimitive, TryFromPrimitive}; use std::convert::TryFrom; use super::{ConditionCode, OperationMode}; /// An enum of the register names available to the processor. These names can be /// used in the `get_register_value` and `set_register_value` functions to ensure /// that the register being accessed...
//! The Raqote backend for the Piet 2D graphics abstraction. // TODO: dpi scaling!! use raqote::{ Spread, ExtendMode, DrawOptions, DrawTarget, Path, PathBuilder, Point, SolidSource, Source, Transform, Winding, }; use piet::kurbo::{Affine, PathEl, Rect, Shape, Vec2}; use font_kit::family_name::FamilyName; use fon...
// Copyright (C) 2021 Deeper Network Inc. // 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unle...
// Copyright 2011 Google Inc. All Rights Reserved. // Copyright 2017 The Ninja-rs Project Developers. All Rights Reserved. // // 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:/...
use std::cmp::max; use std::env::temp_dir; use std::hash::Hasher; use std::io; use std::io::{ErrorKind, Seek}; use std::io::{SeekFrom, Write}; use std::path::{MAIN_SEPARATOR, PathBuf}; use std::thread::{JoinHandle, spawn}; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use highway::{HighwayBuilder, Key}; ...
extern crate time; #[macro_use] extern crate slog; extern crate clap; extern crate portus; use portus::ipc::Ipc; use portus::lang::Scope; use portus::{CongAlg, CongAlgBuilder, Datapath, DatapathInfo, DatapathTrait, Report}; use std::collections::HashMap; pub mod cubic; pub mod reno; //mod bin_helper; //pub use bin_h...
use super::event_util::FlufflEvent; use super::*; use event_util::constants::*; use glow::*; use std::{ cell::{Cell, RefCell}, mem, rc::Rc, sync::Arc, }; use sdl2::{event::Event, keyboard::Scancode, mouse::MouseButton, video::FullscreenType}; /// # Description /// A Custom SDL2 Window pointer type....
//! Computes massey products in $\Mod_{C\tau^2}$. //! //! # Usage //! This computes all Massey products of the form $\langle a, b, -\rangle$, where //! $a \in \Ext^{\*, \*}(M, k)$ and $b, (-) \in \Ext^{\*, \*}(k, k)$. It does not verify that the //! Massey product is valid, i.e. $a$ and $b$ both lift to $\Mod_{C\tau^2}...
use std::{ ffi::OsStr, fs::File, io::{BufReader, BufWriter, LineWriter, Read, Write}, mem::size_of, path::{Path, PathBuf}, }; use clap::{AppSettings, Clap}; use dds::PixelFormat; use image::{GrayAlphaImage, RgbaImage}; use pkg::{Zpkg, ZpkgFile}; use ppf::{Ppf, Script, Texture, TextureFormat, Textu...
//! Configures and runs the outbound proxy. //! //! The outound proxy is responsible for routing traffic from the local //! application to external network endpoints. #![deny(warnings, rust_2018_idioms)] pub use self::endpoint::{HttpConcrete, HttpEndpoint, HttpLogical, LogicalPerRequest, TcpEndpoint}; use futures::fu...
//! # Standalone Pact Stub Server //! //! This project provides a server that can generate responses based on pact files. It is a single executable binary. It implements the [V2 Pact specification](https://github.com/pact-foundation/pact-specification/tree/version-2). //! //! [Online rust docs](https://docs.rs/pact-stu...
use std::collections::{hash_map, HashMap, HashSet}; use swc_atoms::{js_word, JsWord}; use swc_common::Mark; use swc_ecma_ast::{Decl, ExportSpecifier, Pat, TsType, TsTypeElement}; use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith}; use super::module::{ImportIdent, Source}; use super::{ scope::{Definit...
use core::convert::{TryFrom, TryInto}; use flexiber::Encodable; use serde::{Deserialize, Serialize}; /// According to spec, a PIN must be 6-8 digits, padded to 8 bytes with 0xFF. /// /// We are more lenient, and allow ASCII 0x20..=0x7E. #[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct P...
#![allow(missing_docs)] use metal::*; use std::mem; use super::{MTL_MAX_BUFFER_BINDINGS, MTL_MAX_TEXTURE_BINDINGS, MTL_MAX_SAMPLER_BINDINGS}; const MTL_MAX_TEXTURE_BINDINGS_SZ: usize = MTL_MAX_TEXTURE_BINDINGS / 32; // TODO(fkaa): can we use associated constants and `Bindings` trait instead? const VS_I...
//! Darwinia chain configurations. pub use node_primitives::{AccountId, Balance, Signature}; pub use node_runtime::GenesisConfig; use std::{ env, fs::File, path::Path, time::{SystemTime, UNIX_EPOCH}, }; use grandpa_primitives::AuthorityId as GrandpaId; use hex_literal::hex; use node_runtime::{ constants::curren...
#![allow(dead_code, unused_imports)] #[macro_export] macro_rules! assert_numerically_similar { ( $eps:expr, $x:expr, $y:expr ) => { { assert!(($x - $y).abs() <= $eps); } }; } use std::time::{SystemTime, Duration, UNIX_EPOCH}; use std::{thread, time}; use std::collections::{HashMap, VecDeque}; use std:...
//! Persistent, ACID compliant, threadsafe to-disk store. //! Powered by Sled - an embedded database. use std::{ collections::{HashMap, HashSet}, sync::{Arc, Mutex}, }; use crate::{ datatype::DataType, errors::AtomicResult, resources::PropVals, storelike::{ResourceCollection, Storelike}, A...
// Copyright 2020 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under the MIT license <LICENSE-MIT // http://opensource.org/licenses/MIT> or the Modified BSD license <LICENSE-BSD // https://opensource.org/licenses/BSD-3-Clause>, at your option. This file may not be copied, // modified, or di...
//! Define `NativeArtifact` to allow compiling and instantiating to be //! done as separate steps. use crate::engine::{NativeEngine, NativeEngineInner}; use crate::serialize::ModuleMetadata; use libloading::{Library, Symbol as LibrarySymbol}; use loupe::MemoryUsage; use std::error::Error; use std::fs::File; use std::i...
#[cfg(test)] mod router_test; use crate::error::*; use crate::vnet::chunk::*; use crate::vnet::chunk_queue::*; use crate::vnet::interface::*; use crate::vnet::nat::*; use crate::vnet::net::*; use crate::vnet::resolver::*; use async_trait::async_trait; use ipnet::*; use std::collections::HashMap; use std::future::Futu...
use ethabi::LogParam; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::fmt; use web3::types::*; use crate::prelude::{EntityKey, SubgraphDeploymentId, ToEntityKey}; pub type LightEthereumBlock = Block<Transaction>; pub trait LightEthereumBlockExt { fn number(&self) -> u64; fn transaction_...
use std::collections::BTreeSet; use std::fs; use std::iter::FromIterator; use std::path::{Path, PathBuf}; use std::ptr; use heck::{CamelCase, ShoutySnakeCase, SnakeCase}; use proc_macro2::{Ident, TokenStream}; use quote::quote; use syn; use wasm_bindgen_backend::util::{ident_ty, raw_ident, rust_ident}; use weedle; use...
#![recursion_limit = "1024"] use shared::vehicle; pub mod config; pub mod events; pub mod file_transfer; pub mod incoming; pub mod lua; pub mod outgoing; pub mod server_vehicle; use incoming::IncomingEvent; use server_vehicle::*; use shared::{ClientInfoPrivate, ClientInfoPublic, ServerCommand}; use vehicle::*; use ...
/* * Copyright 2019 <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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
// 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 crate::util::iri::IRI; use std::collections::HashMap; use std::sync::Mutex; use std::borrow::Borrow; lazy_static! { static ref ADDITIONAL_TYPES: Mutex<HashMap<String, &'static XSDDataType>> = Mutex::new(HashMap::new()); } lazy_static! { pub static ref XSD_STRING: XSDDataType = xsd_string(); pub static ref X...
//! `hermit-abi` is small interface to call functions from the unikernel //! [RustyHermit](https://github.com/hermitcore/libhermit-rs). #![cfg_attr(feature = "rustc-dep-of-std", no_std)] #![feature(const_raw_ptr_to_usize_cast)] extern crate libc; pub mod tcplistener; pub mod tcpstream; use libc::c_void; // sysmbols...
//! SRP client implementation for the firebird authentication (Wire Protocol 13) #![allow(clippy::many_single_char_names)] use std::{error, fmt, marker::PhantomData}; use digest::Digest; use generic_array::GenericArray; use lazy_static::lazy_static; use num_bigint::BigUint; use sha1::Sha1; lazy_static! { /// Sr...
/*----------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *-----------------------------------------------------------------------...
//! Redis cluster support. //! //! This module extends the library to be able to use cluster. //! ClusterClient implements traits of ConnectionLike and Commands. //! //! Note that the cluster support currently does not provide pubsub //! functionality. //! //! # Example //! ```rust,no_run //! use redis::Commands; //! u...
//! The CXX code generator for constructing and compiling C++ code. //! //! This is intended to be used from Cargo build scripts to execute CXX's //! C++ code generator, set up any additional compiler flags depending on //! the use case, and make the C++ compiler invocation. //! //! <br> //! //! # Example //! //! Examp...
//! Linux Process use crate::{ error::{LxError, LxResult}, fs::{File, FileDesc, FileLike, OpenFlags, STDIN, STDOUT}, ipc::*, net::Socket, signal::{Signal as LinuxSignal, SignalAction}, }; use alloc::{ boxed::Box, string::String, sync::{Arc, Weak}, vec::Vec, }; use core::sync::atomic...
#[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use crate::borrow::{ borrow_stable, claim_rewards, compute_interest, compute_interest_raw, compute_reward, query_borrower_info, query_borrower_infos, repay_stable, repay_stable_from_liquidation, }; use crate::deposit::{compute_exchange_rate_raw, d...
use std::collections::HashMap; use std::convert::TryFrom; use std::sync::Mutex; use std::thread; use std::time::Duration; use diesel::sqlite::SqliteConnection; use ruma_events::room::member::MembershipState; use ruma_identifiers::{RoomAliasId, RoomId, UserId}; use slog::Logger; use api::{MatrixApi, RocketchatApi}; us...
use error::{Result, ErrorKind, Error}; use ffi::bindings::*; /// API types that allow changes to default permission restrictions. // Checked against local #[derive(EnumWrapper, Debug, Clone, Eq, PartialEq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[wrap(c_enum = "nvmlRestrictedAPI_enum")] ...
use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; use crate::gst::prelude::PadExtManual; use std::convert::TryInto; use std::sync::Arc; use std::sync::Mutex; pub use gstreamer_rtp::rtp_buffer::compare_seqnum; pub use gstreamer_rtp::rtp_buffer::RTPBuffer; pub use gstreamer_rtp::rtp_b...
extern crate ctrlc; extern crate e2d2; extern crate env_logger; extern crate eui48; extern crate ipnet; extern crate separator; extern crate netfcts; extern crate bincode; // Logging #[macro_use] extern crate log; extern crate traffic_lib; use e2d2::interface::{PmdPort, Pdu, HeaderStack}; use e2d2::scheduler::Standa...
// Copyright 2019 <NAME> <<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 agreed t...
//! # `incrementalmerkletree` //! //! Incremental Merkle Trees are fixed-depth Merkle trees with two primary //! capabilities: appending (assigning a value to the next unused leaf and //! advancing the tree) and obtaining the root of the tree. Importantly the tree //! structure attempts to store the least amount of inf...
mod __gl_imports { pub use std::mem; pub use std::os::raw; } pub mod types { #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)] // Common types from OpenGL 1.1 pub type GLenum = super::__gl_imports::raw::c_uint...
use std::f64; use rand::Rng; use ecs::*; use game::*; use game::data::*; use direction::Direction; use coord::Coord; use math::Vector2; pub fn walk(action: &mut EcsAction, entity: EntityRef, direction: Direction) { let current_position = entity.position().expect("Entity missing position"); let new_position = c...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: 21/11/2019 Last Modified: 21/11/2019 License: MIT */ use crate::raster::*; use crate::structures::Array2D; use crate::tools::*; use num_cpus; use std::cmp::Ordering; use std::collections::BinaryHeap; use std::env; use s...
//! Support for the Executable and Linkable Format, used on Linux. use std::borrow::Cow; use std::fmt; use std::io::Cursor; use flate2::{Decompress, FlushDecompress}; use goblin::elf::compression_header::{CompressionHeader, ELFCOMPRESS_ZLIB}; use goblin::{container::Ctx, elf, strtab}; use thiserror::Error; use symbo...
pub mod codec; pub mod draw; mod font_util; pub mod fonts; pub mod layout; pub mod svg; pub mod text; use anyhow::Result; use fontdue::{ layout::{CoordinateSystem, HorizontalAlign, Layout, LayoutSettings, TextStyle}, Font, }; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use skia_safe::{ AlphaTy...
use super::*; use actions::parse_actions; use errors::{LocationError, TokenizeError}; use files::CodeLocation; use numbers::NumberTypes; use statics::{valid_name_char, NameBuilder}; use strings::parse_static_str; use variable::parse_var; #[derive(Debug, Clone)] pub struct Action { pub location: CodeLocation, pub t...
pub mod cm; pub mod message; use crate::http::HttpServer; use crate::net; use crate::net::NetServer; use crate::vertx::cm::{ClusterManager, ClusterNodeInfo, ServerID}; use crate::vertx::message::{Message, Body}; use core::fmt::Debug; use hashbrown::HashMap; use log::{debug, error, info, trace, warn}; use signal_hook::...
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use anyhow::Result; use nbez::{Bez3o, BezCurve, Point2d}; use geom::{Angle, Distance, Line, PolyLine, Pt2D}; use crate::{Intersection, Lane, LaneID, LaneType, Map, RoadID, Turn, TurnID, TurnType}; /// Generate all driving and walking turns at an intersec...
/*! Contains visitor type for extracting function pointers and the referenced lifetimes of the fields of a type declaration. */ use std::{ collections::HashSet, mem, }; use core_extensions::prelude::*; use syn::{ punctuated::Punctuated, spanned::Spanned, visit_mut::{self, VisitMut}, Generic...
//! # Fee Module //! Based on the [specification](https://interlay.gitlab.io/polkabtc-spec/spec/fee.html). #![deny(warnings)] #![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(any(feature = "runtime-benchmarks", test))] mod benchmarking; mod default_weights; pub use def...
// Copyright 2020-2021, The Tremor Team // // 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 agr...
/// The `bigtable` subcommand use clap::{value_t, value_t_or_exit, App, AppSettings, Arg, ArgMatches, SubCommand}; use log::*; use solana_clap_utils::{ input_parsers::pubkey_of, input_validators::{is_slot, is_valid_pubkey}, }; use solana_cli::display::println_transaction; use solana_ledger::{blockstore::Blockst...
// // Copyright 2018 <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 writin...
use std::collections::{HashMap, VecDeque}; use std::env; use std::{thread, time}; use aoc_util::input::{FileReader, FromFile}; const DELAY: std::time::Duration = time::Duration::from_millis(16); fn main() { let input_file = match env::args().nth(1) { Some(input_file) => input_file, None => { ...
/* * Copyright (c) Meta Platforms, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use std::collections::HashSet; use std::fs::OpenOptions; use std::ops::Deref; use std::path::{Path, PathBuf}; use anyhow::{e...
//! Copying and clearing clipboard contents. use std::{ cell::{Cell, RefCell}, ffi::OsString, fs::{remove_dir, remove_file, File, OpenOptions}, io::{self, Read, Seek, SeekFrom, Write}, iter, os::unix::io::IntoRawFd, path::PathBuf, process, rc::Rc, }; use failure::Fail; use log::inf...
use proc_macro2::{LineColumn, Span, TokenStream}; use quote::{ToTokens, TokenStreamExt}; use std::{fmt::Write, ops::Range}; use syn::{ext::IdentExt, parse::Parser, spanned::Spanned, visit::Visit, Token}; use tokio::io::AsyncWriteExt; struct StrongCapture { ident: syn::Ident, from: Option<syn::Expr>, } impl St...
use common::*; use ncollide2d::transformation::convex_hull_idx; // use ncollide2d::query::closest_points_line_line_parameters; use rand::prelude::*; use specs::prelude::*; use specs_derive::Component; use voronois::destruction; pub const EPS: f32 = 1E-3; pub const SHADOW_LENGTH: f32 = 100f32; pub const DECONSTRUCT_SHA...
use std::fs::File; use std::io::{Read, Seek, SeekFrom}; use queue::Queue; use util; pub const SECTORS_PER_SECOND: u64 = 75; pub const SECTORS_PER_MINUTE: u64 = 60 * SECTORS_PER_SECOND; pub const BYTES_PER_SECTOR: u64 = 2352; pub const LEAD_IN_SECTORS: u64 = 2 * SECTORS_PER_SECOND; pub const ADDRESS_OFFSET: u64 = 12;...
use std::cmp::Ordering; use std::collections::BTreeMap; use std::f32::INFINITY; use f1_telemetry::packet::car_status::PacketCarStatusData; use f1_telemetry::packet::car_telemetry::PacketCarTelemetryData; use f1_telemetry::packet::event::{Event, PacketEventData}; use f1_telemetry::packet::final_classification::PacketFi...
// Copyright 2022 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 hyper::header::HeaderValue; /// Error returned if the range failed to parse. #[derive(Debug, thiserror::Error)] pub enum Error { #[error("parse er...
use std::sync::atomic::AtomicBool; use std::sync::atomic::Ordering; use std::sync::Arc; use std::sync::Mutex; use failure::ResultExt; use slog::debug; use slog::Logger; use zookeeper::Acl; use zookeeper::CreateMode; use zookeeper::Subscription; use zookeeper::ZkError; use zookeeper::ZkState; use zookeeper::ZooKeeper;...
use crate::codegen::arch::machine::register::{str2reg, RegisterClassKind as RC, GR64}; use crate::codegen::arch::{dag::node::MemKind, machine::inst::MachineOpcode as MO}; use crate::codegen::common::{ dag::{ function::DAGFunction, module::DAGModule, node::{IRNode, IROpcode, ImmediateKind, MI...
use crate::{normal_from_object, BoundingBox, Object, RealField}; use num_traits::Float; use std::fmt::Debug; #[derive(Clone, Debug, PartialEq)] struct Face<S: RealField + Debug> { normal: na::Vector3<S>, vertices: [usize; 3], } /// Mesh generates an implicit function from a 3d object mesh. /// Warning! This p...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - POSIF configuration"] pub pconf: PCONF, #[doc = "0x04 - POSIF Suspend Config"] pub psus: PSUS, #[doc = "0x08 - POSIF Run Bit Set"] pub pruns: PRUNS, #[doc = "0x0c - POSIF Run Bit Clear"] pub prunc: PRUNC, ...
//! Handles new expressions and call expressions. use super::super::Analyzer; use crate::{ analyzer::{ expr::TypeOfMode, props::prop_name_to_expr, util::{Generalizer, ResultExt}, Ctx, }, builtin_types, debug::print_backtrace, errors::Error, id::Id, ty, ty:...
/* * Forma uma palavras, sequências numéricas, * qualquer string no formato ascii passada, * que se queria representar na forma de * de soupa de caractéres. */ // minha própria lib. use crate::construtor::{ carrega_caracteres_pontuacao, carrega_desenhos_numeros, carrega_desenhos_letras }; ...
use chrono::prelude::*; use ckb_crypto::secp::SECP256K1; use ckb_hash::blake2b_256; use ckb_sdk::{ constants::{MULTISIG_TYPE_HASH, SIGHASH_TYPE_HASH}, rpc::ChainInfo, Address, AddressPayload, CodeHashIndex, HttpRpcClient, NetworkType, OldAddress, }; use ckb_types::{ bytes::Bytes, core::{EpochNumberW...
//! Generate audio data. //! //! Normally you only need to use the high level RomBuilder methods: //! RomBuilder::add_audio_data and RomBuilder::add_audio_player. //! So check those out first. //! //! The audio player that plays the generated audio can be found at: //! [audio_player.asm](https://github.com/rukai/ggbasm...
//! sokol::app - cross-platform application wrapper //! //! A Rust API to the [sokol_app.h](https://github.com/floooh/sokol/blob/master/sokol_app.h) //! header-only C library. use std::os::raw::c_void; pub mod ffi { use std::ffi::CStr; use std::ffi::CString; use std::os::raw::c_char; use std::os::raw:...
use crate::*; use gl::types::*; pub use glutin::{ self, event::{ElementState, Event, ModifiersState, VirtualKeyCode, WindowEvent}, event_loop::{ControlFlow, EventLoop, EventLoopWindowTarget}, window::{WindowBuilder, WindowId}, ContextCurrentState as CurrentState, NotCurrent, PossiblyCurrent, Windo...
use crate::alloc::{host_page_size, instance_heap_offset, Alloc, Limits, Slot}; use crate::embed_ctx::CtxMap; use crate::error::Error; use crate::instance::{new_instance_handle, Instance, InstanceHandle}; use crate::module::Module; use crate::region::{Region, RegionCreate, RegionInternal}; use libc::c_void; #[cfg(not(ta...
use std::collections::BTreeMap; use std::sync::Arc; use std::{fmt, result}; use crate::crypto::SignatureShare; use bincode; use log::debug; use rand::Rng; use super::bool_multimap::BoolMultimap; use super::bool_set::{self, BoolSet}; use super::sbv_broadcast::{self, Message as SbvMessage, SbvBroadcast}; use super::{Er...
// Copyright (c) 2017 <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. All files in the project carrying such notice may not be copied, // modified, ...
// Copyright 2018 Parity Technologies (UK) Ltd. // // 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, mer...
//! Implement python as a virtual machine with bytecodes. This module //! implements bytecode structure. use bitflags::bitflags; use num_bigint::BigInt; use num_complex::Complex64; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; use std::fmt; /// Sourcode location. #[derive(Clone, Debug...
use crate::app::{App, ShowEverything}; use crate::common::CommonState; use crate::game::{DrawBaselayer, State, Transition, WizardState}; use crate::render::DrawOptions; use ezgui::{ hotkey, lctrl, Btn, Choice, Color, Composite, Drawable, EventCtx, GeomBatch, GfxCtx, HorizontalAlignment, Key, Line, Outcome, Rewr...
use dada_id::prelude::*; use dada_ir::code::syntax; use dada_ir::code::syntax::LocalVariableDecl; use dada_ir::code::validated; use dada_ir::code::Code; use dada_ir::diagnostic::ErrorReported; use dada_ir::effect::Effect; use dada_ir::kw::Keyword; use dada_ir::origin_table::HasOriginIn; use dada_ir::origin_table::PushO...
use dprint_core::formatting::conditions::*; use dprint_core::formatting::*; use std::cell::Cell; use std::rc::Rc; use taplo::rowan::NodeOrToken; use taplo::syntax::{SyntaxElement, SyntaxKind, SyntaxNode, SyntaxToken}; use super::Context; use crate::configuration::Configuration; use crate::rowan_extensions::*; type Pr...
//! Defines all needed configs and views to them. //! //! The config is synchronized by design so it can be hot-reloaded. use std::collections::{HashMap, HashSet}; use std::error::Error; use std::fmt::{Debug, Display, Formatter}; use std::io::ErrorKind; use std::iter; use std::ops::ControlFlow; use std::path::{Path, Pa...
//! //! Manage vertex and index buffers of single objects with ease. //! use crate::{ command::{EncoderCommon, Graphics, QueueId, RenderPassEncoder, Supports}, core::cast_cow, factory::{BufferState, Factory, UploadError}, memory::{Data, Upload, Write}, resource::{Buffer, BufferInfo, Escape}, As...
#![allow(non_snake_case)] #![feature(test)] #![deny(missing_docs)] #![feature(external_doc)] #![doc(include = "../README.md")] extern crate byteorder; extern crate core; extern crate curve25519_dalek; extern crate digest; extern crate merlin; extern crate rand; extern crate rayon; extern crate sha3; extern crate test;...
//! Support for compiling with Cranelift. //! //! This crate provides an implementation of [`Compiler`] in the form of //! [`Cranelift`]. // # How does Wasmtime prevent stack overflow? // // A few locations throughout the codebase link to this file to explain // interrupts and stack overflow. To start off, let's take ...
// 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. mod internal_message; mod mouse; mod touch; use { async_utils::hanging_get::client::HangingGetStream, fidl::endpoints::create_proxy, fidl_fuch...
use std::convert::TryInto; use std::fmt; use std::str::FromStr; use bech32::{convert_bits, Bech32, ToBase32}; use ckb_hash::blake2b_256; use ckb_types::{ bytes::Bytes, core::ScriptHashType, packed::{Byte32, Script}, prelude::*, H160, H256, }; use serde_derive::{Deserialize, Serialize}; use super::...
// Copyright (c) Aptos // SPDX-License-Identifier: Apache-2.0 use crate::{ Bytecode, DirectWriteSet, Event, HexEncodedBytes, MoveFunction, MoveModuleBytecode, MoveResource, MoveScriptBytecode, MoveType, MoveValue, ScriptFunctionId, ScriptFunctionPayload, ScriptPayload, ScriptWriteSet, Transaction, Transact...
pub mod builder; pub mod config; mod fanout; mod task; pub mod unit_test; pub use self::config::Config; pub use self::config::SinkContext; use crate::topology::builder::Pieces; use crate::buffers; use crate::runtime; use crate::shutdown::SourceShutdownCoordinator; use futures01::{ future, sync::{mpsc, onesho...
// Copyright 2021 <NAME> (<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 agreed to in...
//! SSE4.2 (pcmpestri) accelerated substring search //! //! Using the two way substring search algorithm. // wssm word size string matching<br> // wslm word size lexicographical maximum suffix // #![allow(dead_code)] extern crate unchecked_index; extern crate memchr; use std::cmp; use std::iter::Zip; use std::ptr; ...
use crate::error::{VaultFailError, VaultFailErrorKind}; #[cfg(feature = "ffi")] use ffi_support::IntoFfi; use subtle::ConstantTimeEq; use zeroize::Zeroize; /// The types of secret keys that the vault supports #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Zeroize)] pub enum SecretKeyType { /// ...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Master Privilege Register A"] pub mpra: MPRA, _reserved1: [u8; 28usize], #[doc = "0x20 - Peripheral Access Control Register"] pub pacra: PACRA, #[doc = "0x24 - Peripheral Access Control Register"] pub pacrb: PAC...
//! Unification and canonicalization logic. use std::borrow::Cow; use chalk_ir::{FloatTy, IntTy, TyVariableKind, UniverseIndex, VariableKind}; use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue}; use super::{DomainGoal, InferenceContext}; use crate::{ AliasEq, AliasTy, BoundVar, Canonical, C...
use std::collections::btree_map::{self, BTreeMap}; use std::collections::hash_map::HashMap; use std::mem::take; use log::debug; use roaring::RoaringBitmap; use super::{ query_docids, query_pair_proximity_docids, resolve_query_tree, Context, Criterion, CriterionParameters, CriterionResult, }; use crate::search...
//! # Liquidity Pools Pallet //! //! ## Overview //! //! This pallet is managing information required for interest calculation. //! Besides every pool contains some amount of "dead money" which are stored in //! `total_protocol_interest`. These tokens don`t take part in protocol economy. //! Also it contains a set of h...
#[cfg(any(feature = "google-actions-sdk-v2-interactionmodel-prompt"))] pub mod prompt; #[cfg(any(feature = "google-actions-sdk-v2-interactionmodel-type"))] pub mod r#type; /// Entity sets describe the pre-defined set of entities that the values of /// built-in intent parameters can come from. Entity sets can be referen...