pub enum Instruction {
Show 54 variants Add(Add), Sub(Sub), Mul(Mul), UDiv(UDiv), SDiv(SDiv), URem(URem), SRem(SRem), And(And), Or(Or), Xor(Xor), Shl(Shl), LShr(LShr), AShr(AShr), FAdd(FAdd), FSub(FSub), FMul(FMul), FDiv(FDiv), FRem(FRem), FNeg(FNeg), ExtractElement(ExtractElement), InsertElement(InsertElement), ShuffleVector(ShuffleVector), ExtractValue(ExtractValue), InsertValue(InsertValue), Alloca(Alloca), Load(Load), Store(Store), Fence(Fence), CmpXchg(CmpXchg), AtomicRMW(AtomicRMW), GetElementPtr(GetElementPtr), Trunc(Trunc), ZExt(ZExt), SExt(SExt), FPTrunc(FPTrunc), FPExt(FPExt), FPToUI(FPToUI), FPToSI(FPToSI), UIToFP(UIToFP), SIToFP(SIToFP), PtrToInt(PtrToInt), IntToPtr(IntToPtr), BitCast(BitCast), AddrSpaceCast(AddrSpaceCast), ICmp(ICmp), FCmp(FCmp), Phi(Phi), Select(Select), Freeze(Freeze), Call(Call), VAArg(VAArg), LandingPad(LandingPad), CatchPad(CatchPad), CleanupPad(CleanupPad),
}
Expand description

Non-terminator instructions.

Variants§

§

Add(Add)

§

Sub(Sub)

§

Mul(Mul)

§

UDiv(UDiv)

§

SDiv(SDiv)

§

URem(URem)

§

SRem(SRem)

§

And(And)

§

Or(Or)

§

Xor(Xor)

§

Shl(Shl)

§

LShr(LShr)

§

AShr(AShr)

§

FAdd(FAdd)

§

FSub(FSub)

§

FMul(FMul)

§

FDiv(FDiv)

§

FRem(FRem)

§

FNeg(FNeg)

§

ExtractElement(ExtractElement)

§

InsertElement(InsertElement)

§

ShuffleVector(ShuffleVector)

§

ExtractValue(ExtractValue)

§

InsertValue(InsertValue)

§

Alloca(Alloca)

§

Load(Load)

§

Store(Store)

§

Fence(Fence)

§

CmpXchg(CmpXchg)

§

AtomicRMW(AtomicRMW)

§

GetElementPtr(GetElementPtr)

§

Trunc(Trunc)

§

ZExt(ZExt)

§

SExt(SExt)

§

FPTrunc(FPTrunc)

§

FPExt(FPExt)

§

FPToUI(FPToUI)

§

FPToSI(FPToSI)

§

UIToFP(UIToFP)

§

SIToFP(SIToFP)

§

PtrToInt(PtrToInt)

§

IntToPtr(IntToPtr)

§

BitCast(BitCast)

§

AddrSpaceCast(AddrSpaceCast)

§

ICmp(ICmp)

§

FCmp(FCmp)

§

Phi(Phi)

§

Select(Select)

§

Freeze(Freeze)

§

Call(Call)

§

VAArg(VAArg)

§

LandingPad(LandingPad)

§

CatchPad(CatchPad)

§

CleanupPad(CleanupPad)

Implementations§

source§

impl Instruction

source

pub fn try_get_result(&self) -> Option<&Name>

Get the result (destination) of the Instruction, or None if the Instruction doesn’t have a result (has void type).

source

pub fn is_atomic(&self) -> bool

Whether the Instruction is atomic

source§

impl Instruction

source

pub fn is_binary_op(&self) -> bool

Determine if the Instruction is one of the ones in groups::BinaryOp, without actually using try_into() (which would consume it)

source

pub fn is_unary_op(&self) -> bool

Determine if the Instruction is one of the ones in groups::UnaryOp, without actually using try_into() (which would consume it)

Trait Implementations§

source§

impl Clone for Instruction

source§

fn clone(&self) -> Instruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Instruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Instruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<AShr> for Instruction

source§

fn from(inst: AShr) -> Instruction

Converts to this type from the input type.
source§

impl From<Add> for Instruction

source§

fn from(inst: Add) -> Instruction

Converts to this type from the input type.
source§

impl From<AddrSpaceCast> for Instruction

