text
stringlengths
3.35k
22.8k
// This file is part of Polka Domain. // Copyright (C) 2021 Polka Domain. // 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.or...
//! This module contains the implementation for the RTT protocol. It's not meant to be used directly //! in user code, and therefore mostly undocumented. The module is only public so that it can be //! accessed from the rtt_init! macro. use crate::ChannelMode; use core::cmp::min; use core::fmt; use core::ptr; use vcel...
use std::sync::{Arc, Mutex, RwLock}; use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError}; use std::thread; use actors::{ActorPath, ActorRef, Message, Props}; use actors::actor_cell::{ActorCell, SystemMessage}; use actors::cthulhu::Cthulhu; use actors::future::{Future, FutureExtractor}; use actors::name_reso...
// Copyright Cryptape Technologies LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
use super::*; use std::ffi::CStr; #[derive(Debug, Copy, Clone)] pub struct Local<T> { local_: V8::Local<T>, } impl<T> Local<T> { pub fn from(local_: V8::Local<T>) -> Local<T> { Local { local_ } } pub unsafe fn inner_mut(&mut self) -> &mut T { self.local_.val_.as_mut().unwrap() } }...
//! @* \[5] On-line and off-line printing. //! Messages that are sent to a user's terminal and to the transcript-log file //! are produced by several `|print|' procedures. These procedures will //! direct their output to a variety of places, based on the setting of //! the global variable |selector|, which has the foll...
//! Constants required for the ECC chip. use arrayvec::ArrayVec; use group::{ ff::{Field, PrimeField}, Curve, }; use halo2_proofs::arithmetic::lagrange_interpolate; use pasta_curves::{ arithmetic::{CurveAffine, FieldExt}, pallas, }; /// Window size for fixed-base scalar multiplication pub const FIXED_...
use dpll::solve::*; #[derive(Clone, PartialEq, Eq, Hash)] struct SudokuCell { row_col: u8, val: u8, } impl std::fmt::Debug for SudokuCell { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!( f, "({}{}={})", (self.row_col / 9 + ('a' as u8)) a...
use crate::{ database::preferences::{Preferences, TckBytesWrapper, TCK_SIZE_IN_BYTES}, expect_log, }; use log::*; use std::{io::Cursor, sync::Arc}; use tcn::{ Error, MemoType, ReportAuthorizationKey, SignedReport, TemporaryContactKey, TemporaryContactNumber, }; pub trait TcnKeys { fn create_report(...
use crate::error::{Error, Result}; use super::tlb_cache::TLBCache; use crate::architecture::{ArchitectureObj, ScopedVirtualTranslate}; use crate::iter::{PageChunks, SplitAtIndex}; use crate::mem::cache::{CacheValidator, DefaultCacheValidator}; use crate::mem::virt_translate::VirtualTranslate; use crate::mem::PhysicalM...
use crate::error::{Error, Result}; use combine::{ attempt, between, choice, many, many1, one_of, optional, parser::char::char, sep_by, EasyParser, ParseError, Parser, Stream, }; use regex::{escape as regex_escape, Regex}; /// Characters available in OSC method name. pub const METHOD_CHARS: &str = r#"!"$%&...
//! In-kernel structure for tracking UDP ports bound by capsules. //! //! When kernel capsules wish to send or receive UDP packets, the UDP sending / receiving //! capsules will only allow this if the capsule has bound to the port it wishes to //! send from / receive on. Binding to a port is accompished via calls on th...
use crate::{event::ClientRequest, state::*, utils}; use anyhow::Result; use std::sync::mpsc; use tui::{layout::*, style::*, widgets::*}; type Terminal = tui::Terminal<tui::backend::CrosstermBackend<std::io::Stdout>>; type Frame<'a> = tui::Frame<'a, tui::backend::CrosstermBackend<std::io::Stdout>>; mod help; mod popup...
// Copyright (c) 2020-2021 Via Technology Ltd. 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 requir...
use heck::SnakeCase; use proc_macro2::{Span,TokenStream}; use quote::quote; use syn::*; #[derive(Debug)] struct ParsedCommandEnum { name: Ident, value: String, description: String, } #[derive(Debug)] enum ParsedCommandExtras { None, // No extra fields Choices(Ident...