#[non_exhaustive]pub struct MoveLocation {
pub package: Option<String>,
pub module: Option<String>,
pub function: Option<u32>,
pub instruction: Option<u32>,
pub function_name: Option<String>,
}Expand description
Location in Move bytecode where an error occurred.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.package: Option<String>The package ID.
module: Option<String>The module name.
function: Option<u32>The function index.
instruction: Option<u32>Offset of the instruction where the error occurred.
function_name: Option<String>The name of the function, if available.
Implementations§
Source§impl MoveLocation
impl MoveLocation
pub const PACKAGE_FIELD: &'static MessageField
pub const MODULE_FIELD: &'static MessageField
pub const FUNCTION_FIELD: &'static MessageField
pub const INSTRUCTION_FIELD: &'static MessageField
pub const FUNCTION_NAME_FIELD: &'static MessageField
Source§impl MoveLocation
impl MoveLocation
pub fn path_builder() -> MoveLocationFieldPathBuilder
Source§impl MoveLocation
impl MoveLocation
pub const fn const_default() -> Self
Sourcepub fn package_opt_mut(&mut self) -> Option<&mut String>
pub fn package_opt_mut(&mut self) -> Option<&mut String>
Sourcepub fn package_mut(&mut self) -> &mut String
pub fn package_mut(&mut self) -> &mut String
Returns a mutable reference to package.
If the field is unset, it is first initialized with the default value.
Sourcepub fn package_opt(&self) -> Option<&str>
pub fn package_opt(&self) -> Option<&str>
Sourcepub fn set_package<T: Into<String>>(&mut self, field: T)
pub fn set_package<T: Into<String>>(&mut self, field: T)
Sets package with the provided value.
Sourcepub fn with_package<T: Into<String>>(self, field: T) -> Self
pub fn with_package<T: Into<String>>(self, field: T) -> Self
Sets package with the provided value.
Sourcepub fn module_opt_mut(&mut self) -> Option<&mut String>
pub fn module_opt_mut(&mut self) -> Option<&mut String>
Sourcepub fn module_mut(&mut self) -> &mut String
pub fn module_mut(&mut self) -> &mut String
Returns a mutable reference to module.
If the field is unset, it is first initialized with the default value.
Sourcepub fn module_opt(&self) -> Option<&str>
pub fn module_opt(&self) -> Option<&str>
Sourcepub fn set_module<T: Into<String>>(&mut self, field: T)
pub fn set_module<T: Into<String>>(&mut self, field: T)
Sets module with the provided value.
Sourcepub fn with_module<T: Into<String>>(self, field: T) -> Self
pub fn with_module<T: Into<String>>(self, field: T) -> Self
Sets module with the provided value.
Sourcepub fn function_opt_mut(&mut self) -> Option<&mut u32>
pub fn function_opt_mut(&mut self) -> Option<&mut u32>
Sourcepub fn function_mut(&mut self) -> &mut u32
pub fn function_mut(&mut self) -> &mut u32
Returns a mutable reference to function.
If the field is unset, it is first initialized with the default value.
Sourcepub fn function_opt(&self) -> Option<u32>
pub fn function_opt(&self) -> Option<u32>
Sourcepub fn set_function(&mut self, field: u32)
pub fn set_function(&mut self, field: u32)
Sets function with the provided value.
Sourcepub fn with_function(self, field: u32) -> Self
pub fn with_function(self, field: u32) -> Self
Sets function with the provided value.
Sourcepub fn instruction_opt_mut(&mut self) -> Option<&mut u32>
pub fn instruction_opt_mut(&mut self) -> Option<&mut u32>
Sourcepub fn instruction_mut(&mut self) -> &mut u32
pub fn instruction_mut(&mut self) -> &mut u32
Returns a mutable reference to instruction.
If the field is unset, it is first initialized with the default value.
Sourcepub fn instruction_opt(&self) -> Option<u32>
pub fn instruction_opt(&self) -> Option<u32>
Sourcepub fn set_instruction(&mut self, field: u32)
pub fn set_instruction(&mut self, field: u32)
Sets instruction with the provided value.
Sourcepub fn with_instruction(self, field: u32) -> Self
pub fn with_instruction(self, field: u32) -> Self
Sets instruction with the provided value.
Sourcepub fn function_name_opt_mut(&mut self) -> Option<&mut String>
pub fn function_name_opt_mut(&mut self) -> Option<&mut String>
Sourcepub fn function_name_mut(&mut self) -> &mut String
pub fn function_name_mut(&mut self) -> &mut String
Returns a mutable reference to function_name.
If the field is unset, it is first initialized with the default value.
Sourcepub fn function_name_opt(&self) -> Option<&str>
pub fn function_name_opt(&self) -> Option<&str>
Sourcepub fn set_function_name<T: Into<String>>(&mut self, field: T)
pub fn set_function_name<T: Into<String>>(&mut self, field: T)
Sets function_name with the provided value.
Sourcepub fn with_function_name<T: Into<String>>(self, field: T) -> Self
pub fn with_function_name<T: Into<String>>(self, field: T) -> Self
Sets function_name with the provided value.
Source§impl MoveLocation
impl MoveLocation
Sourcepub fn package(&self) -> &str
pub fn package(&self) -> &str
Returns the value of package, or the default value if package is unset.
Sourcepub fn module(&self) -> &str
pub fn module(&self) -> &str
Returns the value of module, or the default value if module is unset.
Sourcepub fn function(&self) -> u32
pub fn function(&self) -> u32
Returns the value of function, or the default value if function is unset.
Sourcepub fn instruction(&self) -> u32
pub fn instruction(&self) -> u32
Returns the value of instruction, or the default value if instruction is unset.
Sourcepub fn function_name(&self) -> &str
pub fn function_name(&self) -> &str
Returns the value of function_name, or the default value if function_name is unset.
Trait Implementations§
Source§impl Clone for MoveLocation
impl Clone for MoveLocation
Source§fn clone(&self) -> MoveLocation
fn clone(&self) -> MoveLocation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MoveLocation
impl Debug for MoveLocation
Source§impl Default for MoveLocation
impl Default for MoveLocation
§impl<'de> Deserialize<'de> for MoveLocation
impl<'de> Deserialize<'de> for MoveLocation
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl From<MoveLocation> for MoveLocation
impl From<MoveLocation> for MoveLocation
Source§impl Hash for MoveLocation
impl Hash for MoveLocation
Source§impl Message for MoveLocation
impl Message for MoveLocation
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl MessageFields for MoveLocation
impl MessageFields for MoveLocation
const FIELDS: &'static [&'static MessageField]
Source§impl PartialEq for MoveLocation
impl PartialEq for MoveLocation
§impl Serialize for MoveLocation
impl Serialize for MoveLocation
Source§impl TryFrom<&MoveLocation> for MoveLocation
impl TryFrom<&MoveLocation> for MoveLocation
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
impl Eq for MoveLocation
impl StructuralPartialEq for MoveLocation
Auto Trait Implementations§
impl Freeze for MoveLocation
impl RefUnwindSafe for MoveLocation
impl Send for MoveLocation
impl Sync for MoveLocation
impl Unpin for MoveLocation
impl UnwindSafe for MoveLocation
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.