pub struct ErasedFilterConfigData {
pub name: String,
pub size: usize,
pub value: Option<NonNull<c_void>>,
/* private fields */
}Available on crate feature
filter only.Expand description
Fields§
§name: String設定名。
size: usize§value: Option<NonNull<c_void>>現在の値を指すポインタ。
Implementations§
Source§impl ErasedFilterConfigData
impl ErasedFilterConfigData
Sourcepub fn with_default_value<T: Copy + 'static>(
name: String,
default_value: T,
) -> Self
pub fn with_default_value<T: Copy + 'static>( name: String, default_value: T, ) -> Self
Sourcepub fn default_value(&self) -> &[u8] ⓘ
pub fn default_value(&self) -> &[u8] ⓘ
デフォルト値のスライスを取得します。
Sourcepub unsafe fn into_typed<T: Copy + 'static>(self) -> FilterConfigData<T>
pub unsafe fn into_typed<T: Copy + 'static>(self) -> FilterConfigData<T>
型付きの汎用データに変換します。
§Safety
selfを消去する前の型Tと同じ型で呼び出す必要があります。- Tのサイズが
self.sizeと一致している必要があります。 self.valueが指すポインタが有効である必要があります。self.default_valueはTとして有効なデータである必要があります。
Trait Implementations§
Source§impl Clone for ErasedFilterConfigData
impl Clone for ErasedFilterConfigData
Source§fn clone(&self) -> ErasedFilterConfigData
fn clone(&self) -> ErasedFilterConfigData
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 ErasedFilterConfigData
impl Debug for ErasedFilterConfigData
Source§impl<T: Copy + 'static> From<FilterConfigData<T>> for ErasedFilterConfigData
impl<T: Copy + 'static> From<FilterConfigData<T>> for ErasedFilterConfigData
Source§fn from(value: FilterConfigData<T>) -> Self
fn from(value: FilterConfigData<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ErasedFilterConfigData
impl RefUnwindSafe for ErasedFilterConfigData
impl !Send for ErasedFilterConfigData
impl !Sync for ErasedFilterConfigData
impl Unpin for ErasedFilterConfigData
impl UnwindSafe for ErasedFilterConfigData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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