Enum GValue

Source
pub enum GValue {
Show 31 variants Null, Vertex(Vertex), Edge(Edge), VertexProperty(VertexProperty), Property(Property), Uuid(Uuid), Int32(i32), Int64(i64), Float(f32), Double(f64), Date(DateTime<Utc>), List(List), Set(Set), Map(Map), Token(Token), String(String), Path(Path), TraversalMetrics(TraversalMetrics), Metric(Metric), TraversalExplanation(TraversalExplanation), IntermediateRepr(IntermediateRepr), P(P), T(T), Bytecode(Bytecode), Traverser(Traverser), Scope(Scope), Order(Order), Bool(bool), TextP(TextP), Pop(Pop), Cardinality(Cardinality),
}
Expand description

Represent possible values coming from the Gremlin Server

Variants§

§

Null

§

Vertex(Vertex)

§

Edge(Edge)

§

VertexProperty(VertexProperty)

§

Property(Property)

§

Uuid(Uuid)

§

Int32(i32)

§

Int64(i64)

§

Float(f32)

§

Double(f64)

§

Date(DateTime<Utc>)

§

List(List)

§

Set(Set)

§

Map(Map)

§

Token(Token)

§

String(String)

§

Path(Path)

§

TraversalMetrics(TraversalMetrics)

§

Metric(Metric)

§

TraversalExplanation(TraversalExplanation)

§

IntermediateRepr(IntermediateRepr)

§

P(P)

§

T(T)

§

Bytecode(Bytecode)

§

Traverser(Traverser)

§

Scope(Scope)

§

Order(Order)

§

Bool(bool)

§

TextP(TextP)

§

Pop(Pop)

§

Cardinality(Cardinality)

Implementations§

Source§

impl GValue

Source

pub fn take<T>(self) -> GremlinResult<T>
where T: FromGValue,

Examples found in repository?
examples/path.rs (line 9)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let client = GremlinClient::connect("localhost")?;
5
6    let results = client
7        .execute("g.V(param).outE().inV().path()", &[("param", &1)])?
8        .filter_map(Result::ok)
9        .map(|f| f.take::<Path>())
10        .collect::<Result<Vec<Path>, _>>()?;
11
12    println!("{:#?}", results);
13
14    Ok(())
15}
More examples
Hide additional examples
examples/multithread.rs (line 12)
4fn main() -> Result<(), Box<dyn std::error::Error>> {
5    let client = GremlinClient::connect("localhost")?;
6
7    let c = client.clone();
8
9    let result = thread::spawn(move || {
10        c.execute("g.V(param)", &[("param", &1)])?
11            .filter_map(Result::ok)
12            .map(|f| f.take::<Vertex>())
13            .collect::<Result<Vec<Vertex>, _>>()
14    });
15
16    println!("{:?}", result.join());
17
18    Ok(())
19}
examples/vertex.rs (line 9)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let client = GremlinClient::connect("localhost")?;
5
6    let results = client
7        .execute("g.V(param)", &[("param", &1)])?
8        .filter_map(Result::ok)
9        .map(|f| f.take::<Vertex>())
10        .collect::<Result<Vec<Vertex>, _>>()?;
11
12    println!("Vertex count: {}", results.len());
13
14    let vertex = &results[0];
15
16    println!(
17        "Vertex with id: [{}] and label: [{}]",
18        vertex.id().get::<i64>()?,
19        vertex.label()
20    );
21
22    Ok(())
23}
examples/connection_options.rs (line 16)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let client = GremlinClient::connect(
5        ConnectionOptions::builder()
6            .host("localhost")
7            .port(8182)
8            .pool_size(1)
9            .credentials("stephen", "password")
10            .build(),
11    )?;
12
13    let results = client
14        .execute("g.V(param)", &[("param", &1)])?
15        .filter_map(Result::ok)
16        .map(|f| f.take::<Vertex>())
17        .collect::<Result<Vec<Vertex>, _>>()?;
18
19    println!("{:?}", results);
20
21    Ok(())
22}
examples/edge_properties.rs (line 9)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let client = GremlinClient::connect("localhost")?;
5
6    let results = client
7        .execute("g.V(param).outE().properties()", &[("param", &1)])?
8        .filter_map(Result::ok)
9        .map(|f| f.take::<Property>())
10        .collect::<Result<Vec<Property>, _>>()?;
11
12    println!("{:?}", results);
13
14    let results = client
15        .execute("g.V(param).outE().propertyMap()", &[("param", &1)])?
16        .filter_map(Result::ok)
17        .map(|f| f.take::<Map>())
18        .collect::<Result<Vec<Map>, _>>()?;
19
20    println!("{:?}", results);
21
22    Ok(())
23}
examples/edge.rs (line 10)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let client = GremlinClient::connect("localhost")?;
5
6    // Find outgoing edges for V[1]
7    let results = client
8        .execute("g.V(param).outE()", &[("param", &1)])?
9        .filter_map(Result::ok)
10        .map(|f| f.take::<Edge>())
11        .collect::<Result<Vec<Edge>, _>>()?;
12
13    println!("Edges count {}", results.len());
14
15    let first = &results[0];
16
17    println!(
18        "Edge with id: [{}] and label: [{}] from: [{}] to: [{}]",
19        first.id().get::<i32>()?,
20        first.label(),
21        first.out_v().id().get::<i64>()?,
22        first.in_v().id().get::<i64>()?
23    );
24
25    Ok(())
26}
Source

