Change various functions from returning an Option to Results
Most of these should probably simply use glib::BoolError
because that's what it is from the C side of things.
gstreamer/src/allocator.rs: fn alloc(&self, size: usize, params: Option<&AllocationParams>) -> Option<Memory>;
gstreamer/src/allocator.rs: fn alloc(&self, size: usize, params: Option<&AllocationParams>) -> Option<Memory> {
gstreamer/src/buffer.rs: pub fn with_size(size: usize) -> Option<Self> {
gstreamer/src/buffer.rs: pub fn map_readable(&self) -> Option<BufferMap<Readable>> {
gstreamer/src/buffer.rs: pub fn map_writable(&mut self) -> Option<BufferMap<Writable>> {
gstreamer/src/buffer.rs: ) -> Option<Buffer> {
gstreamer/src/bus.rs: pub fn add_watch<F>(&self, func: F) -> Option<SourceId>
gstreamer/src/bus.rs: pub fn add_watch_local<F>(&self, func: F) -> Option<SourceId>
gstreamer/src/caps.rs: pub fn from_string(value: &str) -> Option<Self> {
gstreamer/src/child_proxy.rs: fn get_child_property(&self, name: &str) -> Option<glib::Value>;
gstreamer/src/child_proxy.rs: fn get_child_property(&self, name: &str) -> Option<glib::Value> {
gstreamer/src/caps_features.rs: pub fn from_string(value: &str) -> Option<Self> {
gstreamer/src/clock.rs: fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> Option<ClockId>;
gstreamer/src/clock.rs: fn new_single_shot_id(&self, time: ClockTime) -> Option<ClockId>;
gstreamer/src/clock.rs: fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> Option<ClockId> {
gstreamer/src/clock.rs: fn new_single_shot_id(&self, time: ClockTime) -> Option<ClockId> {
gstreamer/src/device_monitor.rs: ) -> Option<DeviceMonitorFilterId>;
gstreamer/src/device_monitor.rs: ) -> Option<DeviceMonitorFilterId> {
gstreamer/src/ghost_pad.rs: pub fn new<Q: IsA<Pad>>(name: Option<&str>, target: &Q) -> Option<GhostPad> {
gstreamer/src/ghost_pad.rs: ) -> Option<GhostPad> {
gstreamer/src/memory.rs: pub fn with_size(size: usize) -> Self {
gstreamer/src/memory.rs: pub fn with_size_and_params(size: usize, params: &AllocationParams) -> Self {
gstreamer/src/memory.rs: pub fn map_readable(&self) -> Option<MemoryMap<Readable>> {
gstreamer/src/memory.rs: pub fn map_writable(&mut self) -> Option<MemoryMap<Writable>> {
gstreamer/src/structure.rs: pub fn from_string(s: &str) -> Option<Structure> {
gstreamer/src/pad_template.rs: ) -> Option<PadTemplate> {
gstreamer/src/pad_template.rs: ) -> Option<PadTemplate> {
gstreamer-editing-services/src/auto/effect.rs: pub fn new(bin_description: &str) -> Option<Effect> {
gstreamer-editing-services/src/auto/uri_clip.rs: pub fn new(uri: &str) -> Option<UriClip> {
gstreamer/src/auto/date_time.rs: pub fn new_from_g_date_time(dt: &glib::DateTime) -> Option<DateTime> {
gstreamer/src/auto/date_time.rs: pub fn new_from_iso8601_string(string: &str) -> Option<DateTime> {
gstreamer/src/auto/date_time.rs: pub fn to_g_date_time(&self) -> Option<glib::DateTime> {
gstreamer/src/auto/date_time.rs: pub fn to_iso8601_string(&self) -> Option<GString> {
gstreamer/src/auto/ghost_pad.rs: pub fn new_no_target(name: Option<&str>, dir: PadDirection) -> Option<GhostPad> {
gstreamer/src/auto/ghost_pad.rs: ) -> Option<GhostPad> {
gstreamer-pbutils/src/auto/discoverer_info.rs: pub fn to_variant(&self, flags: DiscovererSerializeFlags) -> Option<glib::Variant> {
gstreamer-pbutils/src/auto/discoverer_info.rs: pub fn from_variant(variant: &glib::Variant) -> Option<DiscovererInfo> {
gstreamer-pbutils/src/auto/encoding_profile.rs: pub fn from_discoverer(info: &DiscovererInfo) -> Option<EncodingProfile> {
gstreamer-pbutils/src/auto/encoding_profile.rs: ) -> Option<EncodingProfile> {
gstreamer-video/src/auto/video_encoder.rs: fn allocate_output_buffer(&self, size: usize) -> Option<gst::Buffer>;
gstreamer-video/src/auto/video_encoder.rs: fn allocate_output_buffer(&self, size: usize) -> Option<gst::Buffer> {
gstreamer-video/src/auto/video_decoder.rs: fn allocate_output_buffer(&self) -> Option<gst::Buffer>;
gstreamer-video/src/auto/video_decoder.rs: fn allocate_output_buffer(&self) -> Option<gst::Buffer> {
gstreamer/src/auto/device.rs: fn create_element(&self, name: Option<&str>) -> Option<Element>;
gstreamer/src/auto/device.rs: fn create_element(&self, name: Option<&str>) -> Option<Element> {
gstreamer/src/auto/element_factory.rs: pub fn create(&self, name: Option<&str>) -> Option<Element> {
gstreamer/src/auto/element_factory.rs: pub fn make(factoryname: &str, name: Option<&str>) -> Option<Element> {
gstreamer/src/auto/pad_template.rs: ) -> Option<PadTemplate> {
gstreamer/src/auto/pad_template.rs: ) -> Option<PadTemplate> {
gstreamer/src/auto/plugin.rs: pub fn load(&self) -> Option<Plugin> {
gstreamer/src/auto/plugin.rs: pub fn load_by_name(name: &str) -> Option<Plugin> {
gstreamer/src/auto/plugin_feature.rs: fn load(&self) -> Option<PluginFeature>;
gstreamer/src/auto/plugin_feature.rs: fn load(&self) -> Option<PluginFeature> {
Edited by Sebastian Dröge