This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use futures::prelude::*; | |
use pin_utils::unsafe_pinned; | |
use std::ops::Deref; | |
use std::pin::Pin; | |
use std::sync::Arc; | |
/// A container for a single object with lifetime that is bound to that of an `Arc`. | |
/// This is useful for passing around boxed futures that have a lifetime that is limited | |
/// to that of the object that created it. | |
/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Demonstration of compile-time key-value type safety. | |
/// | |
/// This program demonstrates how you use Rust generics to encode type | |
/// information into the keys for a key-value store. This allows for | |
/// type-safe access to data in the store, preventing things like writing | |
/// strings to keys that should only contain integers. Attempting to | |
/// do so results in a compile-time error. | |
/// | |
/// The example code is at the top of this file, the implementation details | |
/// are below the example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Demonstration of a way to do polymorphic property lookup of standardized | |
/// collections of properties via simple traits and getter methods. This | |
/// approach could be extended to do things like fetch a list of the supported | |
/// keys, or expose aritrary traits via a property interface. | |
/// This is the trait that will be our general-purpose property interface. It | |
/// is intended to be used as a trait object. | |
/// | |
/// This trait is implemented automatically by the `impl_super_trait!` macro, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# trace debug-log macro | |
sudo dtrace -qn 'security_debug*:::log { printf("[%s] %s\n", copyinstr(arg0), copyinstr(arg1)); }' | |
# restart securityd | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.securityd.plist && | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.securityd.plist |