gfx_backend_vulkan

Enum Backend

Source
pub enum Backend {}

Trait Implementations§

Source§

impl Backend for Backend

Source§

type Instance = Instance

The corresponding instance type for this backend.
Source§

type PhysicalDevice = PhysicalDevice

The corresponding physical device type for this backend.
Source§

type Device = Device

The corresponding logical device type for this backend.
Source§

type Surface = Surface

The corresponding surface type for this backend.
Source§

type QueueFamily = QueueFamily

The corresponding queue family type for this backend.
Source§

type Queue = Queue

The corresponding command queue type for this backend.
Source§

type CommandBuffer = CommandBuffer

The corresponding command buffer type for this backend.
Source§

type Memory = Memory

The corresponding memory type for this backend.
Source§

type CommandPool = RawCommandPool

The corresponding command pool type for this backend.
Source§

type ShaderModule = ShaderModule

The corresponding shader module type for this backend.
Source§

type RenderPass = RenderPass

The corresponding render pass type for this backend.
Source§

type Framebuffer = Framebuffer

The corresponding framebuffer type for this backend.
Source§

type Buffer = Buffer

The corresponding buffer type for this backend.
Source§

type BufferView = BufferView

The corresponding buffer view type for this backend.
Source§

type Image = Image

The corresponding image type for this backend.
Source§

type ImageView = ImageView

The corresponding image view type for this backend.
Source§

type Sampler = Sampler

The corresponding sampler type for this backend.
Source§

type ComputePipeline = ComputePipeline

The corresponding compute pipeline type for this backend.
Source§

type GraphicsPipeline = GraphicsPipeline

The corresponding graphics pipeline type for this backend.
Source§

type PipelineLayout = PipelineLayout

The corresponding pipeline layout type for this backend.
Source§

type PipelineCache = PipelineCache

The corresponding pipeline cache type for this backend.
Source§

type DescriptorSetLayout = DescriptorSetLayout

The corresponding descriptor set layout type for this backend.
Source§

type DescriptorPool = DescriptorPool

The corresponding descriptor pool type for this backend.
Source§

type DescriptorSet = DescriptorSet

The corresponding descriptor set type for this backend.
Source§

type Fence = Fence

The corresponding fence type for this backend.
Source§

type Semaphore = Semaphore

The corresponding semaphore type for this backend.
Source§

type Event = Event

The corresponding event type for this backend.
Source§

type QueryPool = QueryPool

The corresponding query pool type for this backend.
Source§

type Display = Display

The corresponding display type for this backend.
Source§

type DisplayMode = DisplayMode

The corresponding display mode type for this backend
Source§

impl Clone for Backend

Source§

fn clone(&self) -> Backend

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 Backend

Source§

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

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

impl Device<Backend> for Device

Source§

unsafe fn allocate_memory( &self, mem_type: MemoryTypeId, size: u64, ) -> Result<Memory, AllocationError>

Allocates a memory segment of a specified type. Read more
Source§

unsafe fn create_command_pool( &self, family: QueueFamilyId, create_flags: CommandPoolCreateFlags, ) -> Result<RawCommandPool, OutOfMemory>

Create a new command pool for a given queue family. Read more
Source§

unsafe fn destroy_command_pool(&self, pool: RawCommandPool)

Destroy a command pool.
Source§

unsafe fn create_render_pass<'a, Ia, Is, Id>( &self, attachments: Ia, subpasses: Is, dependencies: Id, ) -> Result<RenderPass, OutOfMemory>
where Ia: Iterator<Item = Attachment>, Is: Iterator<Item = SubpassDesc<'a>>, Id: Iterator<Item = SubpassDependency>,

Create a render pass with the given attachments and subpasses. Read more
Source§

unsafe fn create_pipeline_layout<'a, Is, Ic>( &self, set_layouts: Is, push_constant_ranges: Ic, ) -> Result<PipelineLayout, OutOfMemory>
where Is: Iterator<Item = &'a DescriptorSetLayout>, Ic: Iterator<Item = (ShaderStageFlags, Range<u32>)>,

