Skip to main content

WasiWebcryptoCtxView

Struct WasiWebcryptoCtxView 

Source
pub struct WasiWebcryptoCtxView<'a> {
    pub ctx: &'a mut WasiWebcryptoCtx,
    pub table: &'a mut ResourceTable,
}
Expand description

A borrowed view into a host’s WasiWebcryptoCtx and its [ResourceTable].

Returned by WasiWebcryptoView::webcrypto, this is the [HasData::Data] the generated host bindings operate on.

Fields§

§ctx: &'a mut WasiWebcryptoCtx

Mutable reference to the WebCrypto host context.

§table: &'a mut ResourceTable

Mutable reference to the table used to manage host resources.

Trait Implementations§

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

fn make_digest( &mut self, variant: Sha2Variant, ) -> Result<Result<Resource<Digest>, Error>>

A digest bound to the declared SHA-2 variant. Fails with error.unsupported if this implementation does not serve the variant.
Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

fn make_rejecting_digest(&mut self) -> Result<Result<Resource<Digest>, Error>>

Mint a SHA-1 digest that rejects on a detected collision attack: compute fails with error.extension — origin "polymorph:webcrypto", name "collision-detected" — for input carrying an attack pattern, and returns the standard SHA-1 digest for everything else. Choose this posture to surface an attack as a diagnosable error.
Source§

fn make_mitigating_digest(&mut self) -> Result<Result<Resource<Digest>, Error>>

Mint a SHA-1 digest that mitigates a detected collision attack: for input carrying an attack pattern, compute returns the sha1dc safe hash — a deterministic hardened variant the attack was not engineered against — and the standard SHA-1 digest for everything else. Two parties hashing the same attacked input agree on its safe hash, so pipelines keep flowing while the colliding pair no longer collides. Choose this posture for content addressing, where an error would wedge the pipeline; the cost is that an attack surfaces as an external hash mismatch rather than a named error.
Source§

impl HostAeadKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<AeadKey>) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "AES-GCM" (WebCrypto’s KeyAlgorithm.name). Parameters are separate getters, as for mac-key.algorithm-name.
Source§

fn algorithm_length(&mut self, self_: Resource<AeadKey>) -> Result<u32>

The key length in bits, e.g. 256 for AES-256-GCM (WebCrypto’s AesKeyAlgorithm.length).
Source§

fn nonce_size(&mut self, self_: Resource<AeadKey>) -> Result<u32>

The algorithm’s standard nonce size in bytes, e.g. 12 for AES-GCM. This key’s seal/open always accept it, so a component granted only the key handle can construct nonces without matching on algorithm-name. Whether other lengths are accepted is the algorithm’s contract, documented by its minting interface.
Source§

fn tag_size(&mut self, self_: Resource<AeadKey>) -> Result<u32>

The algorithm’s default tag size in bytes, e.g. 16: what a tag-size of none selects, and the framing arithmetic for default-tag messages (sealed length = plaintext length + tag-size).
Source§

fn extractable(&mut self, self_: Resource<AeadKey>) -> Result<bool>

Whether the key material may be exported.
Source§

fn can_seal(&mut self, self_: Resource<AeadKey>) -> Result<bool>

Whether this key permits seal. A refused operation fails error.not-permitted.
Source§

fn can_open(&mut self, self_: Resource<AeadKey>) -> Result<bool>

Whether this key permits open. See can-seal.
Source§

fn can_wrap(&mut self, self_: Resource<AeadKey>) -> Result<bool>

Whether this key permits wrap. A refused operation fails error.not-permitted.
Source§

fn can_unwrap(&mut self, self_: Resource<AeadKey>) -> Result<bool>

Whether this key permits unwrap. See can-wrap.
Source§

impl HostAeadKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<AeadKeyOptions>>

Source§

