pub struct MapRef<'m> { /* private fields */ }Expand description
A read-only borrowed reference to a ffi::VSMap.
Implementations§
Source§impl MapRef<'_>
impl MapRef<'_>
pub fn get_error(&self) -> Option<&CStr>
pub fn len(&self) -> i32
pub fn is_empty(&self) -> bool
pub fn num_elements(&self, key: &KeyStr) -> Option<i32>
Sourcepub fn get_int(&self, key: &KeyStr, index: i32) -> Result<i64, MapPropertyError>
pub fn get_int(&self, key: &KeyStr, index: i32) -> Result<i64, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_float(
&self,
key: &KeyStr,
index: i32,
) -> Result<f64, MapPropertyError>
pub fn get_float( &self, key: &KeyStr, index: i32, ) -> Result<f64, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_binary(
&self,
key: &KeyStr,
index: i32,
) -> Result<&[u8], MapPropertyError>
pub fn get_binary( &self, key: &KeyStr, index: i32, ) -> Result<&[u8], MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_utf8(
&self,
key: &KeyStr,
index: i32,
) -> Result<&str, MapPropertyError>
pub fn get_utf8( &self, key: &KeyStr, index: i32, ) -> Result<&str, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_function(
&self,
key: &KeyStr,
index: i32,
) -> Result<Function, MapPropertyError>
pub fn get_function( &self, key: &KeyStr, index: i32, ) -> Result<Function, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_video_node(
&self,
key: &KeyStr,
index: i32,
) -> Result<VideoNode, MapPropertyError>
pub fn get_video_node( &self, key: &KeyStr, index: i32, ) -> Result<VideoNode, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_audio_node(
&self,
key: &KeyStr,
index: i32,
) -> Result<AudioNode, MapPropertyError>
pub fn get_audio_node( &self, key: &KeyStr, index: i32, ) -> Result<AudioNode, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_video_frame(
&self,
key: &KeyStr,
index: i32,
) -> Result<VideoFrame, MapPropertyError>
pub fn get_video_frame( &self, key: &KeyStr, index: i32, ) -> Result<VideoFrame, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_audio_frame(
&self,
key: &KeyStr,
index: i32,
) -> Result<AudioFrame, MapPropertyError>
pub fn get_audio_frame( &self, key: &KeyStr, index: i32, ) -> Result<AudioFrame, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get(
&self,
key: &KeyStr,
index: i32,
) -> Result<Value<'_>, MapPropertyError>
pub fn get( &self, key: &KeyStr, index: i32, ) -> Result<Value<'_>, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_int_saturated(
&self,
key: &KeyStr,
index: i32,
) -> Result<i32, MapPropertyError>
pub fn get_int_saturated( &self, key: &KeyStr, index: i32, ) -> Result<i32, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_int_array(&self, key: &KeyStr) -> Result<&[i64], MapPropertyError>
pub fn get_int_array(&self, key: &KeyStr) -> Result<&[i64], MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_float_saturated(
&self,
key: &KeyStr,
index: i32,
) -> Result<f32, MapPropertyError>
pub fn get_float_saturated( &self, key: &KeyStr, index: i32, ) -> Result<f32, MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success
Sourcepub fn get_float_array(&self, key: &KeyStr) -> Result<&[f64], MapPropertyError>
pub fn get_float_array(&self, key: &KeyStr) -> Result<&[f64], MapPropertyError>
§Errors
Return MapPropertyError if the underlying API does not success