Create a new pipeline layout object. Read more
Source§

unsafe fn create_pipeline_cache( &self, data: Option<&[u8]>, ) -> Result<PipelineCache, OutOfMemory>

Create a pipeline cache object.
Source§

unsafe fn get_pipeline_cache_data( &self, cache: &PipelineCache, ) -> Result<Vec<u8>, OutOfMemory>

Retrieve data from pipeline cache object.
Source§

unsafe fn destroy_pipeline_cache(&self, cache: PipelineCache)

Destroy a pipeline cache object.
Source§

unsafe fn merge_pipeline_caches<'a, I>( &self, target: &mut PipelineCache, sources: I, ) -> Result<(), OutOfMemory>
where I: Iterator<Item = &'a PipelineCache>,

Merge a number of source pipeline caches into the target one.
Source§

unsafe fn create_graphics_pipeline<'a>( &self, desc: &GraphicsPipelineDesc<'a, B>, cache: Option<&PipelineCache>, ) -> Result<GraphicsPipeline, CreationError>

Create a graphics pipeline. Read more
Source§

unsafe fn create_compute_pipeline<'a>( &self, desc: &ComputePipelineDesc<'a, B>, cache: Option<&PipelineCache>, ) -> Result<ComputePipeline, CreationError>

Create a compute pipeline.
Source§

unsafe fn create_framebuffer<T>( &self, renderpass: &RenderPass, attachments: T, extent: Extent, ) -> Result<Framebuffer, OutOfMemory>

Create a new framebuffer object. Read more
Source§

unsafe fn create_shader_module( &self, spirv_data: &[u32], ) -> Result<ShaderModule, ShaderError>

Create a new shader module object from the SPIR-V binary data. Read more
Source§

unsafe fn create_sampler( &self, desc: &SamplerDesc, ) -> Result<Sampler, AllocationError>

Create a new sampler object
Source§

unsafe fn create_buffer( &self, size: u64, usage: Usage, sparse: SparseFlags, ) -> Result<Buffer, CreationError>

Create a new buffer (unbound). Read more
Source§

unsafe fn get_buffer_requirements(&self, buffer: &Buffer) -> Requirements

Get memory requirements for the buffer
Source§

unsafe fn bind_buffer_memory( &self, memory: &Memory, offset: u64, buffer: &mut Buffer, ) -> Result<(), BindError>

Bind memory to a buffer. Read more
Source§

unsafe fn create_buffer_view( &self, buffer: &Buffer, format: Option<Format>, range: SubRange, ) -> Result<BufferView, ViewCreationError>

Create a new buffer view object
Source§

unsafe fn create_image( &self, kind: Kind, mip_levels: Level, format: Format, tiling: Tiling, usage: Usage, sparse: SparseFlags, view_caps: ViewCapabilities, ) -> Result<Image, CreationError>

Create a new image object
Source§

unsafe fn get_image_requirements(&self, image: &Image) -> Requirements

Get memory requirements for the Image
Source§

unsafe fn get_image_subresource_footprint( &self, image: &Image, subresource: Subresource, ) -> SubresourceFootprint

Source§

unsafe fn bind_image_memory( &self, memory: &Memory, offset: u64, image: &mut Image, ) -> Result<(), BindError>

Bind device memory to an image object
Source§

unsafe fn create_image_view( &self, image: &Image, kind: ViewKind, format: Format, swizzle: Swizzle, usage: Usage, range: SubresourceRange, ) -> Result<ImageView, ViewCreationError>

Create an image view from an existing image
Source§

unsafe fn create_descriptor_pool<T>( &self, max_sets: usize, descriptor_ranges: T, flags: DescriptorPoolCreateFlags, ) -> Result<DescriptorPool, OutOfMemory>
where T: Iterator<Item = DescriptorRangeDesc>,

Create a descriptor pool. Read more
Source§