fn can_seal( &mut self, self_: Resource<AeadKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may seal. Disabled by default.
Source§

fn can_open( &mut self, self_: Resource<AeadKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may open. Disabled by default.
Source§

fn can_wrap( &mut self, self_: Resource<AeadKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may wrap key material. Disabled by default.
Source§

fn can_unwrap( &mut self, self_: Resource<AeadKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may unwrap key material (see can-wrap). Disabled by default.
Source§

fn extractable( &mut self, self_: Resource<AeadKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported. Disabled by default.
Source§

impl HostAgreementKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<AgreementKeyOptions>>

Source§

fn can_derive_bits( &mut self, self_: Resource<AgreementKeyOptions>, allowed: bool, ) -> Result<()>

Whether inputs agreed by the minted key may yield raw bits. Disabled by default.
Source§

fn can_derive_key( &mut self, self_: Resource<AgreementKeyOptions>, allowed: bool, ) -> Result<()>

Whether inputs agreed by the minted key may mint keys. Disabled by default.
Source§

fn extractable( &mut self, self_: Resource<AgreementKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported (secret-key.export-key-jwk/-pkcs8). Disabled by default.
Source§

impl HostCipherKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<CipherKey>) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "AES-CBC" (WebCrypto’s KeyAlgorithm.name). Parameters are separate getters, as for mac-key.algorithm-name.
Source§

fn algorithm_length(&mut self, self_: Resource<CipherKey>) -> Result<u32>

The key length in bits, e.g. 256 (WebCrypto’s AesKeyAlgorithm.length).
Source§

fn iv_size(&mut self, self_: Resource<CipherKey>) -> Result<u32>

The algorithm’s IV size in bytes, e.g. 16 for the AES modes (the CBC IV, or the CTR initial counter block). encrypt and decrypt accept exactly this length.
Source§

fn extractable(&mut self, self_: Resource<CipherKey>) -> Result<bool>

Whether the key material may be exported.
Source§

fn can_encrypt(&mut self, self_: Resource<CipherKey>) -> Result<bool>

Whether this key permits encrypt. A refused operation fails error.not-permitted.
Source§

fn can_decrypt(&mut self, self_: Resource<CipherKey>) -> Result<bool>

Whether this key permits decrypt. See can-encrypt.
Source§

fn can_wrap(&mut self, self_: Resource<CipherKey>) -> Result<bool>

Whether this key permits wrap. A refused operation fails error.not-permitted.
Source§

fn can_unwrap(&mut self, self_: Resource<CipherKey>) -> Result<bool>

Whether this key permits unwrap. See can-wrap.
Source§

impl HostCipherKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<CipherKeyOptions>>

Source§

fn can_encrypt( &mut self, self_: Resource<CipherKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may encrypt. Disabled by default.
Source§

fn can_decrypt( &mut self, self_: Resource<CipherKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may decrypt. Disabled by default.
Source§

fn can_wrap( &mut self, self_: Resource<CipherKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may wrap key material. Disabled by default.
Source§

fn can_unwrap( &mut self, self_: Resource<CipherKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may unwrap key material (see can-wrap). Disabled by default.
Source§

fn extractable( &mut self, self_: Resource<CipherKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported. Disabled by default.
Source§

impl HostDecryptionKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<DecryptionKey>) -> Result<String>

See encryption-key.algorithm-name.
Source§

fn algorithm_hash( &mut self, self_: Resource<DecryptionKey>, ) -> Result<Option<String>>

See encryption-key.algorithm-hash.
Source§

fn algorithm_length( &mut self, self_: Resource<DecryptionKey>, ) -> Result<Option<u32>>

See encryption-key.algorithm-length.
Source§

fn algorithm_public_exponent( &mut self, self_: Resource<DecryptionKey>, ) -> Result<Option<Vec<u8>>>

See encryption-key.algorithm-public-exponent.
Source§

fn can_decrypt(&mut self, self_: Resource<DecryptionKey>) -> Result<bool>

Whether this key may decrypt. See decryption-key-options.can-decrypt.
Source§

fn can_unwrap(&mut self, self_: Resource<DecryptionKey>) -> Result<bool>

Whether this key may unwrap. See decryption-key-options.can-unwrap.
Source§

fn extractable(&mut self, self_: Resource<DecryptionKey>) -> Result<bool>

Whether the export functions may return this key’s material. See decryption-key-options.extractable.
Source§

impl HostDecryptionKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<DecryptionKeyOptions>>

Source§

fn can_decrypt( &mut self, self_: Resource<DecryptionKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may decrypt. Disabled by default.
Source§

fn can_unwrap( &mut self, self_: Resource<DecryptionKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may unwrap. Disabled by default.
Source§

fn extractable( &mut self, self_: Resource<DecryptionKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported (decryption-key.export-key-jwk/-pkcs8 and the to-wrap-input-* functions). Disabled by default.
Source§

impl HostDeriveInput for WasiWebcryptoCtxView<'_>

Source§

fn can_derive_bits(&mut self, self_: Resource<DeriveInput>) -> Result<bool>

Whether derive-bits (and minting extractable keys) is permitted. See derive-options.can-derive-bits.
Source§

fn can_derive_key(&mut self, self_: Resource<DeriveInput>) -> Result<bool>

Whether the target interfaces’ derive-key is permitted. See derive-options.can-derive-key.
Source§

impl HostDeriveOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<DeriveOptions>>

Source§

fn can_derive_bits( &mut self, self_: Resource<DeriveOptions>, allowed: bool, ) -> Result<()>

Whether inputs built on this base secret may yield raw bits through derive-input.derive-bits, and — because an extractable key is bits disclosure by other means — whether they may mint extractable keys. Disabled by default.
Source§

fn can_derive_key( &mut self, self_: Resource<DeriveOptions>, allowed: bool, ) -> Result<()>

Whether inputs built on this base secret may mint keys through the target interfaces’ derive-key. Disabled by default.
Source§

impl HostDigest for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<Digest>) -> Result<String>

The registry name of the algorithm this resource is bound to, e.g. "SHA-256" (as crypto.subtle.digest spells it). For a digest the algorithm is the hash, so there is no separate algorithm-hash getter.
Source§

impl HostEncryptionKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<EncryptionKey>) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "RSA-OAEP" (WebCrypto’s KeyAlgorithm.name).
Source§

fn algorithm_hash( &mut self, self_: Resource<EncryptionKey>, ) -> Result<Option<String>>

The digest bound at mint, e.g. "SHA-256".
Source§

fn algorithm_length( &mut self, self_: Resource<EncryptionKey>, ) -> Result<Option<u32>>

The key’s length in bits for algorithms parameterized by one (the RSA modulus length).
Source§

fn algorithm_public_exponent( &mut self, self_: Resource<EncryptionKey>, ) -> Result<Option<Vec<u8>>>

The public exponent for RSA-family keys, as WebCrypto’s RsaKeyAlgorithm.publicExponent denominates it: the exponent’s big-endian bytes ([1, 0, 1] for 65537). none for algorithms without one.
Source§

impl HostIkm for WasiWebcryptoCtxView<'_>

Source§

fn can_derive_bits(&mut self, self_: Resource<Ikm>) -> Result<bool>

Whether inputs prepared from this material may yield raw bits.
Source§

fn can_derive_key(&mut self, self_: Resource<Ikm>) -> Result<bool>

Whether inputs prepared from this material may mint keys.
Source§

impl HostKwKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<KwKey>) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "AES-KW" (WebCrypto’s KeyAlgorithm.name). Parameters are separate getters, as for mac-key.algorithm-name.
Source§

fn algorithm_length(&mut self, self_: Resource<KwKey>) -> Result<u32>

The key length in bits, e.g. 256 (WebCrypto’s AesKeyAlgorithm.length).
Source§

fn extractable(&mut self, self_: Resource<KwKey>) -> Result<bool>

Whether the key material may be exported.
Source§

fn can_wrap(&mut self, self_: Resource<KwKey>) -> Result<bool>

Whether this key permits wrap. A refused operation fails error.not-permitted.
Source§

fn can_unwrap(&mut self, self_: Resource<KwKey>) -> Result<bool>

Whether this key permits unwrap. See can-wrap.
Source§

impl HostKwKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<KwKeyOptions>>

Source§

fn can_wrap( &mut self, self_: Resource<KwKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may wrap. Disabled by default.
Source§

fn can_unwrap( &mut self, self_: Resource<KwKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may unwrap. Disabled by default.
Source§

fn extractable( &mut self, self_: Resource<KwKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported. Disabled by default.
Source§

impl HostMacKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<MacKey>) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "HMAC" (WebCrypto’s KeyAlgorithm.name). The algorithm’s parameters are separate getters (algorithm-hash, algorithm-length), so future parameters are new getters rather than changes to a shared type.
Source§

fn algorithm_hash(&mut self, self_: Resource<MacKey>) -> Result<Option<String>>

The registry name of the digest this key’s algorithm is parameterized over, if any: e.g. "SHA-256" for HMAC-SHA-256 (WebCrypto’s HmacKeyAlgorithm.hash). none for MAC algorithms not built on a digest.
Source§

fn algorithm_length(&mut self, self_: Resource<MacKey>) -> Result<u32>

The key length in bits (WebCrypto’s HmacKeyAlgorithm.length).
Source§

fn extractable(&mut self, self_: Resource<MacKey>) -> Result<bool>

Whether the key material may be exported.
Source§

fn can_sign(&mut self, self_: Resource<MacKey>) -> Result<bool>

Whether this key permits sign. A refused operation fails error.not-permitted.
Source§

fn can_verify(&mut self, self_: Resource<MacKey>) -> Result<bool>

Whether this key permits verify. See can-sign.
Source§

impl HostMacKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<MacKeyOptions>>

Source§

fn can_sign( &mut self, self_: Resource<MacKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may sign. Disabled by default.
Source§

fn can_verify( &mut self, self_: Resource<MacKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may verify. Disabled by default.
Source§

fn extractable( &mut self, self_: Resource<MacKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported. Disabled by default.
Source§

impl HostPassword for WasiWebcryptoCtxView<'_>

Source§

fn can_derive_bits(&mut self, self_: Resource<Password>) -> Result<bool>

Whether inputs prepared from this password may yield raw bits.
Source§

fn can_derive_key(&mut self, self_: Resource<Password>) -> Result<bool>

Whether inputs prepared from this password may mint keys.
Source§

impl HostPublicKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name( &mut self, self_: Resource<AgreementPublicKey>, ) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "X25519" (the Web Cryptography API’s KeyAlgorithm.name).
Source§

impl HostSecretKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name( &mut self, self_: Resource<AgreementSecretKey>, ) -> Result<String>

See public-key.algorithm-name.
Source§

fn can_derive_bits( &mut self, self_: Resource<AgreementSecretKey>, ) -> Result<bool>

Whether inputs agreed by this key may yield raw bits. See agreement-key-options.can-derive-bits.
Source§

fn can_derive_key( &mut self, self_: Resource<AgreementSecretKey>, ) -> Result<bool>

Whether inputs agreed by this key may mint keys. See agreement-key-options.can-derive-key.
Source§

fn extractable(&mut self, self_: Resource<AgreementSecretKey>) -> Result<bool>

Whether the export functions may return this key’s material. See agreement-key-options.extractable.
Source§

impl HostSigningKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<SigningKey>) -> Result<String>

See verifying-key.algorithm-name.
Source§

fn algorithm_curve( &mut self, self_: Resource<SigningKey>, ) -> Result<Option<String>>

See verifying-key.algorithm-curve.
Source§

fn algorithm_hash( &mut self, self_: Resource<SigningKey>, ) -> Result<Option<String>>

See verifying-key.algorithm-hash.
Source§

fn algorithm_length( &mut self, self_: Resource<SigningKey>, ) -> Result<Option<u32>>

See verifying-key.algorithm-length.
Source§

fn algorithm_public_exponent( &mut self, self_: Resource<SigningKey>, ) -> Result<Option<Vec<u8>>>

See verifying-key.algorithm-public-exponent.
Source§

fn extractable(&mut self, self_: Resource<SigningKey>) -> Result<bool>

Whether the export functions may return this key’s material. Mint-time recorded policy, which platform-backed key storage also honors.
Source§

fn can_sign(&mut self, self_: Resource<SigningKey>) -> Result<bool>

Whether this key permits sign. A refused operation fails error.not-permitted.
Source§

impl HostSigningKeyOptions for WasiWebcryptoCtxView<'_>

Source§

fn new(&mut self) -> Result<Resource<SigningKeyOptions>>

Source§

fn can_sign( &mut self, self_: Resource<SigningKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key may sign. Disabled by default, and it is the sole usage, so it must be enabled for the mint to succeed (an untouched options resource fails error.not-permitted).
Source§

fn extractable( &mut self, self_: Resource<SigningKeyOptions>, allowed: bool, ) -> Result<()>

Whether the minted key’s material may be exported (signing-key.export-key-jwk/-pkcs8 and the to-wrap-input-* functions). Disabled by default.
Source§

impl HostVerifyingKey for WasiWebcryptoCtxView<'_>

Source§

fn algorithm_name(&mut self, self_: Resource<VerifyingKey>) -> Result<String>

The registry name of the algorithm family this key is bound to, e.g. "Ed25519" or "ECDSA" (WebCrypto’s KeyAlgorithm.name).
Source§

fn algorithm_curve( &mut self, self_: Resource<VerifyingKey>, ) -> Result<Option<String>>

The registry name of the curve for algorithms parameterized by one, e.g. "P-256" (WebCrypto’s EcKeyAlgorithm.namedCurve). none for Ed25519, whose curve is implied by the name.
Source§

fn algorithm_hash( &mut self, self_: Resource<VerifyingKey>, ) -> Result<Option<String>>

The digest bound at mint, e.g. "SHA-256". none for Ed25519: RFC 8032 fixes SHA-512 internally, so it is not a parameter.
Source§

fn algorithm_length( &mut self, self_: Resource<VerifyingKey>, ) -> Result<Option<u32>>

The key’s length in bits for algorithms parameterized by one — the RSA modulus length (WebCrypto’s RsaKeyAlgorithm.modulusLength). none for Ed25519 and ECDSA, whose key size is fixed by the algorithm or curve.
Source§

fn algorithm_public_exponent( &mut self, self_: Resource<VerifyingKey>, ) -> Result<Option<Vec<u8>>>

The public exponent for RSA-family keys, as WebCrypto’s RsaKeyAlgorithm.publicExponent denominates it: the exponent’s big-endian bytes ([1, 0, 1] for 65537). none for algorithms without one (Ed25519, ECDSA).
Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl Host for WasiWebcryptoCtxView<'_>

Source§

impl HostUnwrapInput for WasiWebcryptoCtxView<'_>

Source§

impl HostWrapInput for WasiWebcryptoCtxView<'_>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,