pub enum CertificateProfile {
MacInstallerDistribution,
AppleDistribution,
AppleDevelopment,
DeveloperIdApplication,
DeveloperIdInstaller,
}
Expand description
Describes combinations of certificate extensions for Apple code signing certificates.
Code signing certificates contain various X.509 extensions denoting them for code signing.
This type represents various common extensions as used on Apple platforms.
Typically, you’ll want to apply at most one of these extensions to a new certificate in order to mark it as compatible for code signing.
This type essentially encapsulates the logic for handling of different “profiles” attached to the different code signing certificates that Apple issues.
Variants§
MacInstallerDistribution
Mac Installer Distribution.
In Keychain Access.app
, this might render as 3rd Party Mac Developer Installer
.
Certificates are marked for EKU with 3rd Party Developer Installer Package Signing
.
They also have the Apple Mac App Signing (Submission)
extension.
Typically issued by Apple Worldwide Developer Relations Certificate Authority
.
AppleDistribution
Apple Distribution.
Certificates are marked for EKU with Code Signing
. They also have
extensions Apple Mac App Signing (Development)
and
Apple Developer Certificate (Submission)
.
Typically issued by Apple Worldwide Developer Relations Certificate Authority
.
AppleDevelopment
Apple Development.
Certificates are marked for EKU with Code Signing
. They also have
extensions Apple Developer Certificate (Development)
and
Mac Developer
.
Typically issued by Apple Worldwide Developer Relations Certificate Authority
.
DeveloperIdApplication
Developer ID Application.
Certificates are marked for EKU with Code Signing
. They also have
extensions for Developer ID Application
and Developer ID Date
.
DeveloperIdInstaller
Developer ID Installer.
Certificates are marked for EKU with Developer ID Application
. They also
have extensions Developer ID Installer
and Developer ID Date
.
Implementations§
source§impl CertificateProfile
impl CertificateProfile
pub fn all() -> &'static [Self] ⓘ
sourcepub fn str_names() -> [&'static str; 5]
pub fn str_names() -> [&'static str; 5]
Obtain the string values that variants are recognized as.
Examples found in repository?
2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107
pub fn main_impl() -> Result<(), AppleCodesignError> {
let app = Command::new("Cross platform Apple code signing in pure Rust")
.version(env!("CARGO_PKG_VERSION"))
.author("Gregory Szorc <gregory.szorc@gmail.com>")
.about("Sign and notarize Apple programs. See https://gregoryszorc.com/docs/apple-codesign/main/ for more docs.")
.arg_required_else_help(true)
.arg(
Arg::new("verbose")
.long("verbose")
.short('v')
.global(true)
.action(ArgAction::Count)
.help("Increase logging verbosity. Can be specified multiple times."),
);
let app = app.subcommand(add_certificate_source_args(
Command::new("analyze-certificate")
.about("Analyze an X.509 certificate for Apple code signing properties")
.long_about(ANALYZE_CERTIFICATE_ABOUT),
));
let app = app.subcommand(
Command::new("compute-code-hashes")
.about("Compute code hashes for a binary")
.arg(
Arg::new("path")
.action(ArgAction::Set)
.required(true)
.help("path to Mach-O binary to examine"),
)
.arg(
Arg::new("hash")
.long("hash")
.action(ArgAction::Set)
.value_parser(SUPPORTED_HASHES)
.default_value("sha256")
.help("Hashing algorithm to use"),
)
.arg(
Arg::new("page_size")
.long("page-size")
.action(ArgAction::Set)
.default_value("4096")
.help("Chunk size to digest over"),
)
.arg(
Arg::new("universal_index")
.long("universal-index")
.action(ArgAction::Set)
.default_value("0")
.help("Index of Mach-O binary to operate on within a universal/fat binary"),
),
);
let app = app.subcommand(
Command::new("diff-signatures")
.about("Print a diff between the signature content of two paths")
.arg(
Arg::new("path0")
.action(ArgAction::Set)
.required(true)
.help("The first path to compare"),
)
.arg(
Arg::new("path1")
.action(ArgAction::Set)
.required(true)
.help("The second path to compare"),
),
);
let app = app.subcommand(
Command::new("encode-app-store-connect-api-key")
.about("Encode App Store Connect API Key metadata to a single file")
.long_about(ENCODE_APP_STORE_CONNECT_API_KEY_ABOUT)
.arg(
Arg::new("output_path")
.short('o')
.long("output-path")
.action(ArgAction::Set)
.value_parser(value_parser!(PathBuf))
.help("Path to a JSON file to create the output to"),
)
.arg(
Arg::new("issuer_id")
.action(ArgAction::Set)
.required(true)
.help("The issuer of the API Token. Likely a UUID"),
)
.arg(
Arg::new("key_id")
.action(ArgAction::Set)
.required(true)
.help("The Key ID. A short alphanumeric string like DEADBEEF42"),
)
.arg(
Arg::new("private_key_path")
.action(ArgAction::Set)
.required(true)
.value_parser(value_parser!(PathBuf))
.help("Path to a file containing the private key downloaded from Apple"),
),
);
let app = app.subcommand(
Command::new("extract")
.about("Extracts code signature data from a Mach-O binary")
.long_about(EXTRACT_ABOUT)
.arg(
Arg::new("path")
.action(ArgAction::Set)
.required(true)
.help("Path to Mach-O binary to examine"),
)
.arg(
Arg::new("data")
.long("data")
.action(ArgAction::Set)
.value_parser([
"blobs",
"cms-info",
"cms-pem",
"cms-raw",
"cms",
"code-directory-raw",
"code-directory-serialized-raw",
"code-directory-serialized",
"code-directory",
"linkedit-info",
"linkedit-segment-raw",
"macho-load-commands",
"macho-segments",
"macho-target",
"requirements-raw",
"requirements-rust",
"requirements-serialized-raw",
"requirements-serialized",
"requirements",
"signature-raw",
"superblob",
])
.default_value("linkedit-info")
.help("Which data to extract and how to format it"),
)
.arg(
Arg::new("universal_index")
.long("universal-index")
.action(ArgAction::Set)
.default_value("0")
.help("Index of Mach-O binary to operate on within a universal/fat binary"),
),
);
let app = app.subcommand(
add_certificate_source_args(Command::new("generate-certificate-signing-request")
.about("Generates a certificate signing request that can be sent to Apple and exchanged for a signing certificate")
.arg(
Arg::new("csr_pem_path")
.long("csr-pem-path")
.action(ArgAction::Set)
.help("Path to file to write PEM encoded CSR to")
)
));
let app = app.subcommand(
Command::new("generate-self-signed-certificate")
.about("Generate a self-signed certificate for code signing")
.long_about(GENERATE_SELF_SIGNED_CERTIFICATE_ABOUT)
.arg(
Arg::new("algorithm")
.long("algorithm")
.action(ArgAction::Set)
.value_parser(["ecdsa", "ed25519"])
.default_value("ecdsa")
.help("Which key type to use"),
)
.arg(
Arg::new("profile")
.long("profile")
.action(ArgAction::Set)
.value_parser(CertificateProfile::str_names())
.default_value("apple-development"),
)
.arg(
Arg::new("team_id")
.long("team-id")
.action(ArgAction::Set)
.default_value("unset")
.help(
"Team ID (this is a short string attached to your Apple Developer account)",
),
)
.arg(
Arg::new("person_name")
.long("person-name")
.action(ArgAction::Set)
.required(true)
.help("The name of the person this certificate is for"),
)
.arg(
Arg::new("country_name")
.long("country-name")
.action(ArgAction::Set)
.default_value("XX")
.help("Country Name (C) value for certificate identifier"),
)
.arg(
Arg::new("validity_days")
.long("validity-days")
.action(ArgAction::Set)
.default_value("365")
.help("How many days the certificate should be valid for"),
)
.arg(
Arg::new("pem_filename")
.long("pem-filename")
.action(ArgAction::Set)
.help("Base name of files to write PEM encoded certificate to"),
),
);
let app = app.
subcommand(Command::new("keychain-export-certificate-chain")
.about("Export Apple CA certificates from the macOS Keychain")
.arg(
Arg::new("domain")
.long("domain")
.action(ArgAction::Set)
.value_parser(["user", "system", "common", "dynamic"])
.default_value("user")
.help("Keychain domain to operate on")
)
.arg(
Arg::new("password")
.long("--password")
.action(ArgAction::Set)
.help("Password to unlock the Keychain")
)
.arg(
Arg::new("password_file")
.long("--password-file")
.action(ArgAction::Set)
.conflicts_with("password")
.help("File containing password to use to unlock the Keychain")
)
.arg(
Arg::new("no_print_self")
.long("--no-print-self")
.action(ArgAction::SetTrue)
.help("Print only the issuing certificate chain, not the subject certificate")
)
.arg(
Arg::new("user_id")
.long("--user-id")
.action(ArgAction::Set)
.required(true)
.help("User ID value of code signing certificate to find and whose CA chain to export")
),
);
let app = app.subcommand(
Command::new("keychain-print-certificates")
.about("Print information about certificates in the macOS keychain")
.arg(
Arg::new("domain")
.long("--domain")
.action(ArgAction::Set)
.value_parser(["user", "system", "common", "dynamic"])
.default_value("user")
.help("Keychain domain to operate on"),
),
);
let app = app.subcommand(add_notary_api_args(
Command::new("notary-log")
.about("Fetch the notarization log for a previous submission")
.arg(
Arg::new("submission_id")
.action(ArgAction::Set)
.required(true)
.help("The ID of the previous submission to wait on"),
),
));
let app = app.subcommand(add_notary_api_args(
Command::new("notary-submit")
.about("Upload an asset to Apple for notarization and possibly staple it")
.long_about(NOTARIZE_ABOUT)
.alias("notarize")
.arg(
Arg::new("wait")
.long("wait")
.action(ArgAction::SetTrue)
.help("Whether to wait for upload processing to complete"),
)
.arg(
Arg::new("max_wait_seconds")
.long("max-wait-seconds")
.action(ArgAction::Set)
.default_value("600")
.help("Maximum time in seconds to wait for the upload result"),
)
.arg(
Arg::new("staple")
.long("staple")
.action(ArgAction::SetTrue)
.help(
"Staple the notarization ticket after successful upload (implies --wait)",
),
)
.arg(
Arg::new("path")
.action(ArgAction::Set)
.required(true)
.help("Path to asset to upload"),
),
));
let app = app.subcommand(add_notary_api_args(
Command::new("notary-wait")
.about("Wait for completion of a previous submission")
.arg(
Arg::new("max_wait_seconds")
.long("max-wait-seconds")
.action(ArgAction::Set)
.default_value("600")
.help("Maximum time in seconds to wait for the upload result"),
)
.arg(
Arg::new("submission_id")
.action(ArgAction::Set)
.required(true)
.help("The ID of the previous submission to wait on"),
),
));
let app = app.subcommand(
Command::new("parse-code-signing-requirement")
.about("Parse binary Code Signing Requirement data into a human readable string")
.long_about(PARSE_CODE_SIGNING_REQUIREMENT_ABOUT)
.arg(
Arg::new("format")
.long("--format")
.action(ArgAction::Set)
.required(true)
.value_parser(["csrl", "expression-tree"])
.default_value("csrl")
.help("Output format"),
)
.arg(
Arg::new("input_path")
.action(ArgAction::Set)
.required(true)
.help("Path to file to parse"),
),
);
let app = app.subcommand(
Command::new("print-signature-info")
.about("Print signature information for a filesystem path")
.arg(
Arg::new("path")
.action(ArgAction::Set)
.required(true)
.help("Filesystem path to entity whose info to print"),
),
);
let app = app.subcommand(
Command::new("smartcard-scan")
.about("Show information about available smartcard (SC) devices"),
);
let app = app.subcommand(add_yubikey_policy_args(
Command::new("smartcard-generate-key")
.about("Generate a new private key on a smartcard")
.arg(
Arg::new("smartcard_slot")
.long("smartcard-slot")
.action(ArgAction::Set)
.required(true)
.help("Smartcard slot number to store key in (9c is common)"),
),
));
let app = app.subcommand(add_yubikey_policy_args(add_certificate_source_args(
Command::new("smartcard-import")
.about("Import a code signing certificate and key into a smartcard")
.arg(
Arg::new("existing_key")
.long("existing-key")
.action(ArgAction::SetTrue)
.help("Re-use the existing private key in the smartcard slot"),
)
.arg(
Arg::new("dry_run")
.long("dry-run")
.action(ArgAction::SetTrue)
.help("Don't actually perform the import"),
),
)));
let app = app.subcommand(add_certificate_source_args(
Command::new("remote-sign")
.about("Create signatures initiated from a remote signing operation")
.arg(
Arg::new("session_join_string_editor")
.long("editor")
.action(ArgAction::SetTrue)
.help("Open an editor to input the session join string"),
)
.arg(
Arg::new("session_join_string_path")
.long("sjs-path")
.action(ArgAction::Set)
.help("Path to file containing session join string"),
)
.arg(
Arg::new("session_join_string")
.action(ArgAction::Set)
.help("Session join string (provided by the signing initiator)"),
)
.group(
ArgGroup::new("session_join_string_source")
.arg("session_join_string_editor")
.arg("session_join_string_path")
.arg("session_join_string")
.required(true),
),
));
let app = app
.subcommand(
add_certificate_source_args(Command::new("sign")
.about("Sign a Mach-O binary or bundle")
.long_about(SIGN_ABOUT)
.arg(
Arg::new("binary_identifier")
.long("binary-identifier")
.action(ArgAction::Append)
.help("Identifier string for binary. The value normally used by CFBundleIdentifier")
)
.arg(
Arg::new("code_requirements_path")
.long("code-requirements-path")
.action(ArgAction::Append)
.help("Path to a file containing binary code requirements data to be used as designated requirements")
)
.arg(
Arg::new("code_resources")
.long("code-resources-path")
.action(ArgAction::Append)
.help("Path to an XML plist file containing code resources"),
)
.arg(
Arg::new("code_signature_flags_set")
.long("code-signature-flags")
.action(ArgAction::Append)
.value_parser(CodeSignatureFlags::all_user_configurable())
.help("Code signature flags to set")
)
.arg(
Arg::new("digest")
.long("digest")
.action(ArgAction::Set)
.value_parser(SUPPORTED_HASHES)
.default_value("sha256")
.help("Digest algorithm to use")
)
.arg(Arg::new("extra_digest")
.long("extra-digest")
.action(ArgAction::Append)
.value_parser(SUPPORTED_HASHES)
.help("Extra digests to include in signatures")
)
.arg(
Arg::new("entitlements_xml_path")
.long("entitlements-xml-path")
.short('e')
.action(ArgAction::Append)
.help("Path to a plist file containing entitlements"),
)
.arg(
Arg::new("runtime_version")
.long("runtime-version")
.action(ArgAction::Append)
.help("Hardened runtime version to use (defaults to SDK version used to build binary)"))
.arg(
Arg::new("info_plist_path")
.long("info-plist-path")
.action(ArgAction::Append)
.help("Path to an Info.plist file whose digest to include in Mach-O signature")
)
.arg(
Arg::new(
"team_name")
.long("team-name")
.action(ArgAction::Set)
.help("Team name/identifier to include in code signature"
)
)
.arg(
Arg::new("timestamp_url")
.long("timestamp-url")
.action(ArgAction::Set)
.default_value(APPLE_TIMESTAMP_URL)
.help(
"URL of timestamp server to use to obtain a token of the CMS signature",
),
)
.arg(
Arg::new("exclude")
.long("exclude")
.action(ArgAction::Append)
.help("Glob expression of paths to exclude from signing")
)
.arg(
Arg::new("smartcard_pin_env")
.long("smartcard-pin-env")
.conflicts_with_all(remote_initialization_args(Some(
"smartcard_pin_env",
)))
.action(ArgAction::Set)
.help("Environment variable holding the smartcard PIN"),
)
.arg(
Arg::new("input_path")
.action(ArgAction::Set)
.required(true)
.help("Path to Mach-O binary to sign"),
)
.arg(
Arg::new("output_path")
.action(ArgAction::Set)
.help("Path to signed Mach-O binary to write"),
),
));
let app = app.subcommand(
Command::new("staple")
.about("Staples a notarization ticket to an entity")
.arg(
Arg::new("path")
.action(ArgAction::Set)
.required(true)
.help("Path to entity to attempt to staple"),
),
);
let app = app.subcommand(
Command::new("verify")
.about("Verifies code signature data")
.arg(
Arg::new("path")
.action(ArgAction::Set)
.required(true)
.help("Path of Mach-O binary to examine"),
),
);
let app = app.subcommand(
Command::new("x509-oids")
.about("Print information about X.509 OIDs related to Apple code signing"),
);
let matches = app.get_matches();
// TODO make default log level warn once we audit logging sites.
let log_level = match matches.get_count("verbose") {
0 => LevelFilter::Info,
1 => LevelFilter::Debug,
_ => LevelFilter::Trace,
};
let mut builder = env_logger::Builder::from_env(
env_logger::Env::default().default_filter_or(log_level.as_str()),
);
// Disable log context except at higher log levels.
if log_level <= LevelFilter::Info {
builder
.format_timestamp(None)
.format_level(false)
.format_target(false);
}
// This spews unwanted output at default level. Nerf it by default.
if log_level == LevelFilter::Info {
builder.filter_module("rustls", LevelFilter::Error);
}
builder.init();
match matches.subcommand() {
Some(("analyze-certificate", args)) => command_analyze_certificate(args),
Some(("compute-code-hashes", args)) => command_compute_code_hashes(args),
Some(("diff-signatures", args)) => command_diff_signatures(args),
Some(("encode-app-store-connect-api-key", args)) => {
command_encode_app_store_connect_api_key(args)
}
Some(("extract", args)) => command_extract(args),
Some(("generate-certificate-signing-request", args)) => {
command_generate_certificate_signing_request(args)
}
Some(("generate-self-signed-certificate", args)) => {
command_generate_self_signed_certificate(args)
}
Some(("keychain-export-certificate-chain", args)) => {
command_keychain_export_certificate_chain(args)
}
Some(("keychain-print-certificates", args)) => command_keychain_print_certificates(args),
Some(("notary-log", args)) => command_notary_log(args),
Some(("notary-submit", args)) => command_notary_submit(args),
Some(("notary-wait", args)) => command_notary_wait(args),
Some(("parse-code-signing-requirement", args)) => {
command_parse_code_signing_requirement(args)
}
Some(("print-signature-info", args)) => command_print_signature_info(args),
Some(("remote-sign", args)) => command_remote_sign(args),
Some(("sign", args)) => command_sign(args),
Some(("smartcard-generate-key", args)) => command_smartcard_generate_key(args),
Some(("smartcard-import", args)) => command_smartcard_import(args),
Some(("smartcard-scan", args)) => command_smartcard_scan(args),
Some(("staple", args)) => command_staple(args),
Some(("verify", args)) => command_verify(args),
Some(("x509-oids", args)) => command_x509_oids(args),
_ => Err(AppleCodesignError::CliUnknownCommand),
}
}
Trait Implementations§
source§impl Clone for CertificateProfile
impl Clone for CertificateProfile
source§fn clone(&self) -> CertificateProfile
fn clone(&self) -> CertificateProfile
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CertificateProfile
impl Debug for CertificateProfile
source§impl Display for CertificateProfile
impl Display for CertificateProfile
source§impl FromStr for CertificateProfile
impl FromStr for CertificateProfile
source§impl PartialEq<CertificateProfile> for CertificateProfile
impl PartialEq<CertificateProfile> for CertificateProfile
source§fn eq(&self, other: &CertificateProfile) -> bool
fn eq(&self, other: &CertificateProfile) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for CertificateProfile
impl Eq for CertificateProfile
impl StructuralEq for CertificateProfile
impl StructuralPartialEq for CertificateProfile
Auto Trait Implementations§
impl RefUnwindSafe for CertificateProfile
impl Send for CertificateProfile
impl Sync for CertificateProfile
impl Unpin for CertificateProfile
impl UnwindSafe for CertificateProfile
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> Conv for T
impl<T> Conv for T
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
self
, then passes self.as_mut()
into the pipe
function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.