source§

fn from(inst: AddrSpaceCast) -> Instruction

Converts to this type from the input type.
source§

impl From<Alloca> for Instruction

source§

fn from(inst: Alloca) -> Instruction

Converts to this type from the input type.
source§

impl From<And> for Instruction

source§

fn from(inst: And) -> Instruction

Converts to this type from the input type.
source§

impl From<AtomicRMW> for Instruction

source§

fn from(inst: AtomicRMW) -> Instruction

Converts to this type from the input type.
source§

impl From<BinaryOp> for Instruction

source§

fn from(bo: BinaryOp) -> Instruction

Converts to this type from the input type.
source§

impl From<BitCast> for Instruction

source§

fn from(inst: BitCast) -> Instruction

Converts to this type from the input type.
source§

impl From<Call> for Instruction

source§

fn from(inst: Call) -> Instruction

Converts to this type from the input type.
source§

impl From<CatchPad> for Instruction

source§

fn from(inst: CatchPad) -> Instruction

Converts to this type from the input type.
source§

impl From<CleanupPad> for Instruction

source§

fn from(inst: CleanupPad) -> Instruction

Converts to this type from the input type.
source§

impl From<CmpXchg> for Instruction

source§

fn from(inst: CmpXchg) -> Instruction

Converts to this type from the input type.
source§

impl From<ExtractElement> for Instruction

source§

fn from(inst: ExtractElement) -> Instruction

Converts to this type from the input type.
source§

impl From<ExtractValue> for Instruction

source§

fn from(inst: ExtractValue) -> Instruction

Converts to this type from the input type.
source§

impl From<FAdd> for Instruction

source§

fn from(inst: FAdd) -> Instruction

Converts to this type from the input type.
source§

impl From<FCmp> for Instruction

source§

fn from(inst: FCmp) -> Instruction

Converts to this type from the input type.
source§

impl From<FDiv> for Instruction

source§

fn from(inst: FDiv) -> Instruction

Converts to this type from the input type.
source§

impl From<FMul> for Instruction

source§

fn from(inst: FMul) -> Instruction

Converts to this type from the input type.
source§

impl From<FNeg> for Instruction

source§

fn from(inst: FNeg) -> Instruction

Converts to this type from the input type.
source§

impl From<FPExt> for Instruction

source§

fn from(inst: FPExt) -> Instruction

Converts to this type from the input type.
source§

impl From<FPToSI> for Instruction

source§

fn from(inst: FPToSI) -> Instruction

Converts to this type from the input type.
source§

impl From<FPToUI> for Instruction

source§

fn from(inst: FPToUI) -> Instruction

Converts to this type from the input type.
source§

impl From<FPTrunc> for Instruction

source§

fn from(inst: FPTrunc) -> Instruction

Converts to this type from the input type.
source§

impl From<FRem> for Instruction

source§

fn from(inst: FRem) -> Instruction

Converts to this type from the input type.
source§

impl From<FSub> for Instruction

source§

fn from(inst: FSub) -> Instruction

Converts to this type from the input type.
source§

impl From<Fence> for Instruction

source§

fn from(inst: Fence) -> Instruction

Converts to this type from the input type.
source§

impl From<Freeze> for Instruction

source§

fn from(inst: Freeze) -> Instruction

Converts to this type from the input type.
source§

impl From<GetElementPtr> for Instruction

source§

fn from(inst: GetElementPtr) -> Instruction

Converts to this type from the input type.
source§

impl From<ICmp> for Instruction

source§

fn from(inst: ICmp) -> Instruction

Converts to this type from the input type.
source§

impl From<InsertElement> for Instruction

source§

fn from(inst: InsertElement) -> Instruction

Converts to this type from the input type.
source§

impl From<InsertValue> for Instruction

source§

fn from(inst: InsertValue) -> Instruction

Converts to this type from the input type.
source§

impl From<IntToPtr> for Instruction

source§

fn from(inst: IntToPtr) -> Instruction

Converts to this type from the input type.
source§

impl From<LShr> for Instruction

source§

fn from(inst: LShr) -> Instruction

Converts to this type from the input type.
source§

impl From<LandingPad> for Instruction

source§

fn from(inst: LandingPad) -> Instruction

Converts to this type from the input type.
source§

impl From<Load> for Instruction

source§

