#[repr(C)]pub struct WGPUStringView {
pub data: *const c_char,
pub length: usize,
}Fields§
§data: *const c_char§length: usizeImplementations§
Source§impl WGPUStringView
impl WGPUStringView
Sourcepub fn null() -> Self
pub fn null() -> Self
The null value of WGPUStringView, as is specified in WebGPU Headers: Strings.
Note that this is distinct from WGPUStringView::empty, and
is not considered as an empty string.
Sourcepub fn empty() -> Self
pub fn empty() -> Self
The empty string, as is specified in WebGPU Headers: Strings.
Note that this is not the only valid empty string representation.
To check if a string is empty, use WGPUStringView::is_empty
instead of comparing with this value.
Sourcepub fn is_null(&self) -> bool
pub fn is_null(&self) -> bool
Returns true if this string is WGPUStringView::null. false otherwise.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this string is empty. false otherwise.
This method is equivalent to self.length == 0.
Note that WGPUStringView::null is not considered as an empty string,
as is specified in WebGPU Headers: Strings.
Trait Implementations§
Source§impl Clone for WGPUStringView
impl Clone for WGPUStringView
Source§fn clone(&self) -> WGPUStringView
fn clone(&self) -> WGPUStringView
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WGPUStringView
impl Debug for WGPUStringView
Source§impl Default for WGPUStringView
impl Default for WGPUStringView
Source§impl From<&str> for WGPUStringView
impl From<&str> for WGPUStringView
Source§impl Hash for WGPUStringView
impl Hash for WGPUStringView
Source§impl Ord for WGPUStringView
impl Ord for WGPUStringView
Source§fn cmp(&self, other: &WGPUStringView) -> Ordering
fn cmp(&self, other: &WGPUStringView) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WGPUStringView
impl PartialEq for WGPUStringView
Source§impl PartialOrd for WGPUStringView
impl PartialOrd for WGPUStringView
impl Copy for WGPUStringView
impl Eq for WGPUStringView
impl StructuralPartialEq for WGPUStringView
Auto Trait Implementations§
impl Freeze for WGPUStringView
impl RefUnwindSafe for WGPUStringView
impl !Send for WGPUStringView
impl !Sync for WGPUStringView
impl Unpin for WGPUStringView
impl UnwindSafe for WGPUStringView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more