mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-24 15:54:00 +00:00
make Fallible<T>
public
This commit is contained in:
parent
4d55c6917e
commit
c65c4626f1
@ -86,7 +86,7 @@ impl std::fmt::Display for ResourceErrorIdent {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) trait ParentDevice: Labeled {
|
||||
pub trait ParentDevice: Labeled {
|
||||
fn device(&self) -> &Arc<Device>;
|
||||
|
||||
fn is_equal(self: &Arc<Self>, other: &Arc<Self>) -> bool {
|
||||
@ -131,7 +131,7 @@ macro_rules! impl_parent_device {
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) trait ResourceType {
|
||||
pub trait ResourceType {
|
||||
const TYPE: &'static str;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ macro_rules! impl_resource_type {
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) trait Labeled: ResourceType {
|
||||
pub trait Labeled: ResourceType {
|
||||
/// Returns a string identifying this resource for logging and errors.
|
||||
///
|
||||
/// It may be a user-provided string or it may be a placeholder from wgpu.
|
||||
@ -417,7 +417,7 @@ pub struct DestroyedResourceError(pub ResourceErrorIdent);
|
||||
#[error("{0} is invalid")]
|
||||
pub struct InvalidResourceError(pub ResourceErrorIdent);
|
||||
|
||||
pub(crate) enum Fallible<T: ParentDevice> {
|
||||
pub enum Fallible<T: ParentDevice> {
|
||||
Valid(Arc<T>),
|
||||
Invalid(Arc<String>),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user