fn from(inst: Load) -> Instruction

Converts to this type from the input type.
source§

impl From<Mul> for Instruction

source§

fn from(inst: Mul) -> Instruction

Converts to this type from the input type.
source§

impl From<Or> for Instruction

source§

fn from(inst: Or) -> Instruction

Converts to this type from the input type.
source§

impl From<Phi> for Instruction

source§

fn from(inst: Phi) -> Instruction

Converts to this type from the input type.
source§

impl From<PtrToInt> for Instruction

source§

fn from(inst: PtrToInt) -> Instruction

Converts to this type from the input type.
source§

impl From<SDiv> for Instruction

source§

fn from(inst: SDiv) -> Instruction

Converts to this type from the input type.
source§

impl From<SExt> for Instruction

source§

fn from(inst: SExt) -> Instruction

Converts to this type from the input type.
source§

impl From<SIToFP> for Instruction

source§

fn from(inst: SIToFP) -> Instruction

Converts to this type from the input type.
source§

impl From<SRem> for Instruction

source§

fn from(inst: SRem) -> Instruction

Converts to this type from the input type.
source§

impl From<Select> for Instruction

source§

fn from(inst: Select) -> Instruction

Converts to this type from the input type.
source§

impl From<Shl> for Instruction

source§

fn from(inst: Shl) -> Instruction

Converts to this type from the input type.
source§

impl From<ShuffleVector> for Instruction

source§

fn from(inst: ShuffleVector) -> Instruction

Converts to this type from the input type.
source§

impl From<Store> for Instruction

source§

fn from(inst: Store) -> Instruction

Converts to this type from the input type.
source§

impl From<Sub> for Instruction

source§

fn from(inst: Sub) -> Instruction

Converts to this type from the input type.
source§

impl From<Trunc> for Instruction

source§

fn from(inst: Trunc) -> Instruction

Converts to this type from the input type.
source§

impl From<UDiv> for Instruction

source§

fn from(inst: UDiv) -> Instruction

Converts to this type from the input type.
source§

impl From<UIToFP> for Instruction

source§

fn from(inst: UIToFP) -> Instruction

Converts to this type from the input type.
source§

impl From<URem> for Instruction

source§

fn from(inst: URem) -> Instruction

Converts to this type from the input type.
source§

impl From<UnaryOp> for Instruction

source§

fn from(uo: UnaryOp) -> Instruction

Converts to this type from the input type.
source§

impl From<VAArg> for Instruction

source§

fn from(inst: VAArg) -> Instruction

Converts to this type from the input type.
source§

impl From<Xor> for Instruction

source§

fn from(inst: Xor) -> Instruction

Converts to this type from the input type.
source§

impl From<ZExt> for Instruction

source§

fn from(inst: ZExt) -> Instruction

Converts to this type from the input type.
source§

impl HasDebugLoc for Instruction

source§

fn get_debug_loc(&self) -> &Option<DebugLoc>

Returns the DebugLoc associated with the given Instruction, Terminator, GlobalVariable, or Function; or None if it doesn’t have a DebugLoc. Read more
source§

impl PartialEq for Instruction

source§

fn eq(&self, other: &Instruction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<Instruction> for AShr

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Add

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for AddrSpaceCast

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Alloca

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for And

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for AtomicRMW

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for BinaryOp

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for BitCast

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Call

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for CatchPad

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for CleanupPad

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for CmpXchg

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for ExtractElement

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for ExtractValue

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FAdd

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FCmp

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FDiv

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FMul

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FNeg

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FPExt

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FPToSI

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FPToUI

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FPTrunc

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FRem

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for FSub

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Fence

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Freeze

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for GetElementPtr

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for ICmp

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for InsertElement

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for InsertValue

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for IntToPtr

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for LShr

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for LandingPad

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Load

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Mul

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Or

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Phi

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for PtrToInt

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for SDiv

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for SExt

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for SIToFP

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for SRem

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Select

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Shl

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for ShuffleVector

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Store

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Sub

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Trunc

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for UDiv

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for UIToFP

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for URem

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for UnaryOp

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for VAArg

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for Xor

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for ZExt

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Typed for Instruction

The Type of an Instruction (or any subtype of Instruction) is its result type.

source§

fn get_type(&self, types: &Types) -> TypeRef

source§

impl StructuralPartialEq for Instruction

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.