pub trait RawWrapperwhere
    Self: Sized,{
    type CType;

    // Required methods
    fn as_raw_ptr(&self) -> *mut Self::CType;
    fn as_raw(&self) -> &Self::CType;
    fn from_raw(raw: Self::CType) -> Self;
    unsafe fn mut_from_raw_ptr<'a>(raw: *mut Self::CType) -> &'a mut Self;

    // Provided methods
    unsafe fn from_raw_ptr<'a>(raw: *const Self::CType) -> &'a Self { ... }
    fn as_ptr(&self) -> *mut Self { ... }
}
Expand description

Wrapper for the external type, must not be null. By convention, all wrapped structures should with the Ref prefix. #[repr(transparent)] should be used where possible.

Required Associated Types§

source

type CType

External type

Required Methods§

source

fn as_raw_ptr(&self) -> *mut Self::CType

Raw ptr to the external type

source

fn as_raw(&self) -> &Self::CType

Wrapped external value

source

fn from_raw(raw: Self::CType) -> Self

Creates wrapper from the external value, can be use when external type has no raw pointers.

source

unsafe fn mut_from_raw_ptr<'a>(raw: *mut Self::CType) -> &'a mut Self

Cast external pointer to the borrowed mutable wrapper. Panic when pointer is null. Lifetime is not reliable and should be guaranteed explicitly.

Arguments
  • raw - raw pointer
Safety

raw must be valid pointer to the structure

Provided Methods§

source

unsafe fn from_raw_ptr<'a>(raw: *const Self::CType) -> &'a Self

Cast external pointer to the borrowed wrapper. Panic when pointer is null. Lifetime is not reliable and should be guaranteed explicitly.

Arguments
  • raw - raw pointer
Safety

raw must be valid pointer to the structure

source

fn as_ptr(&self) -> *mut Self

Raw mutable pointer to Self

Implementors§

source§

impl RawWrapper for ClientEventsRef

source§

impl RawWrapper for ClientInfoRef

source§

impl RawWrapper for ClientRef

source§

impl RawWrapper for ContextEventsRef

source§

impl RawWrapper for ContextRef

source§

impl RawWrapper for CoreEventsRef

source§

impl RawWrapper for CoreInfoRef

source§

impl RawWrapper for CoreRef

source§

impl RawWrapper for DeviceEventsRef

source§

impl RawWrapper for DeviceInfoRef

source§

impl RawWrapper for DeviceRef

source§

impl RawWrapper for FactoryEventsRef

source§

impl RawWrapper for FactoryInfoRef

source§

impl RawWrapper for FactoryRef

source§

impl RawWrapper for LinkEventsRef

source§

impl RawWrapper for LinkInfoRef

source§

impl RawWrapper for LinkState

§

type CType = i32

source§

impl RawWrapper for LinkRef

source§

impl RawWrapper for pipewire_wrapper::core_api::loop_::LoopRef

source§

impl RawWrapper for MainLoopRef

source§

impl RawWrapper for NodeEventsRef

source§

impl RawWrapper for NodeInfoRef

source§

impl RawWrapper for NodeState

§

type CType = i32

source§

impl RawWrapper for NodeRef

source§

impl RawWrapper for PortEventsRef

source§

impl RawWrapper for PortInfoRef

source§

impl RawWrapper for PortRef

source§

impl RawWrapper for PropertiesRef

source§

impl RawWrapper for ProxyEventsRef

source§

impl RawWrapper for ProxyRef

source§

impl RawWrapper for RegistryEventsRef

source§

impl RawWrapper for RegistryRef

source§

impl RawWrapper for FilterEventsRef

source§

impl RawWrapper for FilterState

§

type CType = i32

source§

impl RawWrapper for DataLoopRef

source§

impl RawWrapper for GlobalRef

source§

impl RawWrapper for ImplClientRef

source§

impl RawWrapper for ImplCoreRef

source§

impl RawWrapper for ImplementationRef

source§

impl RawWrapper for ProtocolRef

source§

impl RawWrapper for WorkQueueRef

source§

impl RawWrapper for ChunkRef

