text
stringlengths
7.05k
33.9k
// This file was generated by gir (https://github.com/gtk-rs/gir @ 58cffd4) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT extern crate gstreamer_sdp_sys; extern crate shell_words; extern crate tempdir; use std::env; use std::error::Error; use std::path::Path; use std::mem::{align_of, siz...
use self::{ inner::CacheInner, update::{OngoingUpdater, UpdateAction}, util::kv_to_audiofolder, }; use crate::{ audio_folder::FolderLister, audio_meta::{AudioFolder, FolderByModification, TimeStamp}, cache::update::{filter_event, FilteredEvent, RecursiveUpdater}, common::{CollectionTrait, Po...
use std::{collections::BTreeMap, convert::TryFrom, convert::TryInto}; use ic_base_types::{CanisterId, NumBytes, NumSeconds, PrincipalId}; use ic_cycles_account_manager::{CyclesAccountManager, CyclesAccountManagerError}; use ic_interfaces::execution_environment::{HypervisorError, HypervisorResult}; use ic_nns_constants...
use dcpu::{self, DCPU, Device}; use std::any::Any; pub struct DeviceMonitorLEM1802 { pub connected: bool, pub ram_location: u16, pub font_location: Option<u16>, pub palette_location: Option<u16>, pub border_color_index: u16, } pub const MONITOR_WIDTH: u32 = COLS as u32 * FONT_WIDTH as u32; pub con...
#![warn(clippy::all)] #![warn(clippy::pedantic)] #![allow(clippy::restriction)] use std::env; use std::fs; use std::io; use std::path::PathBuf; use target_lexicon::Triple; fn enumerate_sources(path: PathBuf, paths: &mut Vec<PathBuf>) -> io::Result<()> { let mut stack = vec![path.clone()]; paths.push(path); ...
// Some parts of this code picked up from: // https://github.com/kaj/rust-pdf/ use std::collections::HashMap; pub fn encode(text: &str) -> Vec<u8> { let mut result = Vec::new(); for ch in text.chars() { match encode_char(ch) { Some(b'\\') => { result.push(b'\\'); ...
use gif_renderer::Rgb24; use ines::Ines; use nes_emulator_core::{ dynamic_nes::{DynamicNes, Error}, mapper::{Mapper, PersistentState}, nes::{self, Nes}, }; use nes_name_table_debug::NameTableFrame; use nes_render_output::{NoRenderOutput, RenderOutput, RenderOutputPair}; use std::collections::hash_map::Defau...
extern crate bobbin_wasm as wasm; extern crate clap; // #[macro_use] extern crate log; extern crate env_logger; use std::process; use std::io::{self, Read}; use std::fs::File; use std::path::Path; use clap::{App, Arg, ArgMatches}; // use wasm::{Reader, BinaryReader}; use wasm::types::Index; use wasm::parser::{self, ...
use std::collections::HashMap; use std::sync::Arc; use druid::kurbo::{BezPath, ParamCurve, ParamCurveNearest, PathEl, PathSeg, Point}; use druid::Data; use spline::{Element, Segment as SplineSegment, SplineSpec}; use norad::glyph::{Contour, ContourPoint, PointType}; use norad::{Identifier, Plist}; use super::design_...
//! Validator for the cache. use std::iter::IntoIterator; use std::slice::Iter; use crate::{error::ValidateError, Cache}; use crc::{Crc, CRC_32_ISO_HDLC}; use nom::{combinator::cond, number::complete::be_u32}; use runefs::{ codec::{Buffer, Encoded}, REFERENCE_TABLE_ID, }; #[cfg(feature = "rs3")] use num_bigi...
use super::ast::{Expr, Type, ExprKind, Symbol}; use super::partial_types::PartialType::Unknown; use super::parser::parse_expr; use super::pretty_print::*; use super::type_inference::*; // Transforms. TODO(shoumik) move these tests somewhere else? use super::transforms::fuse_loops_vertical; use super::transforms::fuse_...
use crate::match_finder::{ MatchFinder, MatchFinderState }; use dotrix::ecs::{ Const, Mut }; use dotrix::assets:: { Assets, Texture }; use dotrix::{ Id, Frame, Input, Window }; use dotrix::egui::{ CollapsingHeader, ComboBox, Egui, Grid, ScrollArea, SidePanel, Slider, TopBottomPanel, }; u...
//! Combatant data. use meters::Meter; use std::fmt; use std::str::FromStr; use std::num::ParseIntError; //use termion::color; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Combatant { pub name: String, pub class: Classes, pub abilities: Option<Abilities>, pub hp: Meter<i32>, pub hd: ...
use alloc_crate::sync::{Arc, Weak}; use alloc_crate::vec::Vec; use core::fmt; use core::fmt::Display; use crate::acpica::AcpiDevice; use crate::lock::OnceCell; use crate::malloc::physical_mem; use crate::paging; use crate::paging::PhysicalPointer; use crate::structures::HashMap; use super::acpi; use super::config_spa...
//! Common transformations on expressions. use super::ast::*; use super::ast::ExprKind::*; use super::ast::Type::*; use super::ast::BuilderKind::*; use super::ast::LiteralKind::*; use std::collections::HashMap; use super::util::SymbolGenerator; /// Inlines Zip expressions as collections of iters. Using Zips outside...
//! Rust OpenType font rasterization, shaping, and layout library // (C) 2019 <NAME> <<EMAIL>> use std::collections::HashMap; pub mod error; use error::*; mod types; pub use types::GlyphID; use types::*; mod cmap; mod glyf; mod head; mod hhea; mod hmtx; mod loca; mod maxp; /// Result of rendering a glyph pub struc...
///! ///! Define types which allow us to serialize/de-serialize ///! messages when interacting with the todoist API. ///! ///! Types manually converted from documentation here: ///! - [Todoist API](https://developer.todoist.com/) ///! ///! Note: These are using v7 definition of the todoist API. ///! ///! We attribute ...
// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ chained_bft::{ common::{Author, Payload}, consensus_types::{ block::Block, proposal_msg::{ProposalMsg, ProposalUncheckedSignatures}, sync_info::SyncInfo, ...
// 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. use { crate::{ crypt::Crypt, lsm_tree::{ simple_persistent_layer::SimplePersistentLayer, skip_list_layer::SkipL...
//! The autofill decoration automatically fills gaps that appear in the log. //! //! When a node has a gap in its (local copy of the) log, it must close that gap //! before it can apply later rounds' entries to its state. There are two //! reasons why a node may observe gaps in its log. //! //! - A commit messag...
//! Place a sequence of iterators into a **heap of iterators** (HIT); the //! result is a new iterator that returns items in sorted order, *provided //! that the original iterators are sorted.* //! //! **[ Adapted from itertools ]** //! This module is simlar to (and adapted from) the `kmerge_by` module from //! itert...
// Copyright 2020 - developers of the `grammers` project. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distr...
//! This crate provides a thread pool for executing short, I/O-heavy futures efficiently. //! //! The standard `Runtime` provided by `tokio` uses a thread-pool to allow concurrent execution of //! compute-heavy futures. However, its work-stealing makes it so that futures may be executed on //! different threads to wher...
mod download; mod log; mod metadata; mod render; mod review; mod state; mod tactics; mod tehai; use download::download_tenhou_log; use metadata::Metadata; use render::render; use review::review; use tactics::TacticsJson; use std::env; use std::ffi::OsString; use std::fs::remove_file; use std::fs::File; use std::io; u...
//! Configuration for the gui portion of the terminal use crate::font::FontSystemSelection; use crate::frontend::guicommon::host::KeyAssignment; use crate::frontend::FrontEndSelection; use crate::get_shell; use failure::{bail, err_msg, format_err, Error, Fallible}; use lazy_static::lazy_static; use portable_pty::{Comm...
use arrow::{datatypes::Schema, ipc::writer::schema_to_bytes}; use flatbuffers::{FlatBufferBuilder, ForwardsUOffset, Vector, WIPOffset}; use flatbuffers_gen::sync_state_interim_generated::StateInterimSyncArgs; use nng::{options::Options, Aio, Socket}; use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver}; use s...
use std::{rc::Rc, cell::RefCell, fs::File, io::Write}; use glib::{clone, StaticType }; use gtk4::{ traits::{ WidgetExt, BoxExt, EditableExt, EntryExt, TextViewExt, TextBufferExt, StyleContextExt, ButtonExt, DialogExt, FileChooserExt, GtkWindowExt}, SpinButton, Orientation, Align, prelude::{ FileExt, EntryBufferExtManu...
use crate::codegen::backend; use crate::codegen::mangler; use crate::codegen::settings::*; use crate::codegen::structs::*; use crate::compiler; use crate::runtime; use crate::ssa::isa; use fnv::FnvHashMap; use std::fmt::Write; use std::rc::Rc; struct MemberRefData { pub accessor: String, pub bounds_checks: Vec...
use crate::texture; use ahash::AHashMap; use egui::{ epaint::{ImageDelta, Mesh, Vertex}, TextureId, }; use wgpu; use std::mem; pub struct UiTexture { pub tex: texture::Texture, pub bind_group: wgpu::BindGroup, } // in glsl: // ``` // layout(location = 0) in vec2 pos; // layout(location = 1) in vec2 u...
//! Types and tools for constructing symbolic gradients. use crate::{ base_ops::{apply::Apply, fill::fill_into, shape_constraint::same_shape, OpSpecification}, errors::GradError, graph::{IntoNodeValue, Node, NodeID}, subgraph::{backward_subgraph_from, forward_subgraph_from, SubGraph}, util::display::{Iter2Display,...
// Copyright © 2016 <NAME> <<EMAIL>> // Copyright 2014-2015 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-...
//! Spool (article storage) functionality. Supports multiple spool types. //! //! Types currently supported: //! - diabo use std::collections::HashMap; use std::fmt::{self, Debug}; use std::io; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::Duration; mod diablo; use serde::Deserialize; use cra...
// Copyright 2014 Google Inc. 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://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
//! Abstractions over the SPI Controller registers of the Tegra X1. //! //! See Chapter 37.3 in the Tegra X1 Technical Reference Manual //! for details. use register::{mmio::*, register_bitfields, register_structs}; use crate::memory_map::spi::*; /// A pointer to the SPI 2B-1 register block that can be accessed by d...
#[cfg(test)] mod mock; #[cfg(test)] mod tests; pub use self::pallet::*; #[frame_support::pallet] pub mod pallet { use crate::pallet_assets_wrapper::{ AccountId32Conversion, ExtractReserveLocation, GetAssetRegistryInfo, XTransferAsset, CB_ASSET_KEY, }; use frame_support::{ pallet_prelude::*, traits::{ tok...
use std::alloc::{alloc, alloc_zeroed, dealloc, handle_alloc_error, Layout}; // TODO: Serialization compatible with postgres-hll. // // https://github.com/citusdata/postgresql-hll // TODO: Provide no_std support once it lands. Math isn't stable in core // and the intrinsics required for ln and powi are nightly only. /...
use ion::Ion; use types::*; use std::collections::HashMap; // Reference: https://en.wikipedia.org/wiki/Standard_enthalpy_of_formation // In doubt: Reference: Binas 6th edition, table 57 // Missing values from http://www.mrbigler.com/misc/energy-of-formation.html // and http://www.conradnaleway.net/ThermoData.PDF /...
use crate::backend::render::{RenderBackend, ShapeHandle}; use crate::html::TextSpan; use crate::prelude::*; use crate::string::WStr; use crate::transform::Transform; use gc_arena::{Collect, Gc, MutationContext}; pub use swf::TextGridFit; /// Certain Flash routines measure text by rounding down to the nearest whole pi...
// Copyright 2017 Amagicom AB. // // 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...
mod message; pub mod reader; pub mod writer; use std::net::SocketAddr; use std::net::TcpStream; use std::{cmp, fmt, io, mem, time}; pub use self::message::Message; use self::reader::{RRes, Reader}; use self::writer::Writer; use bencode; use control::cio; use rpc::{self, resource}; use socket::Socket; use stat; use th...
use crate::WSClient; use std::sync::{ atomic::{AtomicBool, Ordering}, mpsc::Sender, Mutex, }; use std::{ collections::{HashMap, HashSet}, time::{Duration, Instant}, }; use super::{ utils::{connect_with_retry, CHANNEL_PAIR_DELIMITER}, Candlestick, Level3OrderBook, OrderBook, OrderBookTopK, ...
//! A backend module for implementing the iterator like //! [`iterator`][crate::iterator] module and the asynchronous //! adapter crates. //! //! This module contains generic types which abstract over the concrete //! IO type for the self-pipe. The motivation for having this abstraction //! are the adapter crates for d...
//! # Inter-thread waking //! //! This converts the single `PollWaker` that we get from the I/O //! poller into many thousands, arranged in a hierarchical bitmap to //! minimise lookups. A bitmap is used so that some code wishing to //! wake up its handler in the **Stakker** thread doesn't need to //! remember whether...
use crate::cipher::CipherSuite; use crate::tls::TLS_VERSION; use crate::tls_item::{DummyItem, ObscureData, TlsItem}; use crate::tls_result::TlsErrorKind::{DecodeError, InternalError, UnexpectedMessage}; use crate::tls_result::TlsResult; use crate::util::{ReadExt, WriteExt}; pub use crate::signature::{ HashAlgorith...
// Copyright 2017 The Grin Developers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
// Copyright (c) 2021-present, Cruise LLC // // This source code is licensed under the Apache License, Version 2.0, // found in the LICENSE-APACHE file in the root directory of this source tree. // You may not use this file except in compliance with the License. use crate::{axis::*, ScrollBarConfig}; use wrflib::*; #...
// //! Copyright 2020 Alibaba Group Holding Limited. //! //! 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 a...
use std::collections::HashMap; use std::sync::Arc; use futures::future::Either; use futures::FutureExt; use futures::StreamExt; use kitsune_p2p_types::tx2::tx2_adapter::test_utils::*; use kitsune_p2p_types::tx2::tx2_adapter::*; use kitsune_p2p_types::tx2::tx2_utils::PoolBuf; use kitsune_p2p_types::tx2::tx2_utils::TxUr...
//! A Panda is the main actor of the game and is controlled by the A.I. engine. use super::*; #[derive(Debug, Clone)] pub struct Panda { // This is this id of our panda. pub tag: usize, // An array of float representing the color of our panda. pub color: [f32; 4], // This actual position of our ...
extern crate rand; use byteorder::{ByteOrder, NetworkEndian}; use std::convert::TryFrom; use std::net::{Ipv4Addr, Ipv6Addr}; use super::{InformationElementTraits, InformationElementType, LENGTH}; #[derive(Copy, Clone, Debug, PartialEq)] pub enum InterfaceType { S1UENodeBGtpU = 0, S1USgwGtpU = 1, S12Rnc...
// Copyright (c) 2021 RBB S.r.l // <EMAIL> // SPDX-License-Identifier: MIT // Licensed under the MIT License; // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://spdx.org/licenses/MIT // // Unless required by applicable law or agreed to in writing...
// Copyright 2020 the Deno authors. All rights reserved. MIT license. use std::collections::HashMap; use std::sync::atomic::AtomicU32; use std::sync::atomic::Ordering; use swc_common::Span; use swc_ecma_ast::ObjectPatProp; use swc_ecma_ast::Pat; use swc_ecma_visit::Node; use swc_ecma_visit::Visit; lazy_static! { st...
// Copyright 2015-2019 Parity Technologies (UK) Ltd. // This file is part of Parity Ethereum. // Parity Ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at yo...
use std::vec::Vec; use parity_wasm::elements::{self, BlockType, Type}; use super::{resolve_func_type, Error}; /// Control stack frame. #[derive(Debug)] struct Frame { /// Stack becomes polymorphic only after an instruction that /// never passes control further was executed. is_polymorphic: bool, /// Count of val...
#![allow(missing_docs)] #[warn(missing_docs)] pub mod geometry; #[warn(missing_docs)] pub mod material; #[warn(missing_docs)] pub mod registry; #[warn(missing_docs)] pub mod shader; use crate::prelude::*; use crate::data::dirty::traits::*; use crate::data::dirty; use crate::debug::stats::Stats; use crate::system::gp...
//! you can visit [`figlet`] and [`figfont`] to find more details. //! you can visit [`fongdb`] to find more font. //! //! # Examples //! //! download [`small.flf`] and place it to the `resources` folder. //! //! convert string literal using standard or specified font: //! //! ``` //! use figlet_rs::FIGfont; //! //! le...
// Copyright 2015 The Gfx-rs Developers. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ag...
use std::cell::RefCell; use std::collections::VecDeque; use std::sync::{Arc, Mutex, Weak}; use std::sync::atomic::{AtomicBool, Ordering}; use {EventsLoopClosed, ControlFlow}; use super::WindowId; use super::window::WindowStore; use super::keyboard::init_keyboard; use wayland_client::{EnvHandler, EnvNotify, default_c...
use crate::assets::AssetStorage; use crate::{Binding, Changeable, CursorIcon, KayakContextRef}; use std::collections::HashMap; use std::path::PathBuf; use crate::event_dispatcher::EventDispatcher; use crate::{ multi_state::MultiState, widget_manager::WidgetManager, Index, InputEvent, MutableBound, Releasable, ...
// Copyright (c) The Starcoin Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::helper::{decode_key, gen_keypair, generate_node_name, load_key, save_key}; use crate::{ get_available_port_from, get_random_available_port, parse_key_val, ApiQuotaConfig, BaseConfig, ConfigModule, QuotaDuration, S...
//! Callbacks for Git hooks. //! //! Git uses "hooks" to run user-defined scripts after certain events. We //! extensively use these hooks to track user activity and e.g. decide if a //! commit should be considered "hidden". //! //! The hooks are installed by the `branchless init` command. This module //! contains the ...
//! Low-level AArch64 support. //! //! This file is heavily based on the x86_64 implementation. //! Relevant differences are highlighted in comments, but otherwise most //! comments have been removed to avoid duplication. Refer to x86_64.rs for //! detailed comments about what is happening in this file. //! //! ## Stac...
use log::{debug, info}; use osmgraphing::{ configs::{self, routing::RoutingAlgo}, helpers::err, io, network::Graph, }; use rand::SeedableRng; use std::{path::Path, sync::Arc, time::Instant}; pub mod multithreading; pub fn run(args: CmdlineArgs) -> err::Feedback { // check writing-cfg let _ = c...
#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - OTG_FS host configuration register (OTG_FS_HCFG)"] pub hcfg: crate::Reg<hcfg::HCFG_SPEC>, #[doc = "0x04 - OTG_FS Host frame interval register"] pub hfir: crate::Reg<hfir::HFIR_SPEC>, #[doc = "0x08 - OTG_FS host frame nu...
use crate::easypass::timeout::*; use crate::pouchdb::pouchdb::*; use crate::{is_online, get_node_mode, get_database_url, post_message, log}; use crate::easypass::recovery::{RecoverCategory, RecoverPassword}; extern crate rand; use rand::Rng; use wasm_bindgen::prelude::*; use wasm_bindgen_futures::{spawn_local, futur...
//! A Rust implementation of the FF1 algorithm, specified in //! [NIST Special Publication 800-38G](http://dx.doi.org/10.6028/NIST.SP.800-38G). use core::cmp; use block_modes::{block_padding::NoPadding, BlockMode, Cbc}; use cipher::{ generic_array::GenericArray, Block, BlockCipher, BlockDecrypt, BlockEncrypt, New...
use crate::{ assets::{ asset::{Asset, AssetId}, protocol::{AssetLoadResult, AssetProtocol, AssetVariant, Meta}, }, fetch::{FetchEngine, FetchProcess, FetchStatus}, }; use std::{any::TypeId, collections::HashMap}; #[derive(Debug, Clone, PartialEq)] pub enum LoadStatus { InvalidPath(Strin...
//! Contains functionality to load an ArrayData from the C Data Interface use std::{ptr::NonNull, sync::Arc}; use crate::{ array::*, bitmap::{utils::bytes_for, Bitmap}, buffer::{ bytes::{Bytes, Deallocation}, Buffer, }, datatypes::{DataType, PhysicalType}, error::{ArrowError, Re...
use crate::ai::{handiterators::*, gametree::*, *}; use crate::game::*; use crate::primitives::*; use crate::rules::{payoutdecider::*, ruleset::VStockOrT, rulessolo::*, *}; use crate::util::*; use crate::game_analysis::determine_best_card_table::table; use itertools::Itertools; use std::{ io::Write, time::{Insta...
//! A very fully featured x86 assembler //! //! In reality, this is just supposed to be stupid fast and simple #![cfg(target_arch = "x86_64")] use crate::vm::{ExitStatus, Condition, Reg, Label, Perm, Assembler}; // We allocate the pseudo-architecture registers as such: // // Reg::A - RAX // Reg::B - RCX // // We use...
// Copyright (C) 2020 ADVANCA PTE. LTD. // // 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 ag...
// based on @OneLoneCoder tutorials on the subject // https://youtu.be/ih20l3pJoeU // https://youtu.be/XgMWc6LumG4 extern crate sdl2; extern crate pdqsort; extern crate dotenv; extern crate sdl2_triangle; use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; use sdl2::rect::Point; use sdl2::...
use crate::{ cohesive_map::CohesiveMapExt, shunting_map::{Direction, ShuntingMapExt}, Index, }; use alloc::{borrow::ToOwned, vec::Vec}; use core::{ borrow::Borrow, convert::Infallible, iter, mem::{self, MaybeUninit}, pin::Pin, ptr::{drop_in_place, NonNull}, }; use higher_order_closure::higher_order_closure; us...
//! The core of Network Address Translation (NAT) logic use crate::checksum::{checksum, checksum_final}; use crate::hal::{HALError, HAL}; use smoltcp::phy::{Checksum, ChecksumCapabilities}; use smoltcp::wire::*; use smoltcp::Error as NetError; /// Network Address Translation (NAT). pub struct NAT<H: HAL> { pub ha...
// Copyright (c) 2020 DDN. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. pub mod error; pub mod linux_plugin_transforms; use device_types::{ devices::{Device, DeviceId}, mount::Mount, }; pub use error::ImlDeviceError; use futures::...
use std::net::Ipv4Addr; use macaddr::{MacAddr, MacAddr6, MacAddr8}; use std::convert::{TryInto, TryFrom}; use std::fmt::Debug; use std::ops::{Deref, Range, RangeFrom}; use crate::error::{DhcpError, DhcpResult}; use crate::option::{DhcpOptions, DhcpOption, PARAMETER_REQUEST_LIST, ...
#![feature(generic_associated_types)] #![feature(vec_resize_with)] #![feature(dbg_macro)] mod free_list; use std::any::{Any, TypeId}; use std::collections::HashMap; use std::marker::PhantomData; use std::mem; use std::ops::Range; use self::free_list::Allocator as FreeList; const CHUNK_SIZE: usize = 128; type Chunk<...
//! Routing functions for Torii. If you want to add an endpoint to //! Iroha you should add it here by creating a `handle_*` function, //! and add it to impl Torii. use iroha_actor::Addr; use iroha_config::{Configurable, GetConfiguration, PostConfiguration}; use iroha_core::{ block::stream::{ BlockPublisher...
//! All the code related to the color maps used in the program, these are used to convert a //! explanation to an actual color. use std::cmp::Ordering; // Buildin use crate::exp::{DaSilvaExplanation, VanDrielExplanation}; use bimap::BiHashMap; use kiss3d::conrod::color::{rgba, Color, Rgba}; use na::Point3; #[derive(...
//! Prototype module for cross chain assets backing. #![cfg_attr(not(feature = "std"), no_std)] #![recursion_limit = "128"] #[cfg(all(feature = "std", test))] mod mock; #[cfg(all(feature = "std", test))] mod tests; mod types { use crate::*; /// Balance of an account. pub type Balance = u128; pub type DepositId ...
use crate::CubeError; use crate::{ metastore::{Column, ColumnType, MetaStore}, store::DataFrame, table::Row, table::TableValue, }; use arrow::{array::{Int64Array, StringArray, UInt64Array}, record_batch::RecordBatchReader}; use arrow::{ array::Array, array::Int64Builder, array::PrimitiveArrayOps, ar...
use ::value::Value; use aes::cipher::block_padding::{AnsiX923, Iso10126, Iso7816, Pkcs7}; use aes::cipher::generic_array::GenericArray; use aes::cipher::KeyIvInit; use aes::cipher::StreamCipher; use aes::cipher::{AsyncStreamCipher, BlockEncryptMut}; use cfb_mode::Encryptor as Cfb; use ctr::Ctr64LE; use ofb::Ofb; use vr...
//! Raw data types returned by the Power User Gateway REST API. use std::io::BufRead; use std::iter::IntoIterator; use std::ops::Deref; use std::ops::DerefMut; use quick_xml::events::BytesStart; use quick_xml::Reader; use crate::error::Error; use crate::parser::FromXml; #[derive(Default, Debug, PartialEq)] pub stru...
//! Hash updates for node-based sure file. use crate::{ hashes::{hash_file, noatime_open, Estimate}, node::{into_tracker, NodeWriter, SureNode}, progress::Progress, store::{Store, TempCleaner}, Error, Result, }; use crossbeam::channel::{bounded, Sender}; use data_encoding::HEXLOWER; use log::{debug...
//! Traits dealing with SQLite data types. //! //! SQLite uses a [dynamic type system](https://www.sqlite.org/datatype3.html). Implementations of //! the `ToSql` and `FromSql` traits are provided for the basic types that SQLite provides methods //! for: //! //! * C integers and doubles (`c_int` and `c_double`) //! * St...
use sr_primitives::traits::{ Member, SimpleArithmetic, Bounded, CheckedAdd, CheckedMul, Convert, SaturatedConversion, }; use support::{ decl_module, decl_storage, decl_event, ensure, StorageValue, StorageMap, Parameter, traits::{ Currency, LockableCurrency, WithdrawReasons, LockIdentifier, ReservableCurrenc...
//! Command management and overall refactoring state. use std::cell::{self, Cell, RefCell}; use std::collections::{HashMap, HashSet}; use std::iter; use std::mem; use std::sync::Arc; use rustc::session::Session; use syntax::ast::{NodeId, Crate, CRATE_NODE_ID, Mod}; use syntax::ast::{Expr, Pat, Ty, Stmt, Item}; use syn...
use activation_function::ActivationFunction; use acyclic_network::{Network, NodeType}; pub use acyclic_network::NodeIndex as CppnNodeIndex; use fixedbitset::FixedBitSet; use std::fmt::Debug; pub trait CppnNodeType: NodeType + ActivationFunction { fn is_input_node(&self) -> bool; fn is_output_node(&self) -> boo...
//! # Welcome to shotgrid-rs! //! //! `shotgrid-rs` is a REST API client for [Autodesk ShotGrid][shotgrid] //! (formerly _Shotgun_) built with [reqwest] and [serde_json]. //! //! ## Features //! //! There are a handful of features to help control the configuration of the //! underlying HTTP client. //! //! > By default...
// Copyright 2020-2021 <NAME> under the terms of the MIT License as detailed // in the accompanying file README.md or <https://opensource.org/licenses/MIT>. //! Algorithms for grouping cubes into cubical batches (chunks). //! //! For the time being, the chunk size is locked to the constant `CHUNK_SIZE`. use cgmath::{...
//! Contains all structures and methods to create and manage scene graph nodes. //! //! For more info see [`Node`] #![warn(missing_docs)] use crate::{ asset::core::inspect::PropertyInfo, core::{ define_is_as, inspect::Inspect, math::aabb::AxisAlignedBoundingBox, visitor::{Visit...
mod bounding; mod debug; mod highlight; mod interactable; mod raycast; mod select; pub use crate::{ debug::DebugPickingPlugin, highlight::{HighlightablePickMesh, PickHighlightParams}, interactable::{HoverEvents, InteractableMesh, InteractablePickingPlugin, MouseDownEvents}, select::SelectablePickMesh, ...
use std::cell::RefCell; use std::rc::Rc; use uni_app; use uni_gl; use crate::console::Console; use crate::font::FontLoader; use crate::input::{DoryenInput, InputApi}; use crate::program::{set_texture_params, Program}; // shaders const DORYEN_VS: &str = include_str!("doryen_vs.glsl"); const DORYEN_FS: &str = include_...
#[cfg(feature = "editor")] pub mod edit { use editor::gfx_editor; use editor::music_editor; use editor::text_editor; use std::sync::{Arc, Mutex}; use std::collections::HashMap; use unicorn::utils::Widget; use gfx::Screen; use config::Players; use sound::sound::{SoundInternal, ...
macro_rules! file_for_module { ($ctx:ident, $common_files:ident, $module_name:ident) => {{ let output_dir = &$ctx.cfg.output_dir; let target_pointer_width = $ctx.target_pointer_width; let generated_foreign_files = &mut $ctx.generated_foreign_files; $common_files .entry($m...
// 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. //! Test tools for building and serving TUF repositories containing Fuchsia packages. use { crate::{ package::Package, process::wait_for_proce...
// External imports use chrono::Utc; // Workspace imports use zksync_crypto::rand::{Rng, SeedableRng, XorShiftRng}; use zksync_types::{ block::Block, mempool::SignedTxVariant, priority_ops::FullExit, tx::{ChangePubKey, Transfer, TxHash, Withdraw}, AccountId, Address, BlockNumber, ExecutedPriorityOp,...
use std::rc::Rc; use std::fs::File; use std::io::{ErrorKind}; use std::io::Read; use std::collections::VecDeque; use crate::index; use crate::store; use crate::io; use log::{info, debug}; pub struct ChunkerConfig { pub index: Box<index::Index>, pub store: Box<store::Store>, pub source: Box<io::LocalSource...
//! u256.rs - Little endian data vectors of [i64; 4] used by Fr and Fq // // Copyright (c) 2018 Stegos // // 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 wi...
use crate::nibble::swap_nibbles; use crate::stp::{self, OpCode::*, StpVersion::*, TimestampType::*}; use std::result; #[derive(Debug, PartialEq)] pub struct Packet { pub packet: stp::Packet, // Packet type. pub start: usize, // Packet's starting nibble offset. pub span: usize, // Pacekt's si...