text
stringlengths
7.05k
33.9k
// // Copyright 2020 The Project Oak Authors // // 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 o...
use std::fmt::{Debug, Display}; use azure_core::TokenCredential; use base64::{CharacterSet, Config}; use chrono::serde::ts_seconds_option; use chrono::{DateTime, Utc}; use getset::Getters; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde_json::{Map, Value}; use crate::client::API_VERSION_PARAM...
use std::str::FromStr; use std::time::Instant; use crossterm::style::Color; use super::highlight::highlight; use crate::irust::{IRust, Result}; use crate::utils::stdout_and_stderr; use crate::{ irust::format::{format_check_output, format_err, format_eval_output}, utils::ctrlc_cancel, }; use irust_repl::{cargo...
mod input; use std::collections::HashMap; use crate::dom::comment::Comment; use crate::dom::tag::Tag; use crate::dom::text::Text; use crate::dom::Dom; use crate::dom::DomType; use input::Input; /// Parses the tag document and returns a Dom structure tree. /// /// # Arguments /// * `doc` - tag document /// /// # Erro...
#![doc( html_root_url = "https://docs.rs/structdoc-derive/0.1.4/structdoc-derive/", test(attr(deny(warnings))) )] #![forbid(unsafe_code)] //! Procedural derive support for the [`StructDoc`] trait. //! //! Users don't need to interact with this crate directly. It is brought in as a dependency of the //! [`struc...
//! The Mach-o, mostly zero-copy, binary format parser and raw struct definitions use alloc::vec::Vec; use core::fmt; use log::debug; use scroll::ctx::SizeWith; use scroll::{Pread, BE}; use crate::container; use crate::error; pub mod bind_opcodes; pub mod constants; pub mod exports; pub mod fat; pub mod header; pub...
use std::cmp::Ordering; use std::mem::replace; use crate::suffix_index::{AsIndex, SuffixIndex}; #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum Type { L, S, } impl Default for Type { fn default() -> Self { Self::L } } fn classify<C: Ord>(text: &[C], types: &mut [Type]) { debug_asse...
use super::cfg::{BasicBlock, ControlFlowGraph, Instr}; use crate::parser::pt::Loc; use crate::sema::ast::{Expression, Namespace}; use std::collections::{HashMap, HashSet}; use std::fmt; #[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)] struct InstrDef { pub block_no: usize, pub instr_no: usize, } #[allow(clip...
use std::{borrow::Cow, mem}; use proc_macro2::TokenStream; use quote::{quote, ToTokens}; use syn::{punctuated::Punctuated, *}; // ================================================================================================= // Utilities macro_rules! parse_quote { ($($tt:tt)*) => { syn::parse2(quote::...
use { crate::{ editor_state::{ EditorState, DocumentInner }, code_editor::{ token_cache::TokenCache, protocol::Request, code_editor_impl::{CodeEditorImpl, CodeEditorAction, LinesLayout, LineLayoutOutput} }, design_ed...
use crate::{ absm::{ command::{ blend::{AddInputCommand, AddPoseSourceCommand}, AbsmCommand, AbsmCommandStack, AbsmEditorContext, }, inspector::Inspector, menu::Menu, message::{AbsmMessage, MessageSender}, node::{AbsmNode, AbsmNodeMessage}, ...
//! Chunk definition for what is going to be processed by the checkers //! //! A chunk consists of multiple consecutive literals joined by newlines. use super::*; use indexmap::IndexMap; use std::path::Path; use crate::documentation::PlainOverlay; use crate::{util::sub_chars, Range, Span}; /// Definition of the sou...
// Rust Bitcoin Library // Written by // The Rust Bitcoin developers // // To the extent possible under law, the author(s) have dedicated all // copyright and related and neighboring rights to this software to // the public domain worldwide. This software is distributed without // any warranty. // // You should have ...
use std::cmp::min; use std::mem::replace; use std::sync::Arc; use itertools as it; use light_arena::Allocator; use log::{info, warn}; use crate::bounds::{Axis, Bounds3f}; use crate::interaction::SurfaceInteraction; use crate::light::AreaLight; use crate::material::{Material, TransportMode}; use crate::paramset::Param...
//! Linux-specific implementation of the `SharedLibrary` trait. use libc; use crate::Segment as SegmentTrait; use crate::SharedLibrary as SharedLibraryTrait; use crate::{Bias, IterationControl, SharedLibraryId, Svma}; use std::any::Any; use std::borrow::Cow; use std::env::current_exe; use std::ffi::{CStr, CString, O...
use bc::ContextDetail as _; use fxhash::FxHashMap; use std::mem; use wgpu::util::DeviceExt as _; #[derive(Clone, Copy, Debug)] pub struct Material { pub base_color_map: Option<crate::ImageRef>, pub emissive_color: crate::Color, pub metallic_factor: f32, pub roughness_factor: f32, pub normal_scale: ...
// Required for ts3_derive macro. #[allow(unused_imports)] use crate as ts3; pub use async_trait::async_trait; use crate::{ event::{EventHandler, Handler}, BoxError, CommandBuilder, Decode, Error, Serialize, }; use bytes::Bytes; use std::{ collections::HashMap, convert::From, fmt::{self, Display, ...
#![allow(unsafe_code)] use core::ops::Range; use crate::__ctfe::StrBuf; #[derive(Clone, Copy)] #[repr(u8)] enum TokenKind { NonAscii = 1, Lower = 2, Upper = 3, Digit = 4, Dot = 5, Other = 6, } impl TokenKind { const fn new(b: u8) -> Self { if !b.is_ascii() { return To...
use matrix_sdk::Client; use std::cell::RefCell; use std::collections::HashMap; use std::io::stdout; use std::str::FromStr; use std::sync::Arc; use tokio::sync::{mpsc, watch, Mutex}; use unsegen::base::*; use unsegen::input::{ EditBehavior, Editable, Input, Key, OperationResult, ScrollBehavior, Scrollable, }; use un...
#[cfg(debug_assertions)] mod comments; mod pass_mode; mod returning; use rustc_target::spec::abi::Abi; use self::pass_mode::*; use crate::prelude::*; pub use self::returning::codegen_return; fn clif_sig_from_fn_sig<'tcx>( tcx: TyCtxt<'tcx>, sig: FnSig<'tcx>, is_vtable_fn: bool, ) -> Signature { let ...
use std::cmp::max; use std::collections::HashSet; use std::ptr; use ahash::RandomState; use crate::models::{CorrelationMatrix, Matrix}; use crate::solver::evaluate::route_cost; use crate::solver::genetic::Individual; use crate::solver::improvement::moves::{Moves, SwapStar}; use crate::solver::improvement::{InsertLoca...
use std::collections::BTreeMap; use std::env; use std::fs; use std::io::{copy, stderr, stdout, Write}; use std::process::Command; use airtable_api::{Airtable, Record}; use google_drive::GoogleDrive; use html2text::from_read; use hubcaps::issues::{IssueListOptions, State}; use pandoc::OutputKind; use sendgrid_api::Send...
#![no_std] #![no_main] #![feature(asm)] use panic_halt as _; use riscv_rt::entry; use core::fmt::Write; use gd32vf103xx_hal::delay::McycleDelay; use gd32vf103xx_hal::pac; use gd32vf103xx_hal::prelude::*; use gd32vf103xx_hal::eclic::{EclicExt, Level, LevelPriorityBits, Priority, TriggerType}; use gd32vf103xx_hal::e...
// Copyright (c) 2015 Alcatel-Lucent, (c) 2016 Nokia // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright // notice,...
/*a Copyright Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the...
use std::{ alloc::{alloc, alloc_zeroed, dealloc, handle_alloc_error, realloc, Layout}, fmt, mem::{align_of, size_of}, ptr::{self, NonNull}, }; use super::Core; /// A `Core` implementation that is conceptually a `BitVec` and a `Vec<T>`. /// /// This is the default core as it has quite a few advantages...
use rendy::{ factory::Factory, graph::render::{ SimpleGraphicsPipeline, SimpleGraphicsPipelineDesc, }, hal, hal::{ adapter::PhysicalDevice, device::Device, }, }; use crate::display::scene::Scene; lazy_static::lazy_static! { static ref VERTEX: rendy::shader::...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 use crate::interval_set::Interval; use alloc::collections::VecDeque; use bytes::{Buf, Bytes}; use core::{ convert::{TryFrom, TryInto}, fmt, }; use s2n_codec::{Encoder, EncoderValue}; use s2n_quic_core::...
use mouros::CVoid; use mouros::tasks; use mouros::tasks::CriticalLock; use mouros::pool_alloc::Pool; use mouros::mailbox; use mouros::mailbox::Mailbox; use mouros::mailbox::{RxChannelSpsc, TxChannelSpsc}; use crate::bindings::message_dispatcher as md; use crate::bsp::i2c; use core::ptr; use core::mem; use core::sli...
use super::digest::{Crypto, Cryptor, Encryptable, Encrypted}; use num::Zero; use std::ops::{Add, AddAssign, Mul, Neg, Sub, SubAssign}; use utils::{ math::{Binary, ModDistribution, Random, Torus32}, mem, torus, traits::AsLogic, }; pub struct TLWE<const N: usize>; macro_rules! tlwe_encryptable { ($t:ty) ...
/// Driver for kernel to be tested use crate::utils::cli::{App, Arg, OptVal}; use crate::utils::free_ipv4_port; use crate::Config; use nix::fcntl::{fcntl, FcntlArg, OFlag}; use os_pipe::{pipe, PipeReader, PipeWriter}; use std::collections::HashMap; use std::fmt; use std::io::{ErrorKind, Read}; use std::os::unix::io::As...
use cairo; use gettextrs::gettext; use gio; use gio::prelude::*; use glib; use gtk; use gtk::prelude::*; use std::cell::RefCell; use std::fs::File; use std::rc::{Rc, Weak}; use application::CONFIG; use media::PlaybackContext; use metadata; use metadata::{MediaInfo, Timestamp}; use super::{ChapterTreeManager, Chapter...
use na::{self, Point2, Real, Unit}; #[cfg(feature = "dim3")] use alga::linear::FiniteDimInnerSpace; use math::{Isometry, Vector}; use pipeline::narrow_phase::{ContactDispatcher, ContactManifoldGenerator}; use query::algorithms::VoronoiSimplex; use query::algorithms::gjk::GJKResult; #[cfg(feature = "dim3")] use query::...
use std::collections::HashMap; use std::fs::read_to_string; use std::sync::Arc; use std::time::{Duration, Instant}; use bytes::BufMut; use clap::Parser; use futures::future; use itertools::Itertools; use rand::{thread_rng, Rng}; use runkv_client::client::{RunkvClient, RunkvClientOptions}; use runkv_common::log::init_r...
use crate::lazy::SyncOnceCell; use crate::memlayout::{KERNBASE, PHYSTOP, PLIC, TRAMPOLINE, TRAPFLAME, UART0, VIRTIO0}; use crate::proc::PROCS; use crate::riscv::{make_satp, pgroundup, PGSHIFT, PGSIZE}; use alloc::boxed::Box; use bitflags::bitflags; use core::cmp::{Ord, PartialEq, PartialOrd}; use core::convert::From; u...
use crate::{Reader, Writer}; use indexmap::IndexMap; use std::io; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] // Records available in EXTH header pub enum ExthRecord { // source - https://wiki.mobileread.com/wiki/MOBI#EXTH_Header DrmServerId, DrmCommerceId, DrmEbookbaseBookId, ...
//! A legacy authenticated key agreement protocol over TCP. //! //! [NTCP specification](https://geti2p.net/en/docs/transport/ntcp) use bytes::BytesMut; use cookie_factory::GenError; use futures::{ stream::{SplitSink, SplitStream}, sync::mpsc, try_ready, Async, AsyncSink, Future, Poll, Sink, StartSend, Str...
use crate::accel::bvh::BVHAccelerator; use crate::accel::Aggregate; use crate::bsdf::*; use crate::camera::*; use crate::gpu::pt::WavefrontPathTracer; // use crate::film::*; use crate::integrator::ao::RTAO; use crate::integrator::nrc::CachedPathTracer; use crate::integrator::path::PathTracer; use crate::integrator::*; ...
use crate::col_usage::{collect_top_level_cols, compute_select_schema, free_external_cols}; use crate::common::{ lookup, mk_qid, to_table_path, CoreIOCtx, KeyBound, OrigP, QueryESResult, QueryPlan, ReadRegion, Timestamp, }; use crate::expression::{compress_row_region, compute_key_region, is_true}; use crate::gr_quer...
//! OpenType glyph rendering. //! //! - Render glyph outlines into coverage bitmaps. //! - Place glyphs at subpixel offsets and scale them to subpixel sizes. This is //! important if you plan to render more than a single glyph since inter-glyph //! spacing will look off if every glyph origin must be pixel-aligned. ...
use std::{fmt, iter}; use debris_common::{Ident, Span}; use crate::{ class::ClassRef, error::{LangError, LangErrorKind, Result}, hir::{IdentifierPath, SpannedIdentifier}, llir::utils::ItemId, namespace::NamespaceEntry, objects::{ obj_class::{HasClass, ObjClass}, obj_function::O...
#![unstable(feature = "process_internals", issue = "none")] #[cfg(test)] mod tests; use crate::borrow::Borrow; use crate::collections::BTreeMap; use crate::env; use crate::env::split_paths; use crate::ffi::{OsStr, OsString}; use crate::fmt; use crate::fs; use crate::io::{self, Error, ErrorKind}; use crate::mem; use c...
use crate::{ FileHolder, Resource, SerializedData, SerializedDataError, YyResource, YyResourceHandler, YypBoss, }; use anyhow::Context; use anyhow::Result as AnyResult; use image::{ImageBuffer, Rgba}; use std::{collections::HashMap, num::NonZeroUsize, path::Path}; use yy_typings::{sprite_yy::*, utils::TrailingC...
use super::{ArcLengthParameterization, Bezier, Evaluate, EvalScale, EvalTranslate, Parameterization, Piecewise, Vector, Rect}; use crate::vec2; use glifparser::{Glif, Outline, glif::{Lib, PAPContour, PatternCopies, PatternSubdivide, PatternStretch}}; use skia_safe::Path; // At some point soon I want to restructure th...
// 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...
#![allow(dead_code)] use std::borrow::Cow; use std::cmp; use std::env; use std::fs; use std::io; use std::path::{Path, PathBuf}; use std::str; use std::thread; use std::time; use ::num_cpus; use docopt::Docopt; use log::{info, log_enabled, Level}; use serde::de::{Deserialize, DeserializeOwned, Deserializer, Error}; u...
#[macro_use] extern crate log; pub mod file_info { use std::{ cell::RefCell, fmt::{Debug, Display, Formatter}, fs::File, io::{BufRead, BufReader}, path::Path, rc::Rc, }; use anyhow::*; #[derive(Eq, PartialEq, Hash)] pub enum FileType { Heade...
#![recursion_limit="128"] extern crate chrono; #[macro_use] extern crate clap; extern crate errno; #[macro_use] extern crate error_chain; extern crate libc; #[macro_use] extern crate nom; #[cfg(windows)] extern crate kernel32; #[cfg(windows)] extern crate winapi; /* * TODO * - make print and set argument groups mu...
use crate::dynamics::{MassProperties, RigidBodyHandle, RigidBodySet}; use crate::geometry::{ Ball, Capsule, Cuboid, HeightField, InteractionGroups, Segment, Shape, ShapeType, Triangle, Trimesh, }; #[cfg(feature = "dim3")] use crate::geometry::{Cone, Cylinder, RoundCylinder}; use crate::math::{AngVector, Isometr...
//---------------------------------------------------------------------------// // Copyright (c) 2017-2019 <NAME>. All rights reserved. // // This file is part of the Rusted PackFile Manager (RPFM) project, // which can be found here: https://github.com/Frodo45127/rpfm. // // This file is licensed under the MIT licen...
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // 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 ...
use crate::{Result, Error}; use crate::wire::{IpVersion, IpProtocol, IpEndpoint, IpAddress, Ipv4Cidr, Ipv4Address, Ipv4Packet, Ipv4Repr, UdpPacket, UdpRepr, DhcpPacket, DhcpRepr, DhcpMessageType}; use crate::wire::dhcpv4::field as dhcpv4_field; use crate::socket::{SocketSet, SocketHandl...
mod gan; mod giiker; mod gocube; mod moyu; use crate::common::TimedMove; use crate::cube3x3x3::Cube3x3x3; use anyhow::{anyhow, Result}; use btleplug::api::{BDAddr, Central, Peripheral}; use gan::gan_cube_connect; use giiker::giiker_connect; use gocube::gocube_connect; use moyu::moyu_connect; use std::collections::Hash...
//! # `defmt-bbq` //! //! > A generic [`bbqueue`] based transport for [`defmt`] log messages //! //! [`defmt`]: https://github.com/knurling-rs/defmt //! [`bbqueue`]: https://github.com/jamesmunns/bbqueue //! //! `defmt` ("de format", short for "deferred formatting") is a highly efficient logging framework that targets ...
// Copyright 2018 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-BSD-3-Clause file. // // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause us...
/// The various types in the LibRetro API. use std::ffi::CString; use std::str::Utf8Error; use std::os::raw::*; use ffi::char_pointer_to_owned; // Core functions // retro_init() pub type RetroInitFn = unsafe extern "C" fn() -> (); // retro_deinit() pub type RetroDeinitFn = unsafe extern "C" fn() -> (); // unsign...
use clap::{crate_description, crate_version, App, Arg, ArgMatches, SubCommand}; use git_author::{ error::*, git::{self, Author, ConfigFileLocation, ReplaceFilter, ReplaceTarget}, }; use std::error::Error as _; const NAME_KEY: &str = "name"; const EMAIL_KEY: &str = "email"; fn main() -> Result<(), Error> { ...
#![doc(html_logo_url = "https://raw.githubusercontent.com/baoyachi/shadow-rs/master/shadow-rs.png")] //! `shadow-rs` :build-time information stored in your rust project.(binary,lib,cdylib,dylib) //! //! It's allows you to recall properties of the build process and environment at runtime, including: //! //! `Cargo.toml`...
// Copyright 2020 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
//! Basic implementation of a Simple Protocol client for [Elatec //! TWN4](https://www.elatec-rfid.com/en/products/rfid-readerwriter-with-antenna/multi-frequency/twn4-multitech/) //! family devices, based upon [embedded-hal](https://github.com/japaric/embedded-hal). #![no_std] #![deny(missing_docs)] #[macro_use] exter...
// 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 serving TUF repositories. use { crate::repo::Repository, anyhow::{bail, format_err, Context as _, Error}, chrono::Utc, ...
extern crate futures; extern crate env_logger; extern crate paho_mqtt as mqtt; extern crate openssl; extern crate sys_info; use futures::future::Future; // Read file use std::{ fs::File, io::{prelude::*, BufReader}, path::Path, str, }; // For getting MAC address // use std::fs; // use std::io::Read; ...
#![allow(missing_docs)] use smart_default::SmartDefault; use crate::target_device::generic::Variant; #[cfg(feature = "samd5x")] use crate::target_device::dmac::channel::chctrla::{TRIGACT_A, BURSTLEN_A, THRESHOLD_A, TRIGSRC_A}; #[cfg(feature = "samd5x")] use crate::target_device::dmac::channel::chprilvl::PRILVL_A; #[cf...
/*! Export Directory. The export directory contains a list of symbols, well, exported by this module. A symbol can refer to a function, static data or a forwarded reference to an exported symbol in another module. Symbols can be exported by name or by their ordinal number. The ordinal number of an exported function i...
use crate::math::{Isometry, Point, Real, Rotation, Translation, Vector}; use crate::object::{BoundaryHandle, FluidHandle}; use bevy::math::Quat; use bevy::prelude::{Assets, Commands, Mesh, Query, StandardMaterial, Transform}; use bevy_egui::egui::ComboBox; use bevy_egui::{egui::Window, EguiContext}; #[cfg(feature = "di...
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #![feature(async_await, await_macro, futures_api, pin, arbitrary_self_types)] #![deny(warnings)] use { byteorder::{LittleEndian, ReadBytesExt}, fi...
//! X.509 certificate parser //! //! Based on RFC5280 //! use crate::error::{X509Error, X509Result}; use crate::time::ASN1Time; use crate::x509::*; use chrono::offset::TimeZone; use chrono::{DateTime, Datelike, Utc}; use nom::branch::alt; use nom::bytes::complete::take; use nom::combinator::{all_consuming, complete, m...
use futures::{channel::mpsc, future::join_all}; use tokio::task::JoinHandle; use zksync::{ error::ClientError, ethereum::PriorityOpHolder, operations::SyncTransactionHandle, provider::Provider, types::TransactionInfo, }; use zksync_types::{tx::TxHash, TransactionReceipt, TxFeeTypes, U256}; use crate::{ ac...
// (c) Copyright 2018 Palantir Technologies 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 req...
/// Encapsulates settings provided to GetIamPolicy. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetPolicyOptions { /// Optional. The policy format version to be returned. /// /// Valid values are 0, 1, and 3. Requests specifying an invalid value will be /// rejected. /// /// Request...
/* Example demonstrating Proof Verification. First Issuer creates Credential Definition for existing Schema. After that, it issues a Credential to Prover (as in issue-credential example) Once Prover has successfully stored its Credential, it uses Proof Request that he received, to get Credentials which satisfy the Pr...
//TODO check that the cycle is pipeline correct in regard to exceptions (write back must not succeed if exception) #[cfg(test)] mod test; mod system; use self::system::*; // Cpu use super::*; use ::arch::inst::*; use ::arch::inst::patch; use ::arch::inst::opcode::*; use ::arch::inst::arg; use ::arch::system::*; ...
use crate::virtio::{ActivateResult, DeviceState, Queue, VirtioDevice, VIRTIO_MMIO_INT_VRING}; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Arc, Mutex}; use utils::eventfd::EventFd; use vm_memory::{Address, ByteValued, Bytes, GuestAddress, GuestMemoryMmap, Le32}; use vhost_gpu_backend::protocol::{ ...
/************************************************************************* > File Name: board.rs > Author: Netcan > Descripton: Board impl > Blog: http://www.netcan666.com > Mail: <EMAIL> > Created Time: 2020-06-20 19:23 ************************************************************************/ ...
//! Domain specific language for the Lazy api. use crate::frame::group_by::{fmt_groupby_column, GroupByMethod}; use crate::lazy::utils::{get_supertype, rename_field}; use crate::{lazy::prelude::*, prelude::*}; use arrow::datatypes::{Field, Schema}; use std::{ fmt, ops::{Add, Div, Mul, Rem, Sub}, sync::Arc, ...
mod base; mod hash; mod list; /// <https://redis.io/commands#server> mod others; mod set; mod sorted_set; mod syncsnapshot; use std::sync::Arc; use common::connection::parse::{frame::Frame, Parse}; use db::Db; use self::{ base::{ decr::Decr, decrby::Decrby, del::Del, exists::Exists, expire::Expire, expir...
use itertools::*; use std::collections::HashMap; use std::fmt::{self, Display, Formatter}; use read::Sexp; #[derive(Debug)] pub struct File { defs: HashMap<String, Expr>, exprs: Vec<Expr>, } impl File { pub fn exprs(&self) -> &[Expr] { &*self.exprs } } #[derive(Debug)] pub enum Item { ...
// Copyright (c) Aptos // SPDX-License-Identifier: Apache-2.0 //! This file defines ledger store APIs that are related to the main ledger accumulator, from the //! root(LedgerInfo) to leaf(TransactionInfo). use crate::{ change_set::ChangeSet, errors::AptosDbError, schema::{ epoch_by_version::Epoch...
use std::{ collections::{BTreeMap, HashMap}, io::{self, ErrorKind}, mem, net::{IpAddr, SocketAddr}, pin::Pin, sync::{ atomic::{AtomicBool, Ordering}, Arc, }, task::{Context, Poll, Waker}, thread::{self, JoinHandle, Thread}, time::Duration, }; use log::{error, tra...
// 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::input_device, crate::input_handler::InputHandler, crate::touch, crate::utils::{Position, Size}, anyhow::Error, async_t...
//! FIXME: write short doc here mod atom; pub(crate) use self::atom::match_arm_list; pub(super) use self::atom::{literal, LITERAL_FIRST}; use super::*; pub(super) enum StmtWithSemi { Yes, No, Optional, } const EXPR_FIRST: TokenSet = LHS_FIRST; pub(super) fn expr(p: &mut Parser) -> BlockLike { let r...
use crate::ast::*; use crate::internal::*; pub struct ModelBuilder<'a> { pub framework: &'a Nnef, pub registries: Vec<String>, pub model: TypedModel, pub naming_scopes: Vec<String>, pub scopes: Vec<HashMap<String, Value>>, pub proto_model: &'a ProtoModel, } impl<'mb> ModelBuilder<'mb> { pu...
/*! This module provides two `std::io::Read` implementations: * [`read::FrameDecoder`](struct.FrameDecoder.html) wraps another `std::io::Read` implemenation, and decompresses data encoded using the Snappy frame format. Use this if you have a compressed data source and wish to read it as uncompressed data. * [`re...
//! ListView EnsoGL Component. //! //! ListView a displayed list of entries with possibility of selecting one and "choosing" by //! clicking or pressing enter - similar to the HTML `<select>`. #![feature(option_result_contains)] #![feature(trait_alias)] #![warn(missing_copy_implementations)] #![warn(missing_debug_impl...
use std::collections::HashMap; use std::env; use std::fmt; use std::fs; use std::hash::BuildHasher; use std::io::{BufRead, BufReader, Cursor}; use std::path::{Path, PathBuf}; use std::process; use failure::{Error, ResultExt}; use if_chain::if_chain; use lazy_static::lazy_static; use regex::Regex; use serde::Deserializ...
// Unless explicitly stated otherwise all files in this repository are licensed // under the MIT/Apache-2.0 License, at your convenience // // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2020 Datadog, Inc. // use crate::{to_io_error, uring_sys}; use ahash::AHashMap; use l...
use crate::util::WEB_CLIENT; use lazy_static::lazy_static; use reqwest::{header, StatusCode}; use scraper::{ElementRef, Html, Selector}; use selectors::attr::CaseSensitivity; struct CrateStructure<'a> { module: &'a [&'a str], name: &'a str, structure_type: StructureType, } enum StructureType { Module,...
#![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_imports)] // Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under both the MIT license found in the // LICENSE-MIT file in the root directory of this source tree and the Apache // License, Version 2.0 found in the LICE...
// Copyright (c) Aptos // SPDX-License-Identifier: Apache-2.0 use crate::{ error::Error, notification_handlers::{CommitNotification, ErrorNotification}, }; use aptos_config::config::StateSyncDriverConfig; use aptos_logger::prelude::*; use aptos_types::{ ledger_info::LedgerInfoWithSignatures, state_stor...
//! # Sender queue //! //! A sender queue allows a `ConsensusProtocol` that outputs `Epoched` messages to buffer those outgoing //! messages based on their epochs. A message is sent to its recipient only when the recipient's //! epoch matches the epoch of the message. Thus no queueing is required for incoming messages ...
use sharded_slab::{Guard, Slab}; use super::stack::SpanStack; use crate::{ registry::{ extensions::{Extensions, ExtensionsInner, ExtensionsMut}, LookupSpan, SpanData, }, sync::RwLock, }; use std::{ cell::{Cell, RefCell}, sync::atomic::{fence, AtomicUsize, Ordering}, }; use tracing_c...
use std; use crate::parser::{ Numeral, Decimal }; /// Commands available in SMTLib2 conforming solvers. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Command { /// Corresponds to the `assert` command. Assert, /// Corresponds to the `check-sat` command. CheckSat, /// Correspon...
// Copyright © 2021-2022 // Author: <NAME> <<EMAIL>> // SPDX-License-Identifier: MIT use std::collections::HashSet; use crate::{Camelcase, CrateModule, Pipeline, Uniform}; use proc_macro2::TokenStream; use quote::quote; pub fn header() -> TokenStream { quote! { use std::{collections::HashMap, ffi::CStrin...
//! Image processing, see [OpenCV //! imgproc](http://docs.opencv.org/3.1.0/d7/dbd/group__imgproc.html). use super::core::*; use super::*; use std::os::raw::{c_double, c_float, c_int}; // ============================================================================= // Imgproc // =====================================...
/* This tool is part of the WhiteboxTools geospatial analysis library. Authors: Dr. <NAME> Created: August 15, 2017 Last Modified: Dec. 15, 2017 License: MIT NOTES: This index (C) is taken from Lindsay (2006) Sensitivity of channel mapping techniques to uncertainty in digital elevation data: C = SS_mp ∕ SS_B = [∑(p...
use std::str::FromStr; use cron::Schedule; use chrono::{DateTime, TimeZone, Utc, NaiveDateTime}; // See also: Local, TimeZone use chrono_tz::Tz; use tracing::{trace, debug, info, warn, error, span, Level}; use crate::errors::CronError; #[derive(Debug)] struct CronStruct { second: Option<String>, minute: Option<St...
use crate::app::*; use fltk_sys::fl::Fl_get_rgb_color; /// Defines label types #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq)] pub enum LabelType { Normal = 0, None, Shadow, Engraved, Embossed, Multi, Icon, Image, FreeType, } /// Defines the frame type, which can be set using...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{Context, Result}; use debug_interface::NodeDebugClient; use diem_config::{config::NodeConfig, network_id::NetworkId}; use diem_genesis_tool::{ config_builder::{FullnodeBuilder, FullnodeType, ValidatorBuilder}, swarm...
use crate::sys; use crate::Ui; /// A key identifier #[repr(u32)] #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)] #[allow(missing_docs)] // Self-describing pub enum Key { Tab = sys::ImGuiKey_Tab, LeftArrow = sys::ImGuiKey_LeftArrow, RightArrow = sys::ImGuiKey_RightArrow, UpArrow = sys::ImGuiKey_UpArr...
use crate::bindings; use crate::core::ngx_core_macro; use crate::core::ngx_module_macro; use crate::core::ngx_string_macro; use std::mem; use std::ptr; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ngx_http_chunked_filter_ctx_t { pub free: *mut bindings::ngx_chain_t, pub busy: *mut bindings::ngx_chain_t,...