source§

impl RawWrapper for DataRef

source§

impl RawWrapper for DataType

§

type CType = u32

source§

impl RawWrapper for MetaBitmapRef

source§

impl RawWrapper for MetaBusyRef

source§

impl RawWrapper for MetaControlRef

source§

impl RawWrapper for MetaCursorRef

source§

impl RawWrapper for MetaHeaderRef

source§

impl RawWrapper for MetaRef

source§

impl RawWrapper for MetaRegionRef

source§

impl RawWrapper for pipewire_wrapper::spa::buffers::meta::MetaType

§

type CType = u32

source§

impl RawWrapper for pipewire_wrapper::spa::buffers::BufferRef

source§

impl RawWrapper for DictItemRef

source§

impl RawWrapper for DictRef

source§

impl RawWrapper for HandleRef

source§

impl RawWrapper for CallbacksRef

source§

impl RawWrapper for HookListRef

source§

impl RawWrapper for HookRef

source§

impl RawWrapper for InterfaceRef

source§

impl RawWrapper for IOClockRef

source§

impl RawWrapper for IOLatencyRef

source§

impl RawWrapper for IOMemoryRef

source§

impl RawWrapper for IOPositionRef

source§

impl RawWrapper for IORangeRef

source§

impl RawWrapper for IORateMatchRef

source§

impl RawWrapper for IOSegmentBarRef

source§

impl RawWrapper for IOSegmentRef

source§

impl RawWrapper for IOSegmentVideoRef

source§

impl RawWrapper for IOSequenceRef

source§

impl RawWrapper for IOVideoSizeRef

source§

impl RawWrapper for PositionState

§

type CType = u32

source§

impl RawWrapper for ListRef

source§

impl RawWrapper for LoopControlRef

source§

impl RawWrapper for pipewire_wrapper::spa::loop_::LoopRef

source§

impl RawWrapper for SourceRef

source§

impl RawWrapper for LoopUtilsRef

source§

impl RawWrapper for ParamInfoRef

source§

impl RawWrapper for ParamType

§

type CType = u32

source§

impl RawWrapper for PodArrayBodyRef

source§

impl RawWrapper for PodBitmapRef

source§

impl RawWrapper for PodBytesRef

source§

impl RawWrapper for ChoiceType

§

type CType = u32

source§

impl RawWrapper for PodChoiceBodyRef

source§

impl RawWrapper for PodControlRef

source§

impl RawWrapper for pipewire_wrapper::spa::pod::control::Type

§

type CType = u32

source§

impl RawWrapper for AudioFormat

§

type CType = u32

source§

impl RawWrapper for Format

§

type CType = u32

source§

impl RawWrapper for MediaSubType

§

type CType = u32

source§

impl RawWrapper for MediaType

§

type CType = u32

source§

impl RawWrapper for ParamBitorder

§

type CType = u32

source§

impl RawWrapper for VideoChromaSite

§

type CType = u32

source§

impl RawWrapper for VideoColorMatrix

§

type CType = u32

source§

impl RawWrapper for VideoColorPrimaries

§

type CType = u32

source§

impl RawWrapper for VideoColorRange

§

type CType = u32

source§

impl RawWrapper for VideoFormat

§

type CType = u32

source§

impl RawWrapper for VideoH264Alignment

§

type CType = u32

source§

impl RawWrapper for VideoH264StreamFormat

§

type CType = u32

source§

impl RawWrapper for VideoInterlaceMode

§

type CType = u32

source§

impl RawWrapper for VideoMultiviewFlags

§

type CType = u32

source§

impl RawWrapper for VideoMultiviewMode

§

type CType = i32

source§

impl RawWrapper for VideoTransferFunction

§

type CType = u32

source§

impl RawWrapper for ParamBuffers

§

type CType = u32

source§

impl RawWrapper for IOType

§

type CType = u32

source§

impl RawWrapper for ParamIO

§

type CType = u32

source§

impl RawWrapper for ParamLatency

§

type CType = u32

source§

impl RawWrapper for pipewire_wrapper::spa::pod::object::param_meta::MetaType

