pub fn send_explicit_synchronization_error(attrs: &SurfaceData, error: ExplicitSyncError) {
    if let Some(data) = attrs.data_map.get::<ESUserData>() {
        if let Some(sync_resource) = data.state.borrow().deref() {
            match error {
                ExplicitSyncError::InvalidFence => sync_resource.as_ref().post_error(
                    zwp_linux_surface_synchronization_v1::Error::InvalidFence as u32,
                    "The fence specified by the client could not be imported.".into(),
                ),
                ExplicitSyncError::UnsupportedBuffer => sync_resource.as_ref().post_error(
                    zwp_linux_surface_synchronization_v1::Error::UnsupportedBuffer as u32,
                    "The buffer does not support explicit synchronization.".into(),
                ),
                ExplicitSyncError::NoBuffer => sync_resource.as_ref().post_error(
                    zwp_linux_surface_synchronization_v1::Error::NoBuffer as u32,
                    "No buffer was attached.".into(),
                ),
            }
        }
    }
}
/// Send a synchronization error to a client
///
/// See the enum definition for possible errors. These errors are protocol errors, meaning that
/// the client associated with this `SurfaceAttributes` will be killed as a result of calling this
/// function.
Send a synchronization error to a client
See the enum definition for possible errors. These errors are protocol errors, meaning that
the client associated with this `SurfaceAttributes` will be killed as a result of calling this
function.
Send a synchronization error to a client See the enum definition for possible errors . These errors are protocol errors meaning that the client associated with this ` SurfaceAttributes ` will be killed as a result of calling this function .
pub fn send_explicit_synchronization_error(attrs: &SurfaceData, error: ExplicitSyncError) {
    if let Some(data) = attrs.data_map.get::<ESUserData>() {
        if let Some(sync_resource) = data.state.borrow().deref() {
            match error {
                ExplicitSyncError::InvalidFence => sync_resource.as_ref().post_error(
                    zwp_linux_surface_synchronization_v1::Error::InvalidFence as u32,
                    "The fence specified by the client could not be imported.".into(),
                ),
                ExplicitSyncError::UnsupportedBuffer => sync_resource.as_ref().post_error(
                    zwp_linux_surface_synchronization_v1::Error::UnsupportedBuffer as u32,
                    "The buffer does not support explicit synchronization.".into(),
                ),
                ExplicitSyncError::NoBuffer => sync_resource.as_ref().post_error(
                    zwp_linux_surface_synchronization_v1::Error::NoBuffer as u32,
                    "No buffer was attached.".into(),
                ),
            }
        }
    }
}
pub fn send_explicit_synchronization_error ( attrs : & SurfaceData , error : ExplicitSyncError ) { if let Some ( data ) = attrs . data_map . get :: < ESUserData > ( ) { if let Some ( sync_resource ) = data . state . borrow ( ) . deref ( ) { match error { ExplicitSyncError :: InvalidFence => sync_resource . as_ref ( ) . post_error ( zwp_linux_surface_synchronization_v1 :: Error :: InvalidFence as u32 , " " . into ( ) , ) , ExplicitSyncError :: UnsupportedBuffer => sync_resource . as_ref ( ) . post_error ( zwp_linux_surface_synchronization_v1 :: Error :: UnsupportedBuffer as u32 , " " . into ( ) , ) , ExplicitSyncError :: NoBuffer => sync_resource . as_ref ( ) . post_error ( zwp_linux_surface_synchronization_v1 :: Error :: NoBuffer as u32 , " " . into ( ) , ) , } } } }
Send a synchronization error to a client
See the enum definition for possible errors.
Send a synchronization error to a client See the enum definition for possible errors .
attrs
&SurfaceData
error
ExplicitSyncError
attrs
&SurfaceData
error
ExplicitSyncError