pub struct PtrRef(/* private fields */);
Expand description
References a pointer from the host.
It could be casted to any type, although you should only cast if you are sure of the type of cast.
From<T>
implementations are used to turn a rust value to a host pointer. It allocates
the value in the host.
Into<T>
implementations are used to convert a host’s value pointer to a rust type.
Implementations§
Source§impl PtrRef
impl PtrRef
pub fn new(ptr: i32) -> Self
pub fn pointer(&self) -> i32
pub fn kind(&self) -> Kind
pub fn is_none(&self) -> bool
pub fn is_some(&self) -> bool
pub fn as_string(&self) -> Result<String>
pub fn as_object(self) -> Result<ObjectRef>
pub fn as_array(self) -> Result<ArrayRef>
pub fn as_int(&self) -> Result<i64>
pub fn as_float(&self) -> Result<f64>
pub fn as_bool(&self) -> Result<bool>
Trait Implementations§
Source§impl From<DiscoverListing> for PtrRef
impl From<DiscoverListing> for PtrRef
Source§fn from(value: DiscoverListing) -> Self
fn from(value: DiscoverListing) -> Self
Converts to this type from the input type.
Source§impl From<DiscoverListings> for PtrRef
impl From<DiscoverListings> for PtrRef
Source§fn from(value: DiscoverListings) -> Self
fn from(value: DiscoverListings) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistDetails> for PtrRef
impl From<PlaylistDetails> for PtrRef
Source§fn from(value: PlaylistDetails) -> Self
fn from(value: PlaylistDetails) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeServer> for PtrRef
impl From<PlaylistEpisodeServer> for PtrRef
Source§fn from(value: PlaylistEpisodeServer) -> Self
fn from(value: PlaylistEpisodeServer) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeServerLink> for PtrRef
impl From<PlaylistEpisodeServerLink> for PtrRef
Source§fn from(value: PlaylistEpisodeServerLink) -> Self
fn from(value: PlaylistEpisodeServerLink) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeServerResponse> for PtrRef
impl From<PlaylistEpisodeServerResponse> for PtrRef
Source§fn from(value: PlaylistEpisodeServerResponse) -> Self
fn from(value: PlaylistEpisodeServerResponse) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeServerSkipTime> for PtrRef
impl From<PlaylistEpisodeServerSkipTime> for PtrRef
Source§fn from(value: PlaylistEpisodeServerSkipTime) -> Self
fn from(value: PlaylistEpisodeServerSkipTime) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeServerSubtitle> for PtrRef
impl From<PlaylistEpisodeServerSubtitle> for PtrRef
Source§fn from(value: PlaylistEpisodeServerSubtitle) -> Self
fn from(value: PlaylistEpisodeServerSubtitle) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeSource> for PtrRef
impl From<PlaylistEpisodeSource> for PtrRef
Source§fn from(value: PlaylistEpisodeSource) -> Self
fn from(value: PlaylistEpisodeSource) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistEpisodeSources> for PtrRef
impl From<PlaylistEpisodeSources> for PtrRef
Source§fn from(value: PlaylistEpisodeSources) -> Self
fn from(value: PlaylistEpisodeSources) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistGroup> for PtrRef
impl From<PlaylistGroup> for PtrRef
Source§fn from(value: PlaylistGroup) -> Self
fn from(value: PlaylistGroup) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistGroupContent> for PtrRef
impl From<PlaylistGroupContent> for PtrRef
Source§fn from(value: PlaylistGroupContent) -> Self
fn from(value: PlaylistGroupContent) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistGroupPage> for PtrRef
impl From<PlaylistGroupPage> for PtrRef
Source§fn from(value: PlaylistGroupPage) -> Self
fn from(value: PlaylistGroupPage) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistItem> for PtrRef
impl From<PlaylistItem> for PtrRef
Source§fn from(value: PlaylistItem) -> Self
fn from(value: PlaylistItem) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistItemsResponse> for PtrRef
impl From<PlaylistItemsResponse> for PtrRef
Source§fn from(value: PlaylistItemsResponse) -> Self
fn from(value: PlaylistItemsResponse) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistPreview> for PtrRef
impl From<PlaylistPreview> for PtrRef
Source§fn from(value: PlaylistPreview) -> Self
fn from(value: PlaylistPreview) -> Self
Converts to this type from the input type.
Source§impl From<SearchFilter> for PtrRef
impl From<SearchFilter> for PtrRef
Source§fn from(value: SearchFilter) -> Self
fn from(value: SearchFilter) -> Self
Converts to this type from the input type.
Source§impl From<SearchFilterOption> for PtrRef
impl From<SearchFilterOption> for PtrRef
Source§fn from(value: SearchFilterOption) -> Self
fn from(value: SearchFilterOption) -> Self
Converts to this type from the input type.
Source§impl From<SearchFilters> for PtrRef
impl From<SearchFilters> for PtrRef
Source§fn from(value: SearchFilters) -> PtrRef
fn from(value: SearchFilters) -> PtrRef
Converts to this type from the input type.
Source§impl FromIterator<PtrRef> for ArrayRef
impl FromIterator<PtrRef> for ArrayRef
Source§impl Into<PlaylistEpisodeServerRequest> for PtrRef
impl Into<PlaylistEpisodeServerRequest> for PtrRef
Source§fn into(self) -> PlaylistEpisodeServerRequest
fn into(self) -> PlaylistEpisodeServerRequest
Converts this type into the (usually inferred) input type.
Source§impl Into<PlaylistEpisodeSourcesRequest> for PtrRef
impl Into<PlaylistEpisodeSourcesRequest> for PtrRef
Source§fn into(self) -> PlaylistEpisodeSourcesRequest
fn into(self) -> PlaylistEpisodeSourcesRequest
Converts this type into the (usually inferred) input type.
Source§impl Into<PlaylistItemsRequest> for PtrRef
impl Into<PlaylistItemsRequest> for PtrRef
Source§fn into(self) -> PlaylistItemsRequest
fn into(self) -> PlaylistItemsRequest
Converts this type into the (usually inferred) input type.
Source§impl Into<SearchQuery> for PtrRef
impl Into<SearchQuery> for PtrRef
Source§fn into(self) -> SearchQuery
fn into(self) -> SearchQuery
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for PtrRef
impl RefUnwindSafe for PtrRef
impl Send for PtrRef
impl Sync for PtrRef
impl Unpin for PtrRef
impl UnwindSafe for PtrRef
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