§

type CType = u32

source§

impl RawWrapper for ParamMeta

§

type CType = u32

source§

impl RawWrapper for Direction

§

type CType = u32

source§

impl RawWrapper for ParamPortConfig

§

type CType = u32

source§

impl RawWrapper for ParamPortConfigMode

§

type CType = u32

source§

impl RawWrapper for ParamProcessLatency

§

type CType = u32

source§

impl RawWrapper for pipewire_wrapper::spa::pod::object::param_profile::ParamAvailability

§

type CType = u32

source§

impl RawWrapper for ParamProfile

§

type CType = u32

source§

impl RawWrapper for pipewire_wrapper::spa::pod::object::param_route::ParamAvailability

§

type CType = u32

source§

impl RawWrapper for ParamRoute

§

type CType = u32

source§

impl RawWrapper for Profiler

§

type CType = u32

source§

impl RawWrapper for AudioChannel

§

type CType = u32

source§

impl RawWrapper for AudioIec958Codec

§

type CType = u32

source§

impl RawWrapper for BluetoothAudioCodec

§

type CType = u32

source§

impl RawWrapper for Prop

§

type CType = u32

source§

impl RawWrapper for PropInfo

§

type CType = u32

source§

impl RawWrapper for PodObjectRef

source§

impl RawWrapper for PodPointerRef

source§

impl RawWrapper for PodSequenceRef

source§

impl RawWrapper for PodStringRef

source§

impl RawWrapper for PodBoolRef

source§

impl RawWrapper for PodDoubleRef

source§

impl RawWrapper for PodFdRef

source§

impl RawWrapper for PodFloatRef

source§

impl RawWrapper for PodFractionRef

source§

impl RawWrapper for PodIntRef

source§

impl RawWrapper for PodLongRef

source§

impl RawWrapper for PodRectangleRef

source§

impl RawWrapper for PodRef

source§

impl RawWrapper for PodStructRef

source§

impl RawWrapper for SupportRef

source§

impl RawWrapper for SystemRef

source§

impl RawWrapper for ThreadRef

source§

impl RawWrapper for BufferAllocInfoRef

source§

impl RawWrapper for CommandBodyRef

source§

impl RawWrapper for CommandRef

source§

impl RawWrapper for EventBodyRef

source§

impl RawWrapper for EventDevice

§

type CType = u32

source§

impl RawWrapper for EventNode

§

type CType = u32

source§

impl RawWrapper for EventRef

source§

impl RawWrapper for FractionRef

source§

impl RawWrapper for IOBuffersRef

source§

impl RawWrapper for NodeCommand

§

type CType = u32

source§

impl RawWrapper for NodeEvent

§

type CType = u32

source§

impl RawWrapper for PointRef

source§

impl RawWrapper for RectangleRef

source§

impl RawWrapper for RegionRef

source§

impl RawWrapper for TimespecRef

source§

impl RawWrapper for pipewire_wrapper::spa::type_::Type

§

type CType = u32

source§

impl RawWrapper for pipewire_wrapper::stream::buffer::BufferRef

source§

impl RawWrapper for ControlRef

source§

impl RawWrapper for StreamEventsRef

source§

impl RawWrapper for State

§

type CType = i32

source§

impl RawWrapper for StreamRef

source§

impl RawWrapper for TimeRef

source§

impl<'a, T: PodPropKeyType<'a>> RawWrapper for PodPropRef<'a, T>

source§

impl<T> RawWrapper for FilterRef<T>

source§

impl<T> RawWrapper for PodEnumRef<T>

source§

impl<T> RawWrapper for PodFlagsRef<T>

source§

impl<T> RawWrapper for PodNoneRef<T>

source§

impl<T> RawWrapper for PodRangeRef<T>

source§

impl<T> RawWrapper for PodStepRef<T>

source§

impl<T: PodIdType> RawWrapper for PodIdRef<T>

source§

impl<T: PodRawValue> RawWrapper for PodArrayRef<T>

source§

impl<T: PodRawValue> RawWrapper for PodChoiceRef<T>