unsafe fn create_descriptor_set_layout<'a, I, J>( &self, binding_iter: I, immutable_samplers: J, ) -> Result<DescriptorSetLayout, OutOfMemory>
where I: Iterator<Item = DescriptorSetLayoutBinding>, J: Iterator<Item = &'a Sampler>,

Create a descriptor set layout. Read more
Source§

unsafe fn write_descriptor_set<'a, I>(&self, op: DescriptorSetWrite<'a, B, I>)
where I: Iterator<Item = Descriptor<'a, B>>,

Specifying the parameters of a descriptor set write operation.
Source§

unsafe fn copy_descriptor_set<'a>(&self, op: DescriptorSetCopy<'a, B>)

Structure specifying a copy descriptor set operation.
Source§

unsafe fn map_memory( &self, memory: &mut Memory, segment: Segment, ) -> Result<*mut u8, MapError>

Map a memory object into application address space Read more
Source§

unsafe fn unmap_memory(&self, memory: &mut Memory)

Unmap a memory object once host access to it is no longer needed by the application
Source§

unsafe fn flush_mapped_memory_ranges<'a, I>( &self, ranges: I, ) -> Result<(), OutOfMemory>
where I: Iterator<Item = (&'a Memory, Segment)>,

Flush mapped memory ranges
Source§

unsafe fn invalidate_mapped_memory_ranges<'a, I>( &self, ranges: I, ) -> Result<(), OutOfMemory>
where I: Iterator<Item = (&'a Memory, Segment)>,

Invalidate ranges of non-coherent memory from the host caches
Source§

fn create_semaphore(&self) -> Result<Semaphore, OutOfMemory>

Create a new semaphore object.
Source§

fn create_fence(&self, signaled: bool) -> Result<Fence, OutOfMemory>

Create a new fence object. Read more
Source§

unsafe fn reset_fence(&self, fence: &mut Fence) -> Result<(), OutOfMemory>

Resets a given fence to its original, unsignaled state.
Source§

unsafe fn wait_for_fences<'a, I>( &self, fences_iter: I, wait: WaitFor, timeout_ns: u64, ) -> Result<bool, WaitError>
where I: Iterator<Item = &'a Fence>,

Blocks until all or one of the given fences are signaled. Returns true if fences were signaled before the timeout.
Source§

unsafe fn get_fence_status(&self, fence: &Fence) -> Result<bool, DeviceLost>

true for signaled, false for not ready
Source§

fn create_event(&self) -> Result<Event, OutOfMemory>

Create an event object.
Source§

unsafe fn get_event_status(&self, event: &Event) -> Result<bool, WaitError>

Query the status of an event. Read more
Source§

unsafe fn set_event(&self, event: &mut Event) -> Result<(), OutOfMemory>

Sets an event.
Source§

unsafe fn reset_event(&self, event: &mut Event) -> Result<(), OutOfMemory>

Resets an event.
Source§

unsafe fn free_memory(&self, memory: Memory)

Free device memory
Source§

unsafe fn create_query_pool( &self, ty: Type, query_count: Id, ) -> Result<QueryPool, CreationError>

Create a new query pool object Read more
Source§

unsafe fn get_query_pool_results( &self, pool: &QueryPool, queries: Range<Id>, data: &mut [u8], stride: Stride, flags: ResultFlags, ) -> Result<bool, WaitError>

Get query pool results into the specified CPU memory. Returns Ok(false) if the results are not ready yet and neither of WAIT or PARTIAL flags are set.
Source§

unsafe fn destroy_query_pool(&self, pool: QueryPool)

Destroy a query pool object
Source§

unsafe fn destroy_shader_module(&self, module: ShaderModule)

Destroy a shader module module Read more
Source§

unsafe fn destroy_render_pass(&self, rp: RenderPass)

Destroys a render pass created by this device.
Source§

unsafe fn destroy_pipeline_layout(&self, pl: PipelineLayout)

Destroy a pipeline layout object
Source§

unsafe fn destroy_graphics_pipeline(&self, pipeline: GraphicsPipeline)

Destroy a graphics pipeline. Read more
Source§

unsafe fn destroy_compute_pipeline(&self, pipeline: ComputePipeline)

Destroy a compute pipeline. Read more
Source§

unsafe fn destroy_framebuffer(&self, fb: Framebuffer)

Destroy a framebuffer. Read more
Source§

unsafe fn destroy_buffer(&self, buffer: Buffer)

Destroy a buffer. Read more
Source§

unsafe fn destroy_buffer_view(&self, view: BufferView)

Destroy a buffer view object
Source§

unsafe fn destroy_image(&self, image: Image)

Destroy an image. Read more
Source§

unsafe fn destroy_image_view(&self, view: ImageView)

Destroy an image view object
Source§

unsafe fn destroy_sampler(&self, sampler: Sampler)

Destroy a sampler object
Source§

unsafe fn destroy_descriptor_pool(&self, pool: DescriptorPool)

Destroy a descriptor pool object Read more
Source§

unsafe fn destroy_descriptor_set_layout(&self, layout: DescriptorSetLayout)

Destroy a descriptor set layout object
Source§

unsafe fn destroy_fence(&self, fence: Fence)

Destroy a fence object
Source§

unsafe fn destroy_semaphore(&self, semaphore: Semaphore)

Destroy a semaphore object.
Source§

unsafe fn destroy_event(&self, event: Event)

Destroy an event object.
Source§

fn wait_idle(&self) -> Result<(), OutOfMemory>

Wait for all queues associated with this device to idle. Read more
Source§

unsafe fn set_image_name(&self, image: &mut Image, name: &str)

Associate a name with an image, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_buffer_name(&self, buffer: &mut Buffer, name: &str)

Associate a name with a buffer, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_command_buffer_name( &self, command_buffer: &mut CommandBuffer, name: &str, )

Associate a name with a command buffer, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_semaphore_name(&self, semaphore: &mut Semaphore, name: &str)

Associate a name with a semaphore, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_fence_name(&self, fence: &mut Fence, name: &str)

Associate a name with a fence, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_framebuffer_name(&self, framebuffer: &mut Framebuffer, name: &str)

Associate a name with a framebuffer, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_render_pass_name(&self, render_pass: &mut RenderPass, name: &str)

Associate a name with a render pass, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_descriptor_set_name( &self, descriptor_set: &mut DescriptorSet, name: &str, )

Associate a name with a descriptor set, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_descriptor_set_layout_name( &self, descriptor_set_layout: &mut DescriptorSetLayout, name: &str, )

Associate a name with a descriptor set layout, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_pipeline_layout_name( &self, pipeline_layout: &mut PipelineLayout, name: &str, )

Associate a name with a pipeline layout, for easier debugging in external tools or with validation layers that can print a friendly name when referring to objects in error messages
Source§

unsafe fn set_display_power_state( &self, display: &Display<B>, power_state: &PowerState, ) -> Result<(), DisplayControlError>

Control the power state of the provided display
Source§

unsafe fn register_device_event( &self, device_event: &DeviceEvent, fence: &mut <B as Backend>::Fence, ) -> Result<(), DisplayControlError>

Register device event
Source§

unsafe fn register_display_event( &self, display: &Display<B>, display_event: &DisplayEvent, fence: &mut <B as Backend>::Fence, ) -> Result<(), DisplayControlError>

Register display event
Source§

unsafe fn create_allocate_external_buffer( &self, external_memory_type: ExternalBufferMemoryType, usage: Usage, sparse: SparseFlags, type_mask: u32, size: u64, ) -> Result<(Buffer, Memory), ExternalResourceError>

Create, allocate and bind a buffer that can be exported. Read more
Source§

unsafe fn import_external_buffer( &self, external_memory: ExternalBufferMemory, usage: Usage, sparse: SparseFlags, type_mask: u32, size: u64, ) -> Result<(Buffer, Memory), ExternalResourceError>

Import external memory as binded buffer and memory. Read more
Source§

unsafe fn create_allocate_external_image( &self, external_memory_type: ExternalImageMemoryType, kind: Kind, mip_levels: Level, format: Format, tiling: Tiling, usage: Usage, sparse: SparseFlags, view_caps: ViewCapabilities, type_mask: u32, ) -> Result<(Image, Memory), ExternalResourceError>

Create, allocate and bind an image that can be exported. Read more
Source§

unsafe fn import_external_image( &self, external_memory: ExternalImageMemory, kind: Kind, mip_levels: Level, format: Format, tiling: Tiling, usage: Usage, sparse: SparseFlags, view_caps: ViewCapabilities, type_mask: u32, ) -> Result<(Image, Memory), ExternalResourceError>

Import external memory as binded image and memory. Read more
Source§

unsafe fn export_memory( &self, external_memory_type: ExternalMemoryType, memory: &Memory, ) -> Result<PlatformMemory, ExternalMemoryExportError>

Export memory as os type (Fd, Handle or Ptr) based on the requested external memory type. Read more
Source§

unsafe fn drm_format_modifier(&self, image: &Image) -> Option<DrmModifier>

Retrieve the underlying drm format modifier from an image, if any. Read more
Source§

fn start_capture(&self)

Starts frame capture.
Source§

fn stop_capture(&self)

Stops frame capture.
Source§

unsafe fn create_shader_module_from_naga( &self, shader: NagaShader, ) -> Result<<B as Backend>::ShaderModule, (ShaderError, NagaShader)>

Create a new shader module from the naga module.
Source§

unsafe fn wait_for_fence( &self, fence: &<B as Backend>::Fence, timeout_ns: u64, ) -> Result<bool, WaitError>

Blocks until the given fence is signaled. Returns true if the fence was signaled before the timeout.
Source§

impl Hash for Backend

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Instance<Backend> for Instance

Source§

fn create(name: &str, version: u32) -> Result<Self, UnsupportedBackend>

Create a new instance. Read more
Source§

fn enumerate_adapters(&self) -> Vec<Adapter<Backend>>

Return all available graphics adapters.
Source§

unsafe fn create_surface( &self, has_handle: &impl HasRawWindowHandle, ) -> Result<Surface, InitError>

Create a new surface. Read more
Source§

unsafe fn destroy_surface(&self, surface: Surface)

Destroy a surface, freeing the resources associated with it and releasing it from this graphics API. Read more
Source§

unsafe fn create_display_plane_surface( &self, display_plane: &DisplayPlane<'_, Backend>, plane_stack_index: u32, transformation: SurfaceTransform, alpha: DisplayPlaneAlpha, image_extent: Extent2D, ) -> Result<Surface, DisplayPlaneSurfaceError>

Create a new surface from a display plane. Read more
Source§

impl PartialEq for Backend

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PhysicalDevice<Backend> for PhysicalDevice

Source§

unsafe fn open( &self, families: &[(&QueueFamily, &[QueuePriority])], requested_features: Features, ) -> Result<Gpu<Backend>, CreationError>

Create a new logical device with the requested features. If requested_features is empty, then only the core features are supported. Read more
Source§

fn format_properties(&self, format: Option<Format>) -> Properties

Fetch details for a particular format.
Source§

fn image_format_properties( &self, format: Format, dimensions: u8, tiling: Tiling, usage: Usage, view_caps: ViewCapabilities, ) -> Option<FormatProperties>

Fetch details for a particular image format.
Source§

fn memory_properties(&self) -> MemoryProperties

Fetch details for the memory regions provided by the device.
Source§

fn external_buffer_properties( &self, usage: Usage, sparse: SparseFlags, external_memory_type: ExternalMemoryType, ) -> ExternalMemoryProperties

Get external buffer properties. The parameters specify how the buffer is going to used. Read more
Source§

fn external_image_properties( &self, format: Format, dimensions: u8, tiling: Tiling, usage: Usage, view_caps: ViewCapabilities, external_memory_type: ExternalMemoryType, ) -> Result<ExternalMemoryProperties, ExternalImagePropertiesError>

Get external image properties. The parameters specify how the image is going to used. Read more
Source§

fn features(&self) -> Features

Returns the features of this PhysicalDevice. This usually depends on the graphics API being used, as well as the actual platform underneath.
Source§

fn properties(&self) -> PhysicalDeviceProperties

Returns the properties of this PhysicalDevice. Similarly to Features, they
Source§

fn is_valid_cache(&self, cache: &[u8]) -> bool

Check cache compatibility with the PhysicalDevice.
Source§

unsafe fn enumerate_displays(&self) -> Vec<Display<Backend>>

Enumerate active displays surface from display. Please notice that, even if a system has displays attached, they could be not returned because they are managed by some other components. This function only return the display that are available to be managed by the current application. Since, generally, while compositor are running they take the control of every display connected, it could be better to run the application directly from the tty to avoid the return of an empty list. Read more
Source§

unsafe fn enumerate_compatible_planes( &self, display: &Display<Backend>, ) -> Vec<Plane>

Enumerate compatibles planes with the provided display. Read more
Source§

unsafe fn create_display_mode( &self, display: &Display<Backend>, resolution: (u32, u32), refresh_rate: u32, ) -> Result<DisplayMode<Backend>, DisplayModeError>

Create a new display mode from a display, a resolution, a refresh_rate and the plane index. If the builtin display modes does not satisfy the requirements, this function will try to create a new one. Read more
Source§

unsafe fn create_display_plane<'a>( &self, display_mode: &'a DisplayMode<Backend>, plane: &'a Plane, ) -> Result<DisplayPlane<'a, Backend>, OutOfMemory>

Create a display plane from a display, a resolution, a refresh_rate and a plane. If the builtin display modes does not satisfy the requirements, this function will try to create a new one. Read more
Source§

impl Queue<Backend> for Queue

Source§

unsafe fn submit<'a, Ic, Iw, Is>( &mut self, command_buffers: Ic, wait_semaphores: Iw, signal_semaphores: Is, fence: Option<&mut Fence>, )
where Ic: Iterator<Item = &'a CommandBuffer>, Iw: Iterator<Item = (&'a Semaphore, PipelineStage)>, Is: Iterator<Item = &'a Semaphore>,

Submit command buffers to queue for execution. Read more
Source§

unsafe fn bind_sparse<'a, Iw, Is, Ibi, Ib, Iii, Io, Ii>( &mut self, wait_semaphores: Iw, signal_semaphores: Is, buffer_memory_binds: Ib, image_opaque_memory_binds: Io, image_memory_binds: Ii, device: &Device, fence: Option<&Fence>, )
where Ibi: Iterator<Item = &'a SparseBind<&'a Memory>>, Ib: Iterator<Item = (&'a mut Buffer, Ibi)>, Iii: Iterator<Item = &'a SparseImageBind<&'a Memory>>, Io: Iterator<Item = (&'a mut Image, Ibi)>, Ii: Iterator<Item = (&'a mut Image, Iii)>, Iw: Iterator<Item = &'a Semaphore>, Is: Iterator<Item = &'a Semaphore>,

Sparse memory bind operation. Read more
Source§

unsafe fn present( &mut self, surface: &mut Surface, image: SurfaceImage, wait_semaphore: Option<&mut Semaphore>, ) -> Result<Option<Suboptimal>, PresentError>

Present a swapchain image directly to a surface, after waiting on wait_semaphore. Read more
Source§

fn wait_idle(&mut self) -> Result<(), OutOfMemory>

Wait for the queue to be idle.
Source§

fn timestamp_period(&self) -> f32

The amount of nanoseconds that causes a timestamp query value to increment by one.
Source§

impl Copy for Backend

Source§

impl Eq for Backend

Source§

impl StructuralPartialEq for Backend

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

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

Source§

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