pub fn get<'a, T>(&'a self) -> GremlinResult<&'a T>
where T: BorrowFromGValue,

Examples found in repository?
examples/vertex_properties.rs (line 22)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let client = GremlinClient::connect("localhost")?;
5
6    let results = client
7        .execute("g.V(param).properties()", &[("param", &1)])?
8        .filter_map(Result::ok)
9        .map(|f| f.take::<VertexProperty>())
10        .collect::<Result<Vec<VertexProperty>, _>>()?;
11
12    println!("{:?}", results[0].get::<String>()?);
13
14    let results = client
15        .execute("g.V(param).propertyMap()", &[("param", &1)])?
16        .filter_map(Result::ok)
17        .map(|f| f.take::<Map>())
18        .collect::<Result<Vec<Map>, _>>()?;
19
20    println!(
21        "{:?}",
22        results[0]["name"].get::<List>()?[0]
23            .get::<VertexProperty>()?
24            .get::<String>()?
25    );
26
27    Ok(())
28}
More examples
Hide additional examples
examples/traversal_complex.rs (line 26)
7fn main() -> Result<(), Box<dyn std::error::Error>> {
8    let client = GremlinClient::connect("localhost")?;
9
10    let g = traversal().with_remote(client);
11
12    create_graph(&g)?;
13
14    let result = g
15        .v(())
16        .has_label("complex_vertex")
17        .has(("name", "test1"))
18        .out("complex_label")
19        .out("complex_label")
20        .value_map(())
21        .next()?
22        .expect("no vertices found");
23
24    println!(
25        "Found vertex with name {:?}",
26        result["name"].get::<List>().unwrap()[0]
27    );
28
29    let results = g
30        .v(())
31        .has_label("complex_vertex")
32        .has(("number", P::gt(3)))
33        .to_list()?;
34
35    println!(
36        "Found {} vertices with number greater than 3",
37        results.len()
38    );
39
40    let results = g
41        .v(())
42        .has_label("complex_vertex")
43        .has(("number", P::within((3, 6))))
44        .to_list()?;
45
46    println!("Found {} vertices with number 3 or 6", results.len());
47
48    let results = g
49        .v(())
50        .has_label("complex_vertex")
51        .where_(__.out("complex_label").count().is(P::gte(1)))
52        .to_list()?;
53
54    println!(
55        "Found {} vertices with 1 or more connected edges with label complex_label",
56        results.len()
57    );
58
59    Ok(())
60}

Trait Implementations§

Source§

impl Clone for GValue

Source§

fn clone(&self) -> GValue

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&String> for GValue

Source§

fn from(val: &String) -> Self

Converts to this type from the input type.
Source§

impl From<&Vertex> for GValue

Source§

fn from(val: &Vertex) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for GValue

Source§

fn from(val: &'a str) -> Self

Converts to this type from the input type.
Source§

impl From<BTreeMap<String, GValue>> for GValue

Source§

fn from(val: BTreeMap<String, GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<Bytecode> for GValue

Source§

fn from(val: Bytecode) -> GValue

Converts to this type from the input type.
Source§

impl From<Cardinality> for GValue

Source§

fn from(val: Cardinality) -> GValue

Converts to this type from the input type.
Source§

impl From<DateTime<Utc>> for GValue

Source§

fn from(val: DateTime<Utc>) -> Self

Converts to this type from the input type.
Source§

impl From<Edge> for GValue

Source§

fn from(val: Edge) -> Self

Converts to this type from the input type.
Source§

impl<A, B> From<Either2<A, B>> for GValue
where A: Into<GValue>, B: Into<GValue>,

Source§

fn from(val: Either2<A, B>) -> Self

Converts to this type from the input type.
Source§

impl From<GKey> for GValue

Source§

fn from(val: GKey) -> Self

Converts to this type from the input type.
Source§

impl From<GValue> for Vec<GValue>

Source§

fn from(val: GValue) -> Self

Converts to this type from the input type.
Source§

impl From<GValue> for VecDeque<GValue>

Source§

fn from(val: GValue) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<GKey, GValue>> for GValue

Source§

fn from(val: HashMap<GKey, GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<HashMap<String, GValue>> for GValue

Source§

fn from(val: HashMap<String, GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<Metric> for GValue

Source§

fn from(val: Metric) -> Self

Converts to this type from the input type.
Source§

impl From<Order> for GValue

Source§

fn from(val: Order) -> Self

Converts to this type from the input type.
Source§

impl From<P> for GValue

Source§

fn from(val: P) -> GValue

Converts to this type from the input type.
Source§

impl From<Path> for GValue

Source§

fn from(val: Path) -> Self

Converts to this type from the input type.
Source§

impl From<Property> for GValue

Source§

fn from(val: Property) -> Self

Converts to this type from the input type.
Source§

impl From<Scope> for GValue

Source§

fn from(val: Scope) -> Self

Converts to this type from the input type.
Source§

impl From<String> for GValue

Source§

fn from(val: String) -> Self

Converts to this type from the input type.
Source§

impl From<T> for GValue

Source§

fn from(val: T) -> GValue

Converts to this type from the input type.
Source§

impl From<TextP> for GValue

Source§

fn from(val: TextP) -> GValue

Converts to this type from the input type.
Source§

impl From<Token> for GValue

Source§

fn from(val: Token) -> Self

Converts to this type from the input type.
Source§

impl From<TraversalExplanation> for GValue

Source§

fn from(val: TraversalExplanation) -> Self

Converts to this type from the input type.
Source§

impl From<TraversalMetrics> for GValue

Source§

fn from(val: TraversalMetrics) -> Self

Converts to this type from the input type.
Source§

impl From<Traverser> for GValue

Source§

fn from(val: Traverser) -> Self

Converts to this type from the input type.
Source§

impl From<Uuid> for GValue

Source§

fn from(val: Uuid) -> GValue

Converts to this type from the input type.
Source§

impl From<Vec<GValue>> for GValue

Source§

fn from(val: Vec<GValue>) -> Self

Converts to this type from the input type.
Source§

impl From<Vertex> for GValue

Source§

fn from(val: Vertex) -> Self

Converts to this type from the input type.
Source§

impl From<VertexProperty> for GValue

Source§

fn from(val: VertexProperty) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for GValue

Source§

fn from(val: bool) -> GValue

Converts to this type from the input type.
Source§

impl From<f32> for GValue

Source§

fn from(val: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for GValue

Source§

fn from(val: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for GValue

Source§

fn from(val: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for GValue

Source§

fn from(val: i64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for GValue

Source§

fn eq(&self, other: &GValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<&GValue> for HashSet<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for HashSet<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<f32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<f64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<&GValue> for Vec<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for BTreeMap<String, GValue>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for DateTime<Utc>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashMap<GKey, GValue>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashMap<String, GValue>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for HashSet<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<f32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<f64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Option<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for String

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Uuid

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<DateTime<Utc>>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<String>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<Uuid>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<bool>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<f32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<f64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<i32>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for Vec<i64>

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for bool

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for f32

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for f64

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for i32

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl TryFrom<GValue> for i64

Source§

type Error = GremlinError

The type returned in the event of a conversion error.
Source§

fn try_from(value: GValue) -> GremlinResult<Self>

Performs the conversion.
Source§

impl StructuralPartialEq for GValue

Auto Trait Implementations§

§

impl Freeze for GValue

§

impl RefUnwindSafe for GValue

§

impl Send for GValue

§

impl Sync for GValue

§

impl Unpin for GValue

§

impl UnwindSafe